From 30e40d26af53aab1942688d89b9cc7d20e95f7f6 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 12:28:01 +0000 Subject: [PATCH] convert Death Baron to stPumpAll keyword --- res/cardsfolder/death_baron.txt | 3 +- res/cardsfolder/elvish_archdruid.txt | 2 +- res/cardsfolder/elvish_champion.txt | 2 +- src/forge/GameActionUtil.java | 169 --------------------------- src/forge/StaticEffects.java | 1 - 5 files changed, 4 insertions(+), 173 deletions(-) diff --git a/res/cardsfolder/death_baron.txt b/res/cardsfolder/death_baron.txt index 4e116e1acab..303aa862bfb 100644 --- a/res/cardsfolder/death_baron.txt +++ b/res/cardsfolder/death_baron.txt @@ -1,8 +1,9 @@ Name:Death Baron ManaCost:1 B B Types:Creature Zombie Wizard -Text:Skeleton creatures you control and other Zombie creatures you control get +1/+1 and have deathtouch. +Text:no text PT:2/2 +K:stPumpAll:Creature.Zombie+Other+YouCtrl,Creature.Skeleton:1/1/Deathtouch:No Condition:Skeleton creatures you control and other Zombie creatures you control get +1/+1 and have deathtouch. SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/death_baron.jpg SetInfo:ALA|Rare|http://magiccards.info/scans/en/ala/70.jpg diff --git a/res/cardsfolder/elvish_archdruid.txt b/res/cardsfolder/elvish_archdruid.txt index 786362f8b81..961f754fbdd 100644 --- a/res/cardsfolder/elvish_archdruid.txt +++ b/res/cardsfolder/elvish_archdruid.txt @@ -1,7 +1,7 @@ Name:Elvish Archdruid ManaCost:1 G G Types:Creature Elf Druid -Text:Other Elf creatures you control get +1/+1. +Text:no text PT:2/2 K:tap: add G to your mana pool for each Elf you control. K:stPumpAll:Creature.Elfk+Other+YouCtrl:1/1:No Condition:Other Elf creatures you control get +1/+1. diff --git a/res/cardsfolder/elvish_champion.txt b/res/cardsfolder/elvish_champion.txt index c931942792b..162fe529910 100644 --- a/res/cardsfolder/elvish_champion.txt +++ b/res/cardsfolder/elvish_champion.txt @@ -1,7 +1,7 @@ Name:Elvish Champion ManaCost:1 G G Types:Creature Elf -Text:Other Elf creatures get +1/+1 and have forestwalk. +Text:no text PT:2/2 K:stPumpAll:Creature.Elf+Other:1/1/Forestwalk:No Condition:Other Merfolk creatures get +1/+1 and have forestwalk. SVar:PlayMain1:TRUE diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index d5a0d0521c4..96cee60e727 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -15425,173 +15425,6 @@ public class GameActionUtil { }; //Veteran Swordsmith Other - - - public static Command Elvish_Champion_Pump = new Command() { - - private static final long serialVersionUID = -2128898623878576243L; - CardList gloriousAnthemList = new CardList(); - - public void execute() { - - CardList cList = gloriousAnthemList; - Card c; - - for(int i = 0; i < cList.size(); i++) { - c = cList.get(i); - c.addSemiPermanentAttackBoost(-1); - c.addSemiPermanentDefenseBoost(-1); - c.removeExtrinsicKeyword("Forestwalk"); - } - cList.clear(); - PlayerZone[] zone = getZone("Elvish Champion"); - - // for each zone found add +1/+1 to each card - for(int outer = 0; outer < zone.length; outer++) { - CardList creature = new CardList(); - creature.addAll(AllZone.Human_Play.getCards()); - creature.addAll(AllZone.Computer_Play.getCards()); - creature = creature.getType("Elf"); - - for(int i = 0; i < creature.size(); i++) { - c = creature.get(i); - if(c.isCreature() - && !c.getName().equals( - "Elvish Champion")) { - c.addSemiPermanentAttackBoost(1); - c.addSemiPermanentDefenseBoost(1); - c.addExtrinsicKeyword("Forestwalk"); - gloriousAnthemList.add(c); - } - - } // for - } // for - - }// execute() - - }; //Elvish_Champion_Pump - - public static Command Elvish_Champion_Other = new Command() { - - private static final long serialVersionUID = -8294068492084097409L; - int otherLords = 0; - - private int countOtherLords() { - PlayerZone hPlay = AllZone.getZone( - Constant.Zone.Play, AllZone.HumanPlayer); - PlayerZone cPlay = AllZone.getZone( - Constant.Zone.Play, AllZone.ComputerPlayer); - CardList lords = new CardList(); - lords.addAll(hPlay.getCards()); - lords.addAll(cPlay.getCards()); - lords = lords.getName("Elvish Champion"); - return lords.size() - 1; - - } - - public void execute() { - - - CardList creature = AllZoneUtil.getCardsInPlay("Elvish Champion"); - - for(int i = 0; i < creature.size(); i++) { - Card c = creature.get(i); - otherLords = countOtherLords(); - c.setOtherAttackBoost(otherLords); - c.setOtherDefenseBoost(otherLords); - if(!c.getExtrinsicKeyword().contains( - "Forestwalk") - && otherLords > 0) c.addExtrinsicKeyword("Forestwalk"); - - }// for inner - }// execute() - - }; //Elvish_Champion_Other - - - public static Command Death_Baron_Pump = new Command() { - - private static final long serialVersionUID = 6864062675875861848L; - CardList gloriousAnthemList = new CardList(); - - public void execute() { - - CardList cList = gloriousAnthemList; - Card c; - - for(int i = 0; i < cList.size(); i++) { - c = cList.get(i); - c.addSemiPermanentAttackBoost(-1); - c.addSemiPermanentDefenseBoost(-1); - } - cList.clear(); - PlayerZone[] zone = getZone("Death Baron"); - - // for each zone found add +1/+1 to each card - for(int outer = 0; outer < zone.length; outer++) { - CardList creature = new CardList(zone[outer].getCards()); - - creature = creature.filter(new CardListFilter() - { - public boolean addCard(Card crd) - { - return crd.isCreature() && ( (crd.getType().contains("Zombie") && !crd.getName().equals("Death Baron")) - || crd.getType().contains("Skeleton") || crd.getKeyword().contains("Changeling")); - } - }); - - for(int i = 0; i < creature.size(); i++) { - c = creature.get(i); - c.addSemiPermanentAttackBoost(1); - c.addSemiPermanentDefenseBoost(1); - if(!c.getExtrinsicKeyword().contains("Deathtouch")) - c.addExtrinsicKeyword("Deathtouch"); - gloriousAnthemList.add(c); - - } // for - } // for - - }// execute() - - }; //Death Baron Pump - - public static Command Death_Baron_Other = new Command() { - - private static final long serialVersionUID = -8650631555036321809L; - int otherBarons = 0; - - private int countOtherBarons(Card c) { - PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController()); - CardList barons = new CardList(play.getCards()); - barons = barons.filter(new CardListFilter() { - public boolean addCard(Card c) { - return c.getName().equals("Death Baron") && (c.getType().contains("Zombie")) && - !c.getType().contains("Skeleton"); - } - }); - return barons.size() - 1; - } - - public void execute() { - - CardList creature = AllZoneUtil.getCardsInPlay("Death Baron"); - - for(int i = 0; i < creature.size(); i++) { - Card c = creature.get(i); - otherBarons = countOtherBarons(c); - c.setOtherAttackBoost(otherBarons); - c.setOtherDefenseBoost(otherBarons); - if(!c.getExtrinsicKeyword().contains("Deathtouch") && otherBarons > 0) - c.addExtrinsicKeyword("Deathtouch"); - else - c.removeExtrinsicKeyword("Deathtouch"); - - }// for inner - }// execute() - - }; //Death Baron Other - - public static Command Scion_of_Oona_Pump = new Command() { private static final long serialVersionUID = 8659017444482040867L; @@ -18948,8 +18781,6 @@ public class GameActionUtil { commands.put("Cemetery_Reaper_Other", Cemetery_Reaper_Other); commands.put("Veteran_Swordsmith_Pump", Veteran_Swordsmith_Pump); commands.put("Veteran_Swordsmith_Other", Veteran_Swordsmith_Other); - commands.put("Death_Baron_Pump", Death_Baron_Pump); - commands.put("Death_Baron_Other", Death_Baron_Other); commands.put("Scion_of_Oona_Pump", Scion_of_Oona_Pump); commands.put("Scion_of_Oona_Other", Scion_of_Oona_Other); diff --git a/src/forge/StaticEffects.java b/src/forge/StaticEffects.java index 5d1144d00cd..39536978538 100644 --- a/src/forge/StaticEffects.java +++ b/src/forge/StaticEffects.java @@ -107,7 +107,6 @@ public class StaticEffects cardToEffectsList.put("Lord of the Undead", new String[] {"Lord_of_the_Undead_Pump", "Lord_of_the_Undead_Other"}); cardToEffectsList.put("Cemetery Reaper", new String[] {"Cemetery_Reaper_Pump", "Cemetery_Reaper_Other"}); cardToEffectsList.put("Veteran Swordsmith", new String[] {"Veteran_Swordsmith_Pump", "Veteran_Swordsmith_Other"}); - cardToEffectsList.put("Death Baron", new String[] {"Death_Baron_Pump","Death_Baron_Other"}); cardToEffectsList.put("Scion of Oona", new String[] {"Scion_of_Oona_Pump", "Scion_of_Oona_Other"}); cardToEffectsList.put("Covetous Dragon", new String[] {"Covetous_Dragon"}); cardToEffectsList.put("Phylactery Lich", new String[]{"Phylactery_Lich"});