From 07b8c9d6213adda12b09e13f450e8907f216e58e Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 04:10:36 +0000 Subject: [PATCH] add Death Cultist from Rise of the Eldrazi --- res/card-pictures.txt | 1 + res/cards.txt | 6 +++++ src/forge/CardFactory_Creatures.java | 33 +++++++++++++++++++++++++++- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 2fbfe70e301..de1b2215e66 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg +death_cultist.jpg http://www.wizards.com/global/images/magic/general/death_cultist.jpg everflowing_chalice.jpg http://www.wizards.com/global/images/magic/general/everflowing_chalice.jpg consume_the_meek.jpg http://www.wizards.com/global/images/magic/general/consume_the_meek.jpg awakening_zone.jpg http://www.wizards.com/global/images/magic/general/awakening_zone.jpg diff --git a/res/cards.txt b/res/cards.txt index 38c914bbe7a..9da5217a771 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,9 @@ +Death Cultist +B +Creature Human Wizard +Sacrifice Death Cultist: Target player loses 1 life and you gain 1 life. +1/1 + Everflowing Chalice 0 Artifact diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index f78638f769e..f1696121636 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -17628,7 +17628,38 @@ public class CardFactory_Creatures { card.addComesIntoPlayCommand(intoPlay); }//*************** END ************ END ************************** - + //*************** START *********** START ************************** + else if(cardName.equals("Death Cultist")) { + /* + * Sacrifice Death Cultist: Target player loses 1 life and you gain 1 life. + */ + final SpellAbility ability = new Ability(card, "0") { + + @Override + public boolean canPlayAI() { + PlayerLife human = AllZone.GameAction.getPlayerLife(Constant.Player.Human); + return human.getLife() == 1; + } + + @Override + public void resolve() { + //AllZone.GameAction.drawCard(sourceCard.getController()); + final String target = getTargetPlayer(); + PlayerLife targetLife = AllZone.GameAction.getPlayerLife(target); + final String player = card.getController(); + PlayerLife playerLife = AllZone.GameAction.getPlayerLife(player); + + AllZone.GameAction.sacrifice(card); + + targetLife.subtractLife(1); + playerLife.addLife(1); + } + }; + //ability.setDescription("1, Sacrifice " + cardName + ": Draw a card."); + //ability.setStackDescription(cardName + " - Target player loses 1 life and controller gains 1 life."); + card.addSpellAbility(ability); + ability.setBeforePayMana(CardFactoryUtil.input_targetPlayer(ability)); + }//*************** END ************ END ************************** // Cards with Cycling abilities // -1 means keyword "Cycling" not found