From c93487e0484784f3f29dbb985f04c5ff627dfa8f Mon Sep 17 00:00:00 2001 From: TRT <> Date: Sat, 25 Jun 2022 21:01:59 +0200 Subject: [PATCH] Support for Grell --- .../forge/game/staticability/StaticAbilityContinuous.java | 2 +- forge-gui/res/cardsfolder/s/scheming_fence.txt | 2 +- forge-gui/res/cardsfolder/upcoming/grell_philosopher.txt | 7 +++---- .../src/main/java/forge/player/HumanPlaySpellAbility.java | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java index 1a32a81b354..b9f957a509f 100644 --- a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java +++ b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java @@ -843,7 +843,7 @@ public final class StaticAbilityContinuous { newSA.getRestrictions().setLimitToCheck(params.get("GainsAbilitiesLimitPerTurn")); } if (params.containsKey("GainsAbilitiesActivateIgnoreColor")) { - newSA.putParam("ActivateIgnoreColor","True"); + newSA.putParam("ActivateIgnoreColor", params.get("GainsAbilitiesActivateIgnoreColor")); } newSA.setOriginalAbility(sa); // need to be set to get the Once Per turn Clause correct newSA.setGrantorStatic(stAb); diff --git a/forge-gui/res/cardsfolder/s/scheming_fence.txt b/forge-gui/res/cardsfolder/s/scheming_fence.txt index 00662c7831a..49b7ec45357 100644 --- a/forge-gui/res/cardsfolder/s/scheming_fence.txt +++ b/forge-gui/res/cardsfolder/s/scheming_fence.txt @@ -5,7 +5,7 @@ PT:2/3 K:ETBReplacement:Other:ChooseCard SVar:ChooseCard:DB$ ChooseCard | Choices$ Permanent.nonLand | MinAmount$ 0 | ChoiceTitle$ You may choose a nonland permanent | AILogic$ OppPreferred | SpellDescription$ As CARDNAME enters the battlefield, you may choose a nonland permanent. S:Mode$ Continuous | Affected$ Card.ChosenCard | AddHiddenKeyword$ CARDNAME's activated abilities can't be activated. | Description$ Activated abilities of the chosen permanent can't be activated. -S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Battlefield | GainsAbilitiesOfDefined$ ChosenCard | GainsValidAbilities$ Activated.nonLoyalty | GainsAbilitiesActivateIgnoreColor$ True | Description$ CARDNAME has all activated abilities of the chosen permanent except for loyalty abilities. You may spend mana as though it were mana of any color to activate those abilities. +S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Battlefield | GainsAbilitiesOfDefined$ ChosenCard | GainsValidAbilities$ Activated.nonLoyalty | GainsAbilitiesActivateIgnoreColor$ AnyType->AnyColor | Description$ CARDNAME has all activated abilities of the chosen permanent except for loyalty abilities. You may spend mana as though it were mana of any color to activate those abilities. T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.ChosenCard | Execute$ TrigCleanup SVar:TrigCleanup:DB$ Cleanup | ClearChosenCard$ True Oracle:As Scheming Fence enters the battlefield, you may choose a nonland permanent.\nActivated abilities of the chosen permanent can't be activated.\nScheming Fence has all activated abilities of the chosen permanent except for loyalty abilities. You may spend mana as though it were mana of any color to activate those abilities. diff --git a/forge-gui/res/cardsfolder/upcoming/grell_philosopher.txt b/forge-gui/res/cardsfolder/upcoming/grell_philosopher.txt index a602139d791..faae3e8fef4 100644 --- a/forge-gui/res/cardsfolder/upcoming/grell_philosopher.txt +++ b/forge-gui/res/cardsfolder/upcoming/grell_philosopher.txt @@ -2,11 +2,10 @@ Name:Grell Philosopher ManaCost:2 U Types:Creature Horror Wizard PT:1/4 -K:ManaConvert:U->AnyColor:You may spend blue mana as though it were mana of any color to pay the activation costs of CARDNAME's abilities. -T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigEffect | TriggerDescription$ Aberrant Tinkering — When CARDNAME enters the battlefield and at the beginning of your upkeep, each Horror you control gains all activated abilities of target artifact an opponent controls until end of turn. -T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigEffect | TriggerZones$ Battlefield | Secondary$ True | TriggerDescription$ Aberrant Tinkering — When CARDNAME enters the battlefield and at the beginning of your upkeep, each Horror you control gains all activated abilities of target artifact an opponent controls until end of turn. +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigEffect | TriggerDescription$ Aberrant Tinkering — When CARDNAME enters the battlefield and at the beginning of your upkeep, each Horror you control gains all activated abilities of target artifact an opponent controls until end of turn. You may spend blue mana as though it were mana of any color to pay the activation costs of CARDNAME's abilities. +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigEffect | TriggerZones$ Battlefield | Secondary$ True | TriggerDescription$ Aberrant Tinkering — When CARDNAME enters the battlefield and at the beginning of your upkeep, each Horror you control gains all activated abilities of target artifact an opponent controls until end of turn. You may spend blue mana as though it were mana of any color to pay the activation costs of CARDNAME's abilities. SVar:TrigEffect:DB$ Effect | ValidTgts$ Card.Artifact+OppCtrl | TgtZone$ Battlefield | TgtPrompt$ Select target artifact an opponent controls | StaticAbilities$ STSteal | ImprintCards$ Targeted | RememberObjects$ Valid Creature.Horror+YouCtrl | ForgetOnMoved$ Battlefield -SVar:STSteal:Mode$ Continuous | Affected$ Card.IsRemembered | EffectZone$ Command | GainsAbilitiesOfDefined$ ImprintedLKI +SVar:STSteal:Mode$ Continuous | Affected$ Card.IsRemembered | EffectZone$ Command | GainsAbilitiesOfDefined$ ImprintedLKI | GainsAbilitiesActivateIgnoreColor$ U->AnyColor AI:RemoveDeck:All DeckHints:Type$Horror Oracle:Aberrant Tinkering — When Grell Philosopher enters the battlefield and at the beginning of your upkeep, each Horror you control gains all activated abilities of target artifact an opponent controls until end of turn. You may spend blue mana as though it were mana of any color to activate those abilities. diff --git a/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java b/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java index bf5eebeeea2..74fa086002a 100644 --- a/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java +++ b/forge-gui/src/main/java/forge/player/HumanPlaySpellAbility.java @@ -139,11 +139,11 @@ public class HumanPlaySpellAbility { } } if (ability.hasParam("ActivateIgnoreColor")) { - AbilityUtils.applyManaColorConversion(payment, MagicColor.Constant.ANY_COLOR_CONVERSION); + params.put("ManaConversion", ability.getParam("ActivateIgnoreColor")); manaColorConversion = true; } - if (keywordColor) { + if (keywordColor || manaColorConversion) { AbilityUtils.applyManaColorConversion(payment, params); } }