diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 81929a79e76..98fd6fb04dc 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 +keldon_warlord.jpg http://www.wizards.com/global/images/magic/general/keldon_warlord.jpg zuran_orb.jpg http://www.wizards.com/global/images/magic/general/zuran_orb.jpg storm_seeker.jpg http://www.wizards.com/global/images/magic/general/storm_seeker.jpg twiddle.jpg http://www.wizards.com/global/images/magic/general/twiddle.jpg diff --git a/res/cards.txt b/res/cards.txt index e400d022279..c53be72e2fa 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,9 @@ +Keldon Warlord +2 R R +Creature Human Barbarian +Keldon Warlord's power and toughness are each equal to the number of non-Wall creatures you control. +1/1 + Zuran Orb 0 Artifact diff --git a/src/forge/Card.java b/src/forge/Card.java index e9f6a468b77..e835ea6b936 100644 --- a/src/forge/Card.java +++ b/src/forge/Card.java @@ -1431,6 +1431,10 @@ public class Card extends MyObservable { return type.contains("Creature"); } + public boolean isWall() { + return type.contains("Wall"); + } + public boolean isBasicLand() { return type.contains("Basic"); } diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index d9da05bf58d..1f20f8a450c 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -15008,7 +15008,37 @@ public class GameActionUtil { } } }; //Kor Duelist - + + public static Command Keldon_Warlord = new Command() { + private static final long serialVersionUID = 3804539422363462063L; + + public void execute() { + // get all creatures + CardList list = new CardList(); + list.addAll(AllZone.Human_Play.getCards()); + list.addAll(AllZone.Computer_Play.getCards()); + list = list.getName("Keldon Warlord"); + + for(int i = 0; i < list.size(); i++) { + Card c = list.get(i); + c.setBaseAttack(countCreatures(c)); + c.setBaseDefense(c.getNetAttack()); + } + + }// execute() + + private int countCreatures(Card c) { + PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController()); + CardList creatures = new CardList(play.getCards()); + creatures = creatures.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.isCreature() && !c.isWall(); + } + }); + return creatures.size(); + } + }; + // returns all PlayerZones that has at least 1 Glorious Anthem // if Computer has 2 Glorious Anthems, AllZone.Computer_Play will be @@ -15231,6 +15261,7 @@ public class GameActionUtil { commands.put("Gaddock_Teeg", Gaddock_Teeg); commands.put("Iona_Shield_of_Emeria", Iona_Shield_of_Emeria); commands.put("Kor_Duelist", Kor_Duelist); + commands.put("Keldon_Warlord", Keldon_Warlord); //System.out.println("size of commands: " + commands.size()); } diff --git a/src/forge/StaticEffects.java b/src/forge/StaticEffects.java index 0ee1e9c865c..ce9bafbfe8d 100644 --- a/src/forge/StaticEffects.java +++ b/src/forge/StaticEffects.java @@ -182,6 +182,7 @@ public class StaticEffects cardToEffectsList.put("Iona, Shield of Emeria", new String[] {"Iona_Shield_of_Emeria"}); cardToEffectsList.put("Giant Tortoise",new String[] {"Giant_Tortoise"}); cardToEffectsList.put("Kor Duelist", new String[] {"Kor_Duelist"}); + cardToEffectsList.put("Keldon Warlord", new String[] {"Keldon_Warlord"}); } public HashMap getCardToEffectsList()