From 8d51a7c50193b803ecb23bb5d64cb56fec9a1e0f Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 13:56:51 +0000 Subject: [PATCH] convert Stern Judge to AF. --- res/cardsfolder/stern_judge.txt | 3 +++ src/forge/CardFactory_Creatures.java | 35 ---------------------------- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/res/cardsfolder/stern_judge.txt b/res/cardsfolder/stern_judge.txt index 8ba70156e92..95c8daedc3b 100644 --- a/res/cardsfolder/stern_judge.txt +++ b/res/cardsfolder/stern_judge.txt @@ -3,6 +3,9 @@ ManaCost:2 W Types:Creature Cleric Text:no text PT:2/2 +A:AB$LoseLife | Cost$ T | Defined$ Opponent | LifeAmount$ X | SubAbility$ YouLoseLife/dX | SpellDescription$ Each player loses 1 life for each Swamp he or she controls. +SVar:X:Count$TypeOppCtrl.Swamp +SVar:dX:Count$TypeYouCtrl.Swamp SVar:Rarity:Uncommon SVar:Picture:http://resources.wizards.com/magic/cards/tor/en-us/card35082.jpg SetInfo:TOR|Uncommon|http://magiccards.info/scans/en/tr/16.jpg diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index f48270969d3..b48e13955c7 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -9590,41 +9590,6 @@ public class CardFactory_Creatures { //*************** END ************ END ************************** - //*************** START *********** START ************************** - else if(cardName.equals("Stern Judge")) { - Ability_Cost abCost = new Ability_Cost("T", cardName, true); - final Ability_Activated ability = new Ability_Activated(card, abCost, null) { - private static final long serialVersionUID = 3059547795996737707L; - - @Override - public void resolve() { - AllZone.HumanPlayer.loseLife(countSwamps(AllZone.HumanPlayer),card); - AllZone.ComputerPlayer.loseLife(countSwamps(AllZone.ComputerPlayer),card); - } - - int countSwamps(Player player) { - PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, player); - CardList swamps = new CardList(play.getCards()); - swamps = swamps.getType("Swamp"); - return swamps.size(); - } - - @Override - public boolean canPlayAI() { - int computer = countSwamps(AllZone.ComputerPlayer); - int human = countSwamps(AllZone.HumanPlayer); - - if((computer >= AllZone.ComputerPlayer.getLife()) || (human == 0)) return false; - - return computer <= human; - } - };//SpellAbility - card.addSpellAbility(ability); - ability.setDescription("tap: Each player loses 1 life for each Swamp he or she controls."); - ability.setStackDescription("Stern Judge - Each player loses 1 life for each Swamp he or she controls"); - }//*************** END ************ END ************************** - - //*************** START *********** START ************************** else if(cardName.equals("Elvish Hunter")) { Ability_Cost abCost = new Ability_Cost("1 G T", cardName, true);