adding Keldon Warlord. Someone smarter than me can probably use the xCount code by something like:

xCount("TypeYouCtrl.NonWall")
This commit is contained in:
jendave
2011-08-06 03:58:55 +00:00
parent d1d55be8a1
commit eba5a13c40
5 changed files with 44 additions and 1 deletions

View File

@@ -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_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_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 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 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 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 twiddle.jpg http://www.wizards.com/global/images/magic/general/twiddle.jpg

View File

@@ -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 Zuran Orb
0 0
Artifact Artifact

View File

@@ -1431,6 +1431,10 @@ public class Card extends MyObservable {
return type.contains("Creature"); return type.contains("Creature");
} }
public boolean isWall() {
return type.contains("Wall");
}
public boolean isBasicLand() { public boolean isBasicLand() {
return type.contains("Basic"); return type.contains("Basic");
} }

View File

@@ -15009,6 +15009,36 @@ public class GameActionUtil {
} }
}; //Kor Duelist }; //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 // returns all PlayerZones that has at least 1 Glorious Anthem
// if Computer has 2 Glorious Anthems, AllZone.Computer_Play will be // 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("Gaddock_Teeg", Gaddock_Teeg);
commands.put("Iona_Shield_of_Emeria", Iona_Shield_of_Emeria); commands.put("Iona_Shield_of_Emeria", Iona_Shield_of_Emeria);
commands.put("Kor_Duelist", Kor_Duelist); commands.put("Kor_Duelist", Kor_Duelist);
commands.put("Keldon_Warlord", Keldon_Warlord);
//System.out.println("size of commands: " + commands.size()); //System.out.println("size of commands: " + commands.size());
} }

View File

@@ -182,6 +182,7 @@ public class StaticEffects
cardToEffectsList.put("Iona, Shield of Emeria", new String[] {"Iona_Shield_of_Emeria"}); cardToEffectsList.put("Iona, Shield of Emeria", new String[] {"Iona_Shield_of_Emeria"});
cardToEffectsList.put("Giant Tortoise",new String[] {"Giant_Tortoise"}); cardToEffectsList.put("Giant Tortoise",new String[] {"Giant_Tortoise"});
cardToEffectsList.put("Kor Duelist", new String[] {"Kor_Duelist"}); cardToEffectsList.put("Kor Duelist", new String[] {"Kor_Duelist"});
cardToEffectsList.put("Keldon Warlord", new String[] {"Keldon_Warlord"});
} }
public HashMap<String, String[]> getCardToEffectsList() public HashMap<String, String[]> getCardToEffectsList()