diff --git a/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java b/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java index cbf89d3a2a0..6e825ad3460 100644 --- a/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java +++ b/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java @@ -239,6 +239,14 @@ public abstract class SpellAbilityEffect { : AbilityUtils.getDefinedObjects(sa.getHostCard(), sa.getParam(definedParam), sa); } + protected final static List getCardsfromTargets(final SpellAbility sa) { + List cards = getTargetCards(sa); + List spells = getTargetSpells(sa); + for (SpellAbility s : spells) { + cards.add(s.getHostCard()); + } + return cards; + } protected static void registerDelayedTrigger(final SpellAbility sa, String location, final Iterable crds) { boolean intrinsic = sa.isIntrinsic(); diff --git a/forge-game/src/main/java/forge/game/ability/effects/AnimateEffect.java b/forge-game/src/main/java/forge/game/ability/effects/AnimateEffect.java index 8672abb81dd..cfbf00d4232 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/AnimateEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/AnimateEffect.java @@ -132,7 +132,7 @@ public class AnimateEffect extends AnimateEffectBase { sVars.addAll(Arrays.asList(sa.getParam("sVars").split(","))); } - List tgts = getTargetCards(sa); + List tgts = getCardsfromTargets(sa); for (final Card c : tgts) { doAnimate(c, sa, power, toughness, types, removeTypes, finalDesc, @@ -210,7 +210,7 @@ public class AnimateEffect extends AnimateEffectBase { final StringBuilder sb = new StringBuilder(); - final List tgts = getTargetCards(sa); + final List tgts = getCardsfromTargets(sa); for (final Card c : tgts) { sb.append(c).append(" "); diff --git a/forge-game/src/main/java/forge/game/ability/effects/ChangeTextEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ChangeTextEffect.java index 9c78a65e2d2..9b8d9e50336 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ChangeTextEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ChangeTextEffect.java @@ -97,7 +97,7 @@ public class ChangeTextEffect extends SpellAbilityEffect { changedTypeWordNew = null; } - final List tgts = getTargetCards(sa); + final List tgts = getCardsfromTargets(sa); for (final Card c : tgts) { if (changedColorWordOriginal != null && changedColorWordNew != null) { c.addChangedTextColorWord(changedColorWordOriginal, changedColorWordNew, timestamp); @@ -156,7 +156,7 @@ public class ChangeTextEffect extends SpellAbilityEffect { final StringBuilder sb = new StringBuilder(); sb.append("Change the text of "); - final List tgts = getTargetCards(sa); + final List tgts = getCardsfromTargets(sa); for (final Card c : tgts) { sb.append(c).append(" "); } diff --git a/forge-game/src/main/java/forge/game/ability/effects/PumpEffect.java b/forge-game/src/main/java/forge/game/ability/effects/PumpEffect.java index 8865030ae4e..3a311892bfc 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/PumpEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/PumpEffect.java @@ -179,7 +179,7 @@ public class PumpEffect extends SpellAbilityEffect { final StringBuilder sb = new StringBuilder(); List tgts = Lists.newArrayList(); - tgts.addAll(getTargetCards(sa)); + tgts.addAll(getCardsfromTargets(sa)); if ((sa.usesTargeting() && sa.getTargetRestrictions().canTgtPlayer()) || sa.hasParam("Defined")) { tgts.addAll(getTargetPlayers(sa)); } @@ -279,7 +279,7 @@ public class PumpEffect extends SpellAbilityEffect { } List tgts = Lists.newArrayList(); - List tgtCards = getTargetCards(sa); + List tgtCards = getCardsfromTargets(sa); List tgtPlayers = getTargetPlayers(sa); tgts.addAll(tgtCards); tgts.addAll(tgtPlayers); diff --git a/forge-gui/res/cardsfolder/e/ersatz_gnomes.txt b/forge-gui/res/cardsfolder/e/ersatz_gnomes.txt index 6b12bb70b5d..b560c996754 100644 --- a/forge-gui/res/cardsfolder/e/ersatz_gnomes.txt +++ b/forge-gui/res/cardsfolder/e/ersatz_gnomes.txt @@ -2,8 +2,7 @@ Name:Ersatz Gnomes ManaCost:3 Types:Artifact Creature Gnome PT:1/1 -A:AB$ Animate | Cost$ T | Colors$ Colorless | OverwriteColors$ True | ValidTgts$ Card.inZoneStack | TgtZone$ Stack,Battlefield | TgtPrompt$ Select target spell to make colorless | Permanent$ True | SpellDescription$ Target spell becomes colorless. -#For the above part to work, another zone MUST be included because of interaction with regular targeting on the stack that stops the ability from working correctly. Use the inZone targeting restriction to limit it to stack. TODO: Probably need to fix this properly. +A:AB$ Animate | Cost$ T | Colors$ Colorless | OverwriteColors$ True | ValidTgts$ Card | TgtZone$ Stack | TgtPrompt$ Select target spell to make colorless | Permanent$ True | SpellDescription$ Target spell becomes colorless. A:AB$ Animate | Cost$ T | Colors$ Colorless | OverwriteColors$ True | ValidTgts$ Permanent | TgtPrompt$ Select target permanent to make colorless | SpellDescription$ Target permanent becomes colorless until end of turn. AI:RemoveDeck:Random AI:RemoveDeck:All diff --git a/forge-gui/res/cardsfolder/v/vexing_shusher.txt b/forge-gui/res/cardsfolder/v/vexing_shusher.txt index 5f2f8c87f85..c1c29c6002d 100644 --- a/forge-gui/res/cardsfolder/v/vexing_shusher.txt +++ b/forge-gui/res/cardsfolder/v/vexing_shusher.txt @@ -3,8 +3,6 @@ ManaCost:RG RG Types:Creature Goblin Shaman PT:2/2 K:CARDNAME can't be countered. -A:AB$ Pump | Cost$ RG | ValidTgts$ Card.inZoneStack | TgtZone$ Stack,Battlefield | PumpZone$ Stack | KW$ HIDDEN This spell can't be countered. | SpellDescription$ Target spell can't be countered. -#Should include another zone otherwise the target would not be defined as a card +A:AB$ Pump | Cost$ RG | ValidTgts$ Card.inZoneStack | TgtZone$ Stack | PumpZone$ Stack | KW$ HIDDEN This spell can't be countered. | SpellDescription$ Target spell can't be countered. AI:RemoveDeck:All -SVar:Picture:http://www.wizards.com/global/images/magic/general/vexing_shusher.jpg Oracle:This spell can't be countered.\n{R/G}: Target spell can't be countered. diff --git a/forge-gui/res/cardsfolder/v/vodalian_mystic.txt b/forge-gui/res/cardsfolder/v/vodalian_mystic.txt index 84b88975a13..f7a0acc6aa4 100644 --- a/forge-gui/res/cardsfolder/v/vodalian_mystic.txt +++ b/forge-gui/res/cardsfolder/v/vodalian_mystic.txt @@ -3,9 +3,7 @@ ManaCost:1 U Types:Creature Merfolk Wizard PT:1/1 A:AB$ ChooseColor | Cost$ T | Defined$ You | SubAbility$ Animate | SpellDescription$ Target instant or sorcery spell becomes the color of your choice. -SVar:Animate:DB$ Animate | ValidTgts$ Instant.inZoneStack,Sorcery.inZoneStack | TgtPrompt$ Select target instant or sorcery spell to change the color of | TgtZone$ Stack,Battlefield | Colors$ ChosenColor | OverwriteColors$ True | Permanent$ True -#For the above part to work, another zone MUST be included because of interaction with regular targeting on the stack that stops the ability from working correctly. Use the inZone targeting restriction to limit it to stack. TODO: Probably need to fix this properly. +SVar:Animate:DB$ Animate | ValidTgts$ Instant,Sorcery | TgtPrompt$ Select target instant or sorcery spell to change the color of | TgtZone$ Stack | Colors$ ChosenColor | OverwriteColors$ True | Permanent$ True AI:RemoveDeck:Random AI:RemoveDeck:All -SVar:Picture:http://www.wizards.com/global/images/magic/general/vodalian_mystic.jpg Oracle:{T}: Target instant or sorcery spell becomes the color of your choice.