From b97c932e4068daf7dde3d1d12c267bd20ba9ef8a Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 05:11:05 +0000 Subject: [PATCH] - Added Phyrexian Plaguelord --- res/card-pictures.txt | 1 + res/cards.txt | 6 ++ res/rare.txt | 1 + src/forge/CardFactory_Creatures.java | 142 ++++++++++++++++++++++++++- 4 files changed, 149 insertions(+), 1 deletion(-) diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 8565fbeb6ee..233016383dd 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 +phyrexian_plaguelord.jpg http://www.wizards.com/global/images/magic/general/phyrexian_plaguelord.jpg reclaim.jpg http://www.wizards.com/global/images/magic/general/reclaim.jpg skirk_prospector.jpg http://www.wizards.com/global/images/magic/general/skirk_prospector.jpg sejiri_merfolk.jpg http://www.wizards.com/global/images/magic/general/sejiri_merfolk.jpg diff --git a/res/cards.txt b/res/cards.txt index 4b52d79422e..c1b0f746774 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,9 @@ +Phyrexian Plaguelord +3 B B +Creature Carrier +no text +4/4 + Reclaim G Instant diff --git a/res/rare.txt b/res/rare.txt index a9cf4e68f99..ad6f69caf8a 100644 --- a/res/rare.txt +++ b/res/rare.txt @@ -588,6 +588,7 @@ Penumbra Wurm Pestilence Demon Phantom Nishoba Phyrexian Arena +Phyrexian Plaguelord Phyrexian Tower Phytohydra Pianna, Nomad Captain diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index 74c29195265..b01064991e0 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -2195,7 +2195,6 @@ public class CardFactory_Creatures { }; card.addComesIntoPlayCommand(intoPlay); }//*************** END ************ END ************************** - //*************** START *********** START ************************** else if(cardName.equals("Phyrexian Rager")) { @@ -2220,6 +2219,147 @@ public class CardFactory_Creatures { card.addComesIntoPlayCommand(intoPlay); }//*************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Phyrexian Plaguelord")) { + final SpellAbility negMajorBoost = new Ability_Tap(card, "0") { + @Override + public void resolve() { + final Card[] target = new Card[1]; + final Command untilEOT = new Command() { + private static final long serialVersionUID = 723868397363666853L; + + public void execute() { + if(AllZone.GameAction.isCardInPlay(target[0])) { + target[0].addTempAttackBoost(4); + target[0].addTempDefenseBoost(4); + } + } + }; + + target[0] = getTargetCard(); + if(AllZone.GameAction.isCardInPlay(target[0]) && CardFactoryUtil.canTarget(card, target[0])) { + target[0].addTempAttackBoost(-4); + target[0].addTempDefenseBoost(-4); + + AllZone.EndOfTurn.addUntil(untilEOT); + } + } + + @Override + public boolean canPlayAI() { + return false; // todo: don't want the AI just sacrificing creatures without a strong plan in place + }//canPlayAI() + }; + Input majorTarget = new Input() { + private static final long serialVersionUID = 607823017778070255L; + + @Override + public void showMessage() { + AllZone.Display.showMessage("Select target creature for " + card.getName()); + ButtonUtil.enableOnlyCancel(); + } + + @Override + public void selectButtonCancel() { + stop(); + } + + @Override + public void selectCard(Card target, PlayerZone zone) { + // Choose a legal target, then sacrifice a creature + if (card.isUntapped()){ + if(!CardFactoryUtil.canTarget(negMajorBoost, target)) { + AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?)."); + } + else if(target.isCreature() && zone.is(Constant.Zone.Play)) { + card.tap(); + AllZone.GameAction.sacrifice(card); + negMajorBoost.setTargetCard(target); + AllZone.Stack.add(negMajorBoost); + } + } + stop(); + } + };//Input + negMajorBoost.setDescription("T, Sacrifice CARDNAME: Target creature gets -4/-4 until end of turn"); + negMajorBoost.setBeforePayMana(majorTarget); + + final SpellAbility negMinorBoost = new Ability(card, "0") { + @Override + public void resolve() { + final Card[] target = new Card[1]; + final Command untilEOT = new Command() { + private static final long serialVersionUID = 723868397363666853L; + + public void execute() { + if(AllZone.GameAction.isCardInPlay(target[0])) { + target[0].addTempAttackBoost(1); + target[0].addTempDefenseBoost(1); + } + } + }; + + target[0] = getTargetCard(); + if(AllZone.GameAction.isCardInPlay(target[0]) && CardFactoryUtil.canTarget(card, target[0])) { + target[0].addTempAttackBoost(-1); + target[0].addTempDefenseBoost(-1); + + AllZone.EndOfTurn.addUntil(untilEOT); + } + } + + @Override + public boolean canPlayAI() { + return false; // todo: don't want the AI just sacrificing creatures without a strong plan in place + }//canPlayAI() + }; + Input target = new Input() { + private static final long serialVersionUID = -5404464532726469761L; + + @Override + public void showMessage() { + AllZone.Display.showMessage("Select target creature for " + card.getName()); + ButtonUtil.enableOnlyCancel(); + } + + @Override + public void selectButtonCancel() { + stop(); + } + + @Override + public void selectCard(Card target, PlayerZone zone) { + // Choose a legal target, then sacrifice a creature + if(!CardFactoryUtil.canTarget(negMinorBoost, target)) { + AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?)."); + } else if(target.isCreature() && zone.is(Constant.Zone.Play)) { + + PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController()); + CardList creatures = new CardList(play.getCards()); + creatures = creatures.getType("Creature"); + + if (creatures.size() == 0) stop(); + + Object choice = AllZone.Display.getChoiceOptional("Select Creature to Sacrifice", creatures.toArray()); + + if (choice == null) stop(); + Card sac = (Card) choice; + if(AllZone.GameAction.isCardInPlay(sac)) { + AllZone.GameAction.sacrifice(sac); + negMinorBoost.setTargetCard(target); + AllZone.Stack.add(negMinorBoost); + } + + stop(); + } + } + };//Input + negMinorBoost.setDescription("Sacrifice a creature: Target creature gets -1/-1 until end of turn"); + negMinorBoost.setBeforePayMana(target); + card.addSpellAbility(negMajorBoost); + card.addSpellAbility(negMinorBoost); + + } //*************** END ************ END ************************** //*************** START *********** START ************************** else if(cardName.equals("Cao Ren, Wei Commander")) {