mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
adding Keldon Warlord. Someone smarter than me can probably use the xCount code by something like:
xCount("TypeYouCtrl.NonWall")
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -15009,6 +15009,36 @@ 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());
|
||||
|
||||
}
|
||||
|
||||
@@ -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<String, String[]> getCardToEffectsList()
|
||||
|
||||
Reference in New Issue
Block a user