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 8ef9f106a3c..df62ffd9818 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 @@ -234,9 +234,6 @@ public class PumpEffect extends SpellAbilityEffect { final Card host = sa.getHostCard(); final long timestamp = game.getNextTimestamp(); - String pumpForget = null; - String pumpImprint = null; - List keywords = Lists.newArrayList(); if (sa.hasParam("KW")) { keywords.addAll(Arrays.asList(sa.getParam("KW").split(" & "))); @@ -324,10 +321,6 @@ public class PumpEffect extends SpellAbilityEffect { } } - if (sa.hasParam("ForgetObjects")) { - pumpForget = sa.getParam("ForgetObjects"); - } - if (sa.hasParam("NoteCardsFor")) { for (final Card c : AbilityUtils.getDefinedCards(host, sa.getParam("NoteCards"), sa)) { for (Player p : tgtPlayers) { @@ -336,17 +329,14 @@ public class PumpEffect extends SpellAbilityEffect { } } - if (pumpForget != null) { - for (final Object o : AbilityUtils.getDefinedObjects(host, pumpForget, sa)) { + if (sa.hasParam("ForgetObjects")) { + for (final Object o : AbilityUtils.getDefinedObjects(host, sa.getParam("ForgetObjects"), sa)) { host.removeRemembered(o); } } - if (sa.hasParam("ImprintCards")) { - pumpImprint = sa.getParam("ImprintCards"); - } - if (pumpImprint != null) { - for (final Card c : AbilityUtils.getDefinedCards(host, pumpImprint, sa)) { + if (sa.hasParam("ImprintCards")) { + for (final Card c : AbilityUtils.getDefinedCards(host, sa.getParam("ImprintCards"), sa)) { host.addImprintedCard(c); } } diff --git a/forge-game/src/main/java/forge/game/card/CardProperty.java b/forge-game/src/main/java/forge/game/card/CardProperty.java index 115db1fb329..8a06a5c8b73 100644 --- a/forge-game/src/main/java/forge/game/card/CardProperty.java +++ b/forge-game/src/main/java/forge/game/card/CardProperty.java @@ -1771,6 +1771,16 @@ public class CardProperty { } } return false; + } else if (property.startsWith("Triggered")) { + if (spellAbility instanceof SpellAbility) { + final String key = property.substring(9); + CardCollection cc = (CardCollection) ((SpellAbility)spellAbility).getTriggeringObject(AbilityKey.fromString(key)); + if (cc == null || !cc.contains(card)) { + return false; + } + } else { + return false; + } } else if (property.startsWith("NotTriggered")) { final String key = property.substring("NotTriggered".length()); if (spellAbility instanceof SpellAbility) { diff --git a/forge-game/src/main/java/forge/game/trigger/TriggerDiscardedAll.java b/forge-game/src/main/java/forge/game/trigger/TriggerDiscardedAll.java index c61f90e00fa..9c7feef3e6b 100644 --- a/forge-game/src/main/java/forge/game/trigger/TriggerDiscardedAll.java +++ b/forge-game/src/main/java/forge/game/trigger/TriggerDiscardedAll.java @@ -5,6 +5,7 @@ import java.util.Map; import forge.game.ability.AbilityKey; import forge.game.card.Card; import forge.game.card.CardCollection; +import forge.game.card.CardLists; import forge.game.spellability.SpellAbility; import forge.util.Localizer; @@ -22,6 +23,9 @@ public class TriggerDiscardedAll extends Trigger { if (!matchesValidParam("ValidCause", runParams.get(AbilityKey.Cause))) { return false; } + if (!matchesValidParam("ValidCard", runParams.get(AbilityKey.Cards))) { + return false; + } if (hasParam("FirstTime")) { if (!(boolean) runParams.get(AbilityKey.FirstTime)) { @@ -33,7 +37,11 @@ public class TriggerDiscardedAll extends Trigger { @Override public void setTriggeringObjects(SpellAbility sa, Map runParams) { - final CardCollection cards = (CardCollection) runParams.get(AbilityKey.Cards); + CardCollection cards = (CardCollection) runParams.get(AbilityKey.Cards); + + if (hasParam("ValidCard")) { + cards = CardLists.getValidCards(cards, getParam("ValidCard"), getHostCard().getController(), getHostCard(), this); + } sa.setTriggeringObject(AbilityKey.Cards, cards); sa.setTriggeringObject(AbilityKey.Amount, cards.size()); diff --git a/forge-game/src/main/java/forge/game/trigger/TriggerHandler.java b/forge-game/src/main/java/forge/game/trigger/TriggerHandler.java index 94fd70373c3..56e54db9180 100644 --- a/forge-game/src/main/java/forge/game/trigger/TriggerHandler.java +++ b/forge-game/src/main/java/forge/game/trigger/TriggerHandler.java @@ -560,13 +560,6 @@ public class TriggerHandler { host.addRemembered(triggeredCard); } - if (regtrig.hasParam("RememberTriggeringCards")) { - CardCollection triggeringCards = ((CardCollection) sa.getTriggeringObject(AbilityKey.Cards)); - for (Card c : triggeringCards) { - host.addRemembered(c); - } - } - if (regtrig.hasParam("RememberKey")) { host.addRemembered(runParams.get(AbilityKey.fromString(regtrig.getParam("RememberKey")))); } diff --git a/forge-gui/res/cardsfolder/a/animating_faerie_bring_to_life.txt b/forge-gui/res/cardsfolder/a/animating_faerie_bring_to_life.txt index e685fda8d95..8d8f5d59e7a 100644 --- a/forge-gui/res/cardsfolder/a/animating_faerie_bring_to_life.txt +++ b/forge-gui/res/cardsfolder/a/animating_faerie_bring_to_life.txt @@ -11,7 +11,7 @@ ALTERNATE Name:Bring to Life ManaCost:2 U Types:Sorcery Adventure -A:SP$ Animate | Cost$ 2 U | ValidTgts$ Artifact.nonCreature+YouCtrl | TgtPrompt$ Select noncreature artifact | Power$ 0 | Toughness$ 0 | Types$ Artifact,Creature | RemoveCardTypes$ True | Duration$ Permanent | SubAbility$ DBPutCounter | SpellDescription$ Target noncreature artifact you control becomes a 0/0 artifact creature. Put four +1/+1 counters on it. +A:SP$ Animate | Cost$ 2 U | ValidTgts$ Artifact.nonCreature+YouCtrl | TgtPrompt$ Select noncreature artifact | Power$ 0 | Toughness$ 0 | Types$ Artifact,Creature | Duration$ Permanent | SubAbility$ DBPutCounter | SpellDescription$ Target noncreature artifact you control becomes a 0/0 artifact creature. Put four +1/+1 counters on it. SVar:DBPutCounter:DB$ PutCounter | Defined$ Targeted | CounterType$ P1P1 | CounterNum$ 4 DeckHas:Ability$Counters Oracle:Target noncreature artifact you control becomes a 0/0 artifact creature. Put four +1/+1 counters on it. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/a/ashnods_transmogrant.txt b/forge-gui/res/cardsfolder/a/ashnods_transmogrant.txt index 47faf4196bc..d22d660af29 100644 --- a/forge-gui/res/cardsfolder/a/ashnods_transmogrant.txt +++ b/forge-gui/res/cardsfolder/a/ashnods_transmogrant.txt @@ -2,6 +2,6 @@ Name:Ashnod's Transmogrant ManaCost:1 Types:Artifact A:AB$ PutCounter | Cost$ T Sac<1/CARDNAME> | ValidTgts$ Creature.nonArtifact | TgtPrompt$ Select target nonartifact creature | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DBAnimate | SpellDescription$ Put a +1/+1 counter on target nonartifact creature. That creature becomes an artifact in addition to its other types. -SVar:DBAnimate:DB$Animate | Defined$ Targeted | Types$ Artifact | Duration$ Permanent +SVar:DBAnimate:DB $Animate | Defined$ Targeted | Types$ Artifact | Duration$ Permanent SVar:Picture:http://www.wizards.com/global/images/magic/general/ashnods_transmogrant.jpg Oracle:{T}, Sacrifice Ashnod's Transmogrant: Put a +1/+1 counter on target nonartifact creature. That creature becomes an artifact in addition to its other types. diff --git a/forge-gui/res/cardsfolder/c/conspiracy_theorist.txt b/forge-gui/res/cardsfolder/c/conspiracy_theorist.txt index 893da1c8089..c1434492381 100644 --- a/forge-gui/res/cardsfolder/c/conspiracy_theorist.txt +++ b/forge-gui/res/cardsfolder/c/conspiracy_theorist.txt @@ -4,10 +4,9 @@ Types:Creature Human Shaman PT:2/2 T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ Whenever CARDNAME attacks, you may pay {1} and discard a card. If you do, draw a card. SVar:TrigDraw:AB$ Draw | Cost$ 1 Discard<1/Card> -T:Mode$ DiscardedAll | ValidPlayer$ You | ValidCard$ Card.nonLand | TriggerZones$ Battlefield | Execute$ TrigEffect | RememberTriggeringCards$ True | TriggerDescription$ Whenever you discard one or more nonland cards, you may exile one of them from your graveyard. If you do, you may cast it this turn. -SVar:TrigEffect:AB$ Effect | Cost$ ExileFromGrave<1/Card.IsRemembered> | RememberObjects$ ExiledCards | StaticAbilities$ MayCast | ExileOnMoved$ Stack | SubAbility$ DBCleanup +T:Mode$ DiscardedAll | ValidPlayer$ You | ValidCard$ Card.nonLand | TriggerZones$ Battlefield | Execute$ TrigEffect | TriggerDescription$ Whenever you discard one or more nonland cards, you may exile one of them from your graveyard. If you do, you may cast it this turn. +SVar:TrigEffect:AB$ Effect | Cost$ ExileFromGrave<1/Card.TriggeredCards> | RememberObjects$ ExiledCards | StaticAbilities$ MayCast | ExileOnMoved$ Stack SVar:MayCast:Mode$ Continuous | Affected$ Card.IsRemembered | MayPlay$ True | EffectZone$ Command | AffectedZone$ Exile | Description$ You may cast this spell this turn. -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:HasAttackEffect:TRUE DeckHas:Ability$Discard Oracle:Whenever Conspiracy Theorist attacks, you may pay {1} and discard a card. If you do, draw a card.\nWhenever you discard one or more nonland cards, you may exile one of them from your graveyard. If you do, you may cast it this turn. diff --git a/forge-gui/res/cardsfolder/e/ensouled_scimitar.txt b/forge-gui/res/cardsfolder/e/ensouled_scimitar.txt index 8043d78f817..fd1bf5b9f1f 100644 --- a/forge-gui/res/cardsfolder/e/ensouled_scimitar.txt +++ b/forge-gui/res/cardsfolder/e/ensouled_scimitar.txt @@ -2,7 +2,7 @@ Name:Ensouled Scimitar ManaCost:3 Types:Artifact Equipment K:Equip:2 -A:AB$ Animate | Cost$ 3 | Defined$ Self | Power$ 1 | Toughness$ 5 | Types$ Creature,Artifact,Spirit | Keywords$ Flying | RemoveCardTypes$ True | RemoveCreatureTypes$ True | SpellDescription$ CARDNAME becomes a 1/5 Spirit artifact creature with flying until end of turn. (Equipment that's a creature can't equip a creature.) +A:AB$ Animate | Cost$ 3 | Defined$ Self | Power$ 1 | Toughness$ 5 | Types$ Creature,Artifact,Spirit | Keywords$ Flying | RemoveCreatureTypes$ True | SpellDescription$ CARDNAME becomes a 1/5 Spirit artifact creature with flying until end of turn. (Equipment that's a creature can't equip a creature.) S:Mode$ Continuous | Affected$ Card.EquippedBy | AddPower$ 1 | AddToughness$ 5 | Description$ Equipped creature gets +1/+5. SVar:Picture:http://www.wizards.com/global/images/magic/general/ensouled_scimitar.jpg Oracle:{3}: Ensouled Scimitar becomes a 1/5 Spirit artifact creature with flying until end of turn. (Equipment that's a creature can't equip a creature.)\nEquipped creature gets +1/+5.\nEquip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) diff --git a/forge-gui/res/cardsfolder/o/opal_acrolith.txt b/forge-gui/res/cardsfolder/o/opal_acrolith.txt index fe92787a47e..840eda505e5 100644 --- a/forge-gui/res/cardsfolder/o/opal_acrolith.txt +++ b/forge-gui/res/cardsfolder/o/opal_acrolith.txt @@ -3,7 +3,7 @@ ManaCost:2 W Types:Enchantment T:Mode$ SpellCast | ValidCard$ Creature | ValidActivatingPlayer$ Opponent | TriggerZones$ Battlefield | IsPresent$ Card.Self+Enchantment | Execute$ TrigAnimate | TriggerDescription$ When an opponent casts a creature spell, if CARDNAME is an enchantment, CARDNAME becomes a 2/4 Soldier creature. A:AB$ Animate | Cost$ 0 | Defined$ Self | Types$ Enchantment | RemoveCardTypes$ True | Duration$ Permanent | SpellDescription$ CARDNAME becomes an enchantment. -SVar:TrigAnimate:DB$Animate | Defined$ Self | Power$ 2 | Toughness$ 4 | Types$ Creature,Soldier | RemoveCardTypes$ True | Duration$ Permanent +SVar:TrigAnimate:DB$ Animate | Defined$ Self | Power$ 2 | Toughness$ 4 | Types$ Creature,Soldier | RemoveCardTypes$ True | Duration$ Permanent AI:RemoveDeck:All SVar:Picture:http://www.wizards.com/global/images/magic/general/opal_acrolith.jpg Oracle:Whenever an opponent casts a creature spell, if Opal Acrolith is an enchantment, Opal Acrolith becomes a 2/4 Soldier creature.\n{0}: Opal Acrolith becomes an enchantment.