From 7a29e4397002a8719dc690d4a394e6358b515602 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 14:05:23 +0000 Subject: [PATCH] convert Pestilence Demon and Thrashing Wumpus to AB$DamageAll --- res/cardsfolder/pestilence_demon.txt | 1 + res/cardsfolder/thrashing_wumpus.txt | 1 + src/forge/CardFactory_Creatures.java | 122 --------------------------- 3 files changed, 2 insertions(+), 122 deletions(-) diff --git a/res/cardsfolder/pestilence_demon.txt b/res/cardsfolder/pestilence_demon.txt index dddccd104aa..d96a57b05b4 100644 --- a/res/cardsfolder/pestilence_demon.txt +++ b/res/cardsfolder/pestilence_demon.txt @@ -4,6 +4,7 @@ Types:Creature Demon Text:no text PT:7/6 K:Flying +A:AB$DamageAll|Cost$B|NumDmg$1|ValidCards$Creature|ValidPlayers$Each|ValidDescription$ each creature and each player. | SpellDescription$CARDNAME deals 1 damage to each creature and each player. SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/pestilence_demon.jpg SetInfo:ROE|Rare|http://magiccards.info/scans/en/roe/124.jpg diff --git a/res/cardsfolder/thrashing_wumpus.txt b/res/cardsfolder/thrashing_wumpus.txt index ff3841f12c4..340bb8eb567 100644 --- a/res/cardsfolder/thrashing_wumpus.txt +++ b/res/cardsfolder/thrashing_wumpus.txt @@ -3,6 +3,7 @@ ManaCost:3 B B Types:Creature Beast Text:no text PT:3/3 +A:AB$DamageAll|Cost$B|NumDmg$1|ValidCards$Creature|ValidPlayers$Each|ValidDescription$ each creature and each player. | SpellDescription$CARDNAME deals 1 damage to each creature and each player. SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/thrashing_wumpus.jpg SetInfo:MMQ|Rare|http://magiccards.info/scans/en/mm/166.jpg diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index 3d0443d2e4f..93a9e0b1bea 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -11891,7 +11891,6 @@ public class CardFactory_Creatures { AllZone.InputControl.setInput(CardFactoryUtil.input_sacrificePermanent(ability, choice, "Select a land to sacrifice")); else //compy { - //AllZone.GameAction.sacrificePermanent(AllZone.ComputerPlayer, ability, choice); ability.setTargetCard(choice.get(0)); AllZone.Stack.add(ability); } @@ -12606,127 +12605,6 @@ public class CardFactory_Creatures { }//*************** END ************ END ************************** - //*************** START *********** START ************************** - else if(cardName.equals("Pestilence Demon")) { - final SpellAbility ability = new Ability(card, "B") { - - @Override - public boolean canPlayAI() { - CardList human = new CardList(AllZone.Human_Battlefield.getCards()); - CardList computer = new CardList(AllZone.Computer_Battlefield.getCards()); - - human = human.getType("Creature"); - computer = computer.getType("Creature"); - - return AllZone.ComputerPlayer.getLife() > 2 - && !(human.size() == 0 - && 0 < computer.size()) - && card.getKillDamage() > 1; - } - - @Override - public void resolve() { - //get all creatures - CardList list = new CardList(); - list.addAll(AllZone.Human_Battlefield.getCards()); - list.addAll(AllZone.Computer_Battlefield.getCards()); - list = list.getType("Creature"); - - for(int i = 0; i < list.size(); i++) { - if(CardFactoryUtil.canDamage(card, list.get(i))) list.get(i).addDamage(1, card); - } - - AllZone.HumanPlayer.addDamage(1, card); - AllZone.ComputerPlayer.addDamage(1, card); - }//resolve() - };//SpellAbility - ability.setDescription("B: Pestilence Demon deals 1 damage to each creature and each player."); - - StringBuilder sb = new StringBuilder(); - sb.append(card).append(" deals 1 damage to each creature and each player."); - ability.setStackDescription(sb.toString()); - - card.clearSpellAbility(); - card.addSpellAbility(new Spell_Permanent(card) { - private static final long serialVersionUID = -9008807568695047980L; - - @Override - public boolean canPlayAI() { - //get all creatures - CardList list = AllZoneUtil.getCreaturesInPlay(); - - return 0 < list.size(); - } - }); - - card.addSpellAbility(ability); - - card.setSVar("PlayMain1", "TRUE"); - }//*************** END ************ END ************************** - - - //*************** START *********** START ************************** - else if(cardName.equals("Thrashing Wumpus")) { - final SpellAbility ability = new Ability(card, "B") { - - @Override - public boolean canPlayAI() { - CardList human = new CardList(AllZone.Human_Battlefield.getCards()); - CardList computer = new CardList(AllZone.Computer_Battlefield.getCards()); - - human = human.getType("Creature"); - computer = computer.getType("Creature"); - - return AllZone.ComputerPlayer.getLife() > 2 - && !(human.size() == 0 - && 0 < computer.size()) - && card.getKillDamage() > 1; - } - - @Override - public void resolve() { - //get all creatures - CardList list = new CardList(); - list.addAll(AllZone.Human_Battlefield.getCards()); - list.addAll(AllZone.Computer_Battlefield.getCards()); - list = list.getType("Creature"); - - for(int i = 0; i < list.size(); i++) { - if(CardFactoryUtil.canDamage(card, list.get(i))) list.get(i).addDamage(1, card); - } - - AllZone.HumanPlayer.addDamage(1, card); - AllZone.ComputerPlayer.addDamage(1, card); - }//resolve() - };//SpellAbility - ability.setDescription("B: Thrashing Wumpus deals 1 damage to each creature and each player."); - - StringBuilder sb = new StringBuilder(); - sb.append(card).append(" deals 1 damage to each creature and each player."); - ability.setStackDescription(sb.toString()); - - card.clearSpellAbility(); - card.addSpellAbility(new Spell_Permanent(card) { - private static final long serialVersionUID = -9008807568695047980L; - - @Override - public boolean canPlayAI() { - //get all creatures - CardList list = new CardList(); - list.addAll(AllZone.Human_Battlefield.getCards()); - list.addAll(AllZone.Computer_Battlefield.getCards()); - list = list.getType("Creature"); - - return 0 < list.size(); - } - }); - - card.addSpellAbility(ability); - - card.setSVar("PlayMain1", "TRUE"); - }//*************** END ************ END ************************** - - //*************** START *********** START ************************** else if (cardName.equals("Roc Egg")) { final SpellAbility ability = new Ability(card, "0") {