From 059fb54559014c243b2084cfcc1af04429f97c7b Mon Sep 17 00:00:00 2001 From: swordshine Date: Fri, 5 Apr 2013 09:28:20 +0000 Subject: [PATCH] - Added Dual Nature --- .gitattributes | 1 + res/cardsfolder/d/dual_nature.txt | 15 +++++++++++++++ .../card/ability/effects/CopyPermanentEffect.java | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 res/cardsfolder/d/dual_nature.txt diff --git a/.gitattributes b/.gitattributes index 3106f7ab150..5b66f62e5b6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2927,6 +2927,7 @@ res/cardsfolder/d/dryad_sophisticate.txt svneol=native#text/plain res/cardsfolder/d/dryads_caress.txt -text res/cardsfolder/d/dryads_favor.txt svneol=native#text/plain res/cardsfolder/d/dual_casting.txt -text +res/cardsfolder/d/dual_nature.txt -text res/cardsfolder/d/duct_crawler.txt svneol=native#text/plain res/cardsfolder/d/due_respect.txt -text res/cardsfolder/d/dueling_grounds.txt svneol=native#text/plain diff --git a/res/cardsfolder/d/dual_nature.txt b/res/cardsfolder/d/dual_nature.txt new file mode 100644 index 00000000000..a461b433b29 --- /dev/null +++ b/res/cardsfolder/d/dual_nature.txt @@ -0,0 +1,15 @@ +Name:Dual Nature +ManaCost:4 G G +Types:Enchantment +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.nonToken | TriggerZones$ Battlefield | Execute$ TrigDualCopy | TriggerDescription$ Whenever a nontoken creature enters the battlefield, its controller puts a token that's a copy of that creature onto the battlefield. +SVar:TrigDualCopy:AB$ CopyPermanent | Cost$ 0 | Defined$ TriggeredCard | Controller$ TriggeredCardController | RememberCopied$ True +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Creature.nonToken | TriggerZones$ Battlefield | Execute$ TrigDualExile | TriggerDescription$ Whenever a nontoken creature leaves the battlefield, exile all tokens with the same name as that creature. +SVar:TrigDualExile:AB$ ChangeZoneAll | Cost$ 0 | ChangeType$ Triggered.sameName+token | Origin$ Battlefield | Destination$ Exile +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigDualExileAll | TriggerDescription$ When CARDNAME leaves the battlefield, exile all tokens put onto the battlefield with CARDNAME. +SVar:TrigDualExileAll:AB$ ChangeZoneAll | Cost$ 0 | ChangeType$ Card.IsRemembered | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.IsRemembered | TriggerZones$ Battlefield | Execute$ TrigForget | Static$ True +SVar:TrigForget:DB$ Pump | ForgetObjects$ TriggeredCard +SVar:Picture:http://www.wizards.com/global/images/magic/general/dual_nature.jpg +Oracle:Whenever a nontoken creature enters the battlefield, its controller puts a token that's a copy of that creature onto the battlefield.\nWhenever a nontoken creature leaves the battlefield, exile all tokens with the same name as that creature.\nWhen Dual Nature leaves the battlefield, exile all tokens put onto the battlefield with Dual Nature. +SetInfo:PCY Rare \ No newline at end of file diff --git a/src/main/java/forge/card/ability/effects/CopyPermanentEffect.java b/src/main/java/forge/card/ability/effects/CopyPermanentEffect.java index f9cdecb4a34..a3782875067 100644 --- a/src/main/java/forge/card/ability/effects/CopyPermanentEffect.java +++ b/src/main/java/forge/card/ability/effects/CopyPermanentEffect.java @@ -229,6 +229,9 @@ public class CopyPermanentEffect extends SpellAbilityEffect { copy.setCloneOrigin(hostCard); sa.getSourceCard().addClone(copy); crds[i] = copy; + if (sa.hasParam("RememberCopied")) { + hostCard.addRemembered(copy); + } } if (wasInAlt) {