From d9d44f2c83b425b13f98e9eadc3e0d14e9316ece Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Thu, 19 Jan 2012 23:45:41 +0000 Subject: [PATCH] - Added Zedruu the Greathearted. --- .gitattributes | 1 + res/cardsfolder/z/zedruu_the_greathearted.txt | 13 +++++ .../cardfactory/CardFactoryCreatures.java | 49 +++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 res/cardsfolder/z/zedruu_the_greathearted.txt diff --git a/.gitattributes b/.gitattributes index 6c5b9299b70..d4f5f45867e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9914,6 +9914,7 @@ res/cardsfolder/z/zealots_en_dal.txt svneol=native#text/plain res/cardsfolder/z/zealous_guardian.txt svneol=native#text/plain res/cardsfolder/z/zealous_persecution.txt svneol=native#text/plain res/cardsfolder/z/zebra_unicorn.txt svneol=native#text/plain +res/cardsfolder/z/zedruu_the_greathearted.txt -text svneol=unset#text/plain res/cardsfolder/z/zektar_shrine_expedition.txt svneol=native#text/plain res/cardsfolder/z/zelyon_sword.txt svneol=native#text/plain res/cardsfolder/z/zendikar_farguide.txt svneol=native#text/plain diff --git a/res/cardsfolder/z/zedruu_the_greathearted.txt b/res/cardsfolder/z/zedruu_the_greathearted.txt new file mode 100644 index 00000000000..a3c39581497 --- /dev/null +++ b/res/cardsfolder/z/zedruu_the_greathearted.txt @@ -0,0 +1,13 @@ +Name:Zedruu the Greathearted +ManaCost:1 R W U +Types:Legendary Creature Minotaur Monk +Text:R W U:Target opponent gains control of target permanent you control. +PT:2/4 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ GainLife | TriggerDescription$ At the beginning of your upkeep, you gain X life and draw X cards, where X is the number of permanents you own that your opponents control. +SVar:GainLife:AB$ GainLife | Cost$ 0 | LifeAmount$ X | SubAbility$ DBDraw +SVar:DBDraw:DB$ Draw | NumCards$ X +SVar:X:Count$Valid Permanent.YouOwn+OwnerDoesntControl +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/zedruu_the_greathearted.jpg +End \ No newline at end of file diff --git a/src/main/java/forge/card/cardfactory/CardFactoryCreatures.java b/src/main/java/forge/card/cardfactory/CardFactoryCreatures.java index e82530007b0..16b242ae458 100644 --- a/src/main/java/forge/card/cardfactory/CardFactoryCreatures.java +++ b/src/main/java/forge/card/cardfactory/CardFactoryCreatures.java @@ -2560,6 +2560,55 @@ public class CardFactoryCreatures { card.addComesIntoPlayCommand(comesIntoPlay); } // *************** END ************ END ************************** + + // *************** START *********** START ************************** + + else if (cardName.equals("Zedruu the Greathearted")) { + + final Target player = new Target(card, "Select target opponent", "Opponent".split(",")); + final AbilitySub sub = new AbilitySub(card, player) { + private static final long serialVersionUID = -8926850792424944054L; + + @Override + public boolean chkAIDrawback() { + return false; + } + + @Override + public void resolve() { + final Card permanent = this.getParent().getTargetCard(); + final Player opp = this.getTargetPlayer(); + permanent.addController(opp); + } + + @Override + public boolean doTrigger(final boolean b) { + return false; + } + }; + + final Cost abCost = new Cost("R W U", cardName, true); + final Target permanent = new Target(card, "Select target permanent you control", "Permanent.YouCtrl".split(",")); + final AbilityActivated ability = new AbilityActivated(card, abCost, permanent) { + private static final long serialVersionUID = 3818522482220103914L; + + @Override + public boolean canPlayAI() { + return false; + } + + @Override + public void resolve() { + sub.resolve(); + } + }; + ability.setSubAbility(sub); + final StringBuilder sb = new StringBuilder(); + sb.append(cardName); + sb.append(" Target opponent gains control of target permanent."); + ability.setStackDescription(sb.toString()); + card.addSpellAbility(ability); + } // *************************************************** // end of card specific code