diff --git a/res/cardsfolder/c/cauldron_dance.txt b/res/cardsfolder/c/cauldron_dance.txt index bc5077a6fde..dd3d3e0a366 100644 --- a/res/cardsfolder/c/cauldron_dance.txt +++ b/res/cardsfolder/c/cauldron_dance.txt @@ -3,11 +3,11 @@ ManaCost:4 B R Types:Instant Text:no text A:SP$ ChangeZone | Cost$ 4 B R | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature from your graveyard | ActivationPhases$ BeginCombat->EndCombat | SubAbility$ DBAnimate | SpellDescription$ Cast CARDNAME only during combat. Return target creature card from your graveyard to the battlefield. That creature gains haste. Return it to your hand at the beginning of the next end step. You may put a creature card from your hand onto the battlefield. That creature gains haste. Its controller sacrifices it at the beginning of the next end step. -SVar:DBAnimate:DB$ Animate | Defined$ Targeted | Keywords$ HIDDEN Haste | Triggers$ TrigBounce | sVars$ TrigReturn | SubAbility$ DBChangeZone +SVar:DBAnimate:DB$ Animate | Defined$ Targeted | Keywords$ Haste | Triggers$ TrigBounce | sVars$ TrigReturn | SubAbility$ DBChangeZone SVar:TrigBounce:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | Execute$ TrigReturn | TriggerDescription$ At the beginning of the next end step, return CARDNAME to its owner's hand. SVar:TrigReturn:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Battlefield | Destination$ Hand SVar:DBChangeZone:DB$ ChangeZone | Origin$ Hand | Destination$ Battlefield | OptionalDecider$ You | ChangeType$ Creature | ChangeNum$ 1 | RememberChanged$ True | ForgetOtherRemembered$ True | SubAbility$ DBAnimate2 -SVar:DBAnimate2:DB$ Animate | Defined$ Remembered | Keywords$ HIDDEN Haste | Triggers$ TrigSacrifice | sVars$ TrigSac +SVar:DBAnimate2:DB$ Animate | Defined$ Remembered | Keywords$ Haste | Triggers$ TrigSacrifice | sVars$ TrigSac SVar:TrigSacrifice:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ At the beginning of the next end step, sacrifice CARDNAME. SVar:TrigSac:AB$ Sacrifice | Cost$ 0 | Defined$ Self | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True diff --git a/res/cardsfolder/c/creeping_tar_pit.txt b/res/cardsfolder/c/creeping_tar_pit.txt index c3d77b52c91..1e3ff8bdfd2 100644 --- a/res/cardsfolder/c/creeping_tar_pit.txt +++ b/res/cardsfolder/c/creeping_tar_pit.txt @@ -5,7 +5,7 @@ Text:no text K:CARDNAME enters the battlefield tapped. A:AB$ Mana | Cost$ T | Produced$ U | SpellDescription$ Add U to your mana pool. A:AB$ Mana | Cost$ T | Produced$ B | SpellDescription$ Add B to your mana pool. -A:AB$ Animate | Cost$ 1 U B | Defined$ Self | Power$ 3 | Toughness$ 2 | Types$ Creature,Elemental | Colors$ Blue,Black | Keywords$ HIDDEN Unblockable | SpellDescription$ Until end of turn, CARDNAME becomes a 3/2 blue and black Elemental creature and is unblockable. It's still a land. +A:AB$ Animate | Cost$ 1 U B | Defined$ Self | Power$ 3 | Toughness$ 2 | Types$ Creature,Elemental | Colors$ Blue,Black | HiddenKeywords$ HIDDEN Unblockable | SpellDescription$ Until end of turn, CARDNAME becomes a 3/2 blue and black Elemental creature and is unblockable. It's still a land. SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/creeping_tar_pit.jpg SetInfo:WWK|Rare|http://magiccards.info/scans/en/wwk/134.jpg diff --git a/res/cardsfolder/g/genju_of_the_fields.txt b/res/cardsfolder/g/genju_of_the_fields.txt index 0b7248b5765..34ce39334ad 100644 --- a/res/cardsfolder/g/genju_of_the_fields.txt +++ b/res/cardsfolder/g/genju_of_the_fields.txt @@ -4,12 +4,12 @@ Types:Enchantment Aura Text:no text K:Enchant Plains A:SP$ Attach | Cost$ W | ValidTgts$ Plains | AILogic$ Pump -A:AB$ Animate | Cost$ 2 | Defined$ Enchanted | Power$ 2 | Toughness$ 5 | Types$ Creature,Spirit | Colors$ White | Triggers$ PseudoLifelink | sVars$ TrigGain,X | SpellDescription$ Until end of turn, enchanted Plains becomes a 2/5 white Spirit creature with "Whenever this creature deals damage, its controller gains that much life." It's still a land. +A:AB$ Animate | Cost$ 2 | Defined$ Enchanted | Power$ 2 | Toughness$ 5 | Types$ Creature,Spirit | Colors$ White | Triggers$ PseudoLifelink | sVars$ GenjuTrigGain,GenjuX | SpellDescription$ Until end of turn, enchanted Plains becomes a 2/5 white Spirit creature with "Whenever this creature deals damage, its controller gains that much life." It's still a land. T:Mode$ ChangesZone | ValidCard$ Card.AttachedBy | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Battlefield | Execute$ TrigReturnOwner | OptionalDecider$ You | TriggerDescription$ When enchanted Plains is put into a graveyard, you may return CARDNAME from your graveyard to your hand. SVar:TrigReturnOwner:AB$ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Graveyard | Destination$ Hand -SVar:PseudoLifelink:Mode$ DamageDone | ValidSource$ Card.Self | Execute$ TrigGain | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals damage, you gain that much life. -SVar:TrigGain:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X -SVar:X:TriggerCount$DamageAmount +SVar:PseudoLifelink:Mode$ DamageDone | ValidSource$ Card.Self | Execute$ GenjuTrigGain | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals damage, you gain that much life. +SVar:GenjuTrigGain:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ GenjuX +SVar:GenjuX:TriggerCount$DamageAmount SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/genju_of_the_fields.jpg SetInfo:BOK|Uncommon|http://magiccards.info/scans/en/bok/5.jpg diff --git a/res/cardsfolder/g/genju_of_the_realm.txt b/res/cardsfolder/g/genju_of_the_realm.txt index b4cb2bca02d..c032edf9158 100644 --- a/res/cardsfolder/g/genju_of_the_realm.txt +++ b/res/cardsfolder/g/genju_of_the_realm.txt @@ -3,9 +3,6 @@ ManaCost:W U B R G Types:Legendary Enchantment Aura Text:no text K:Enchant land -# This doesn't work because I think abilities are added before CardFactory is processed, which clears this ability. Same problem as Caribou Range. -# Interestingly enough, the trigger works -# The note above may now be out of date as this card has been converted to AF_Attach. A:SP$ Attach | Cost$ W U B R G | ValidTgts$ Land | AILogic$ Pump A:AB$ Animate | Cost$ 2 | Defined$ Enchanted | Power$ 8 | Toughness$ 12 | Types$ Creature,Legendary,Spirit | Keywords$ Trample | SpellDescription$ Enchanted land becomes a legendary 8/12 Spirit creature with trample until end of turn. It's still a land. T:Mode$ ChangesZone | ValidCard$ Card.AttachedBy | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Battlefield | Execute$ TrigReturnOwner | OptionalDecider$ You | TriggerDescription$ When enchanted land is put into a graveyard, you may return CARDNAME from your graveyard to your hand. diff --git a/res/cardsfolder/g/graven_dominator.txt b/res/cardsfolder/g/graven_dominator.txt index b1e67d23be3..4f34a61d7f2 100644 --- a/res/cardsfolder/g/graven_dominator.txt +++ b/res/cardsfolder/g/graven_dominator.txt @@ -6,7 +6,8 @@ PT:4/4 K:Flying K:Haunt:TrigAnimate:Each other creature becomes 1/1 until end of turn. SVar:TrigAnimate:AB$AnimateAll | Cost$ 0 | ValidCards$ Creature.Other | SetPower$ 1 | SetToughness$ 1 -Oracle:Flying\nHaunt (When this creature dies, exile it haunting target creature.)\nWhen Graven Dominator enters the battlefield or the creature it haunts dies, each other creature becomes 1/1 until end of turn. +SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/graven_dominator.jpg SetInfo:GPT|Rare|http://magiccards.info/scans/en/gp/7.jpg +Oracle:Flying\nHaunt (When this creature dies, exile it haunting target creature.)\nWhen Graven Dominator enters the battlefield or the creature it haunts dies, each other creature becomes 1/1 until end of turn. End \ No newline at end of file diff --git a/res/cardsfolder/p/phyrexian_totem.txt b/res/cardsfolder/p/phyrexian_totem.txt index 3a5c1c59d56..02bf651f40e 100644 --- a/res/cardsfolder/p/phyrexian_totem.txt +++ b/res/cardsfolder/p/phyrexian_totem.txt @@ -4,7 +4,7 @@ Types:Artifact Text:no text A:AB$ Mana | Cost$ T | Produced$ B | Amount$ 1 | SpellDescription$ Add B to your mana pool. A:AB$ Animate | Cost$ 2 B | Defined$ Self | Power$ 5 | Toughness$ 5 | Types$ Creature,Artifact,Horror | Colors$ Black | Keywords$ Trample | SpellDescription$ CARDNAME becomes a 5/5 black Horror artifact creature with trample until end of turn. -T:Mode$ DamageDone | ValidSource$ Creature | ValidTarget$ Card.Self | Execute$ TrigSac | TriggerDescription$ Whenever CARDNAME is dealt damage, if it's a creature, sacrifice that many permanents. +T:Mode$ DamageDone | ValidTarget$ Creature.Self | Execute$ TrigSac | TriggerDescription$ Whenever CARDNAME is dealt damage, if it's a creature, sacrifice that many permanents. SVar:TrigSac:AB$Sacrifice | Cost$ 0 | SacValid$ Permanent | Amount$ X SVar:X:TriggerCount$DamageAmount SVar:RemAIDeck:True diff --git a/res/cardsfolder/r/riverfall_mimic.txt b/res/cardsfolder/r/riverfall_mimic.txt index 925b11a9351..2b440061c61 100644 --- a/res/cardsfolder/r/riverfall_mimic.txt +++ b/res/cardsfolder/r/riverfall_mimic.txt @@ -4,7 +4,7 @@ Types:Creature Shapeshifter Text:no text PT:2/1 T:Mode$ SpellCast | ValidCard$ Card.Blue+Red | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigAnimate | TriggerDescription$ Whenever you cast a spell that's both blue and red, CARDNAME becomes 3/3 and is unblockable until end of turn. -SVar:TrigAnimate:AB$Animate | Cost$ 0 | Defined$ Self | Power$ 3 | Toughness$ 3 | Keywords$ HIDDEN Unblockable +SVar:TrigAnimate:AB$Animate | Cost$ 0 | Defined$ Self | Power$ 3 | Toughness$ 3 | HiddenKeywords$ HIDDEN Unblockable SVar:BuffedBy:Card.Blue+Red SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/riverfall_mimic.jpg diff --git a/res/cardsfolder/v/veiled_serpent.txt b/res/cardsfolder/v/veiled_serpent.txt index ca3b608f19b..2ff8b5a2854 100644 --- a/res/cardsfolder/v/veiled_serpent.txt +++ b/res/cardsfolder/v/veiled_serpent.txt @@ -3,7 +3,7 @@ ManaCost:2 U Types:Enchantment Text:no text T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ Opponent | TriggerZones$ Battlefield | IsPresent$ Card.Self+Enchantment | Execute$ TrigAnimate | TriggerDescription$ When an opponent casts a spell, if CARDNAME is an enchantment, CARDNAME becomes a 4/4 Serpent creature that can't attack unless defending player controls an Island. -SVar:TrigAnimate:AB$Animate | Cost$ 0 | Defined$ Self | Power$ 4 | Toughness$ 4 | Keywords$ HIDDEN CARDNAME can't attack unless defending player controls an Island. | Types$ Creature,Serpent | OverwriteTypes$ True | Permanent$ True +SVar:TrigAnimate:AB$Animate | Cost$ 0 | Defined$ Self | Power$ 4 | Toughness$ 4 | HiddenKeywords$ HIDDEN CARDNAME can't attack unless defending player controls an Island. | Types$ Creature,Serpent | OverwriteTypes$ True | Permanent$ True K:Cycling:2 SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/veiled_serpent.jpg diff --git a/src/main/java/forge/card/abilityFactory/AbilityFactory_Animate.java b/src/main/java/forge/card/abilityFactory/AbilityFactory_Animate.java index ac3be2ee4b0..c89bc0f9eb4 100644 --- a/src/main/java/forge/card/abilityFactory/AbilityFactory_Animate.java +++ b/src/main/java/forge/card/abilityFactory/AbilityFactory_Animate.java @@ -494,6 +494,11 @@ public final class AbilityFactory_Animate { if (params.containsKey("Keywords")) { keywords.addAll(Arrays.asList(params.get("Keywords").split(" & "))); } + + final ArrayList hiddenKeywords = new ArrayList(); + if (params.containsKey("HiddenKeywords")) { + hiddenKeywords.addAll(Arrays.asList(params.get("HiddenKeywords").split(" & "))); + } // allow SVar substitution for keywords for (int i = 0; i < keywords.size(); i++) { String k = keywords.get(i); @@ -551,7 +556,7 @@ public final class AbilityFactory_Animate { for (final Card c : tgts) { final long colorTimestamp = doAnimate(c, af, power, toughness, types, removeTypes, finalDesc, keywords, - timestamp); + hiddenKeywords, timestamp); // give abilities final ArrayList addedAbilities = new ArrayList(); @@ -619,7 +624,7 @@ public final class AbilityFactory_Animate { private static final long serialVersionUID = -5861759814760561373L; public void execute() { - doUnanimate(c, af, finalDesc, keywords, addedAbilities, addedTriggers, colorTimestamp, givesStAbs, + doUnanimate(c, af, finalDesc, hiddenKeywords, addedAbilities, addedTriggers, colorTimestamp, givesStAbs, removedAbilities, timestamp); // give back suppressed triggers @@ -666,7 +671,7 @@ public final class AbilityFactory_Animate { */ private static long doAnimate(final Card c, final AbilityFactory af, final int power, final int toughness, final ArrayList types, final ArrayList removeTypes, final String colors, - final ArrayList keywords, final long timestamp) { + final ArrayList keywords, final ArrayList hiddenKeywords, final long timestamp) { HashMap params = af.getMapParams(); boolean removeSuperTypes = false; @@ -713,18 +718,11 @@ public final class AbilityFactory_Animate { c.addChangedCardTypes(types, removeTypes, removeSuperTypes, removeCardTypes, removeSubTypes, removeCreatureTypes, timestamp); } - - for (String k : keywords) { - if (k.startsWith("HIDDEN")) { - c.addExtrinsicKeyword(k); - } - // this maybe should just blindly add since multiple instances of a - // keyword sometimes have effects - // practically, this shouldn't matter though, and will display more - // cleanly - else if (!c.getIntrinsicKeyword().contains(k) || CardUtil.isStackingKeyword(k)) { - c.addIntrinsicKeyword(k); - } + + c.addChangedCardKeywords(keywords, null, params.containsKey("RemoveAllAbilities"), timestamp); + + for (String k : hiddenKeywords) { + c.addExtrinsicKeyword(k); } long colorTimestamp = c.addColor(colors, c, !params.containsKey("OverwriteColors"), true); @@ -756,12 +754,14 @@ public final class AbilityFactory_Animate { * a long. */ private static void doUnanimate(final Card c, final AbilityFactory af, final String colorDesc, - final ArrayList originalKeywords, final ArrayList addedAbilities, + final ArrayList addedKeywords, final ArrayList addedAbilities, final ArrayList addedTriggers, final long colorTimestamp, final boolean givesStAbs, final ArrayList removedAbilities, final long timestamp) { HashMap params = af.getMapParams(); c.removeNewPT(timestamp); + + c.removeChangedCardKeywords(timestamp); // remove all static abilities if (givesStAbs) { @@ -775,13 +775,8 @@ public final class AbilityFactory_Animate { c.removeColor(colorDesc, c, !params.containsKey("OverwriteColors"), colorTimestamp); - for (String k : originalKeywords) { - if (k.startsWith("HIDDEN")) { - c.removeExtrinsicKeyword(k); - } - // TODO - may want to look at saving off intrinsic and extrinsic - // separately and add back that way - c.removeIntrinsicKeyword(k); + for (String k : addedKeywords) { + c.removeExtrinsicKeyword(k); } for (SpellAbility sa : addedAbilities) { @@ -1074,6 +1069,11 @@ public final class AbilityFactory_Animate { if (params.containsKey("Keywords")) { keywords.addAll(Arrays.asList(params.get("Keywords").split(" & "))); } + + final ArrayList hiddenKeywords = new ArrayList(); + if (params.containsKey("HiddenKeywords")) { + hiddenKeywords.addAll(Arrays.asList(params.get("HiddenKeywords").split(" & "))); + } // allow SVar substitution for keywords for (int i = 0; i < keywords.size(); i++) { String k = keywords.get(i); @@ -1141,7 +1141,7 @@ public final class AbilityFactory_Animate { for (final Card c : list) { final long colorTimestamp = doAnimate(c, af, power, toughness, types, removeTypes, finalDesc, keywords, - timestamp); + hiddenKeywords, timestamp); // give abilities final ArrayList addedAbilities = new ArrayList(); @@ -1188,7 +1188,7 @@ public final class AbilityFactory_Animate { private static final long serialVersionUID = -5861759814760561373L; public void execute() { - doUnanimate(c, af, finalDesc, keywords, addedAbilities, addedTriggers, colorTimestamp, false, + doUnanimate(c, af, finalDesc, hiddenKeywords, addedAbilities, addedTriggers, colorTimestamp, false, removedAbilities, timestamp); } };