From 3bda945ac35e23d4598d39bab016e06266b5e75e Mon Sep 17 00:00:00 2001 From: Sloth Date: Sun, 16 Sep 2012 21:38:04 +0000 Subject: [PATCH] - Added Cytoplast Root-Kin. --- .gitattributes | 1 + res/cardsfolder/c/cytoplast_root_kin.txt | 15 ++++++++++++ .../AbilityFactoryCounters.java | 24 ++++++++++++------- 3 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 res/cardsfolder/c/cytoplast_root_kin.txt diff --git a/.gitattributes b/.gitattributes index 9ae65fac41e..7bdd9237c39 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2022,6 +2022,7 @@ res/cardsfolder/c/cylian_elf.txt svneol=native#text/plain res/cardsfolder/c/cylian_sunsinger.txt svneol=native#text/plain res/cardsfolder/c/cystbearer.txt svneol=native#text/plain res/cardsfolder/c/cytoplast_manipulator.txt -text +res/cardsfolder/c/cytoplast_root_kin.txt -text res/cardsfolder/c/cytospawn_shambler.txt -text res/cardsfolder/d/daggerback_basilisk.txt svneol=native#text/plain res/cardsfolder/d/daggerclaw_imp.txt svneol=native#text/plain diff --git a/res/cardsfolder/c/cytoplast_root_kin.txt b/res/cardsfolder/c/cytoplast_root_kin.txt new file mode 100644 index 00000000000..33179f512d4 --- /dev/null +++ b/res/cardsfolder/c/cytoplast_root_kin.txt @@ -0,0 +1,15 @@ +Name:Cytoplast Root-Kin +ManaCost:2 G G +Types:Creature Elemental Mutant +Text:no text +PT:0/0 +K:Graft 4 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounterAll | TriggerDescription$ When CARDNAME enters the battlefield, put a +1/+1 counter on each other creature you control that has a +1/+1 counter on it. +SVar:TrigPutCounterAll:DB$ PutCounterAll | ValidCards$ Creature.Other+YouCtrl+counters_GE1_P1P1 | CounterType$ P1P1 | CounterNum$ 1 +A:AB$ MoveCounter | Cost$ 1 | Defined$ Self | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Move a +1/+1 counter from target creature you control onto CARDNAME. +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/cytoplast_root_kin.jpg +SetInfo:DIS|Rare|http://magiccards.info/scans/en/di/81.jpg +Oracle:Graft 4 (This creature enters the battlefield with four +1/+1 counters on it. Whenever another creature enters the battlefield, you may move a +1/+1 counter from this creature onto it.)\nWhen Cytoplast Root-Kin enters the battlefield, put a +1/+1 counter on each other creature you control that has a +1/+1 counter on it.\n{2}: Move a +1/+1 counter from target creature you control onto Cytoplast Root-Kin. +End \ No newline at end of file diff --git a/src/main/java/forge/card/abilityfactory/AbilityFactoryCounters.java b/src/main/java/forge/card/abilityfactory/AbilityFactoryCounters.java index 05ba0ba7700..894489e2fd7 100644 --- a/src/main/java/forge/card/abilityfactory/AbilityFactoryCounters.java +++ b/src/main/java/forge/card/abilityfactory/AbilityFactoryCounters.java @@ -2435,15 +2435,19 @@ public class AbilityFactoryCounters { sb.append(sa.getSourceCard().getName()).append(" - "); } - final ArrayList srcCards = AbilityFactory.getDefinedCards(host, params.get("Source"), sa); Card source = null; + ArrayList srcCards; + final Target tgt = sa.getTarget(); + if (!params.containsKey("Source") && tgt != null) { + srcCards = tgt.getTargetCards(); + } else { + srcCards = AbilityFactory.getDefinedCards(host, params.get("Source"), sa); + } if (srcCards.size() > 0) { source = srcCards.get(0); } - ArrayList tgtCards; - final Target tgt = sa.getTarget(); - if (tgt != null) { + if (!params.containsKey("Defined") && tgt != null) { tgtCards = tgt.getTargetCards(); } else { tgtCards = AbilityFactory.getDefinedCards(host, params.get("Defined"), sa); @@ -2655,15 +2659,19 @@ public class AbilityFactoryCounters { final Counters cType = Counters.valueOf(params.get("CounterType")); final int amount = AbilityFactory.calculateAmount(sa.getSourceCard(), params.get("CounterNum"), sa); - final ArrayList srcCards = AbilityFactory.getDefinedCards(host, params.get("Source"), sa); Card source = null; + ArrayList srcCards; + final Target tgt = sa.getTarget(); + if (!params.containsKey("Source") && tgt != null) { + srcCards = tgt.getTargetCards(); + } else { + srcCards = AbilityFactory.getDefinedCards(host, params.get("Source"), sa); + } if (srcCards.size() > 0) { source = srcCards.get(0); } - ArrayList tgtCards; - final Target tgt = sa.getTarget(); - if (tgt != null) { + if (!params.containsKey("Defined") && tgt != null) { tgtCards = tgt.getTargetCards(); } else { tgtCards = AbilityFactory.getDefinedCards(host, params.get("Defined"), sa);