Re: Code from slapshot5
This is Gaea's Avenger from Antiquities
GameActionUtil.java
GameActionUtil.java
- Code: Select all
public static Command Gaeas_Avenger = new Command() {
private static final long serialVersionUID = 1987511098173387864L;
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("Gaea's Avenger");
for(int i = 0; i < list.size(); i++) {
Card c = list.get(i);
c.setBaseAttack(countOppArtifacts(c)+1);
c.setBaseDefense(c.getBaseAttack());
}
}// execute()
private int countOppArtifacts(Card c) {
PlayerZone play = AllZone.getZone(Constant.Zone.Play, AllZone.GameAction.getOpponent(c.getController()));
CardList artifacts = new CardList(play.getCards());
artifacts = artifacts.getType("Artifact");
return artifacts.size();
}
};
- Code: Select all
cardToEffectsList.put("Gaea's Avenger", new String[] {"Gaeas_Avenger"});
- Code: Select all
commands.put("Gaeas_Avenger", Gaeas_Avenger);
- Code: Select all
Gaea's Avenger
1 G G
Creature Treefolk
Gaea's Avenger's power and toughness are each equal to 1 plus the number of artifacts your opponents control.
1/1
- Code: Select all
http://www.wizards.com/global/images/magic/general/gaeas_avenger.jpg