Added Roiling Terrain, Tectonic Edge and Evolving Wilds

This commit is contained in:
jendave
2011-08-06 04:53:08 +00:00
parent c2349b2475
commit 80c192289f
4 changed files with 96 additions and 10 deletions

View File

@@ -7818,6 +7818,66 @@ public class CardFactory implements NewConstants {
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Roiling Terrain")) {
SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = -65124658746L;
@Override
public void resolve() {
if(AllZone.GameAction.isCardInPlay(getTargetCard())
&& CardFactoryUtil.canTarget(card, getTargetCard())) {
AllZone.GameAction.destroy(getTargetCard());
CardList Grave = new CardList(AllZone.getZone(Constant.Zone.Graveyard, getTargetCard().getController()).getCards());
int Damage = (Grave.getType("Land")).size();
AllZone.GameAction.getPlayerLife(getTargetCard().getController()).subtractLife(Damage);
}
}
@Override
public void chooseTargetAI() {
//target basic land that Human only has 1 or 2 in play
CardList land = new CardList(AllZone.Human_Play.getCards());
land = land.getType("Land");
Card target = null;
String[] name = {"Forest", "Swamp", "Plains", "Mountain", "Island"};
for(int i = 0; i < name.length; i++)
if(land.getName(name[i]).size() == 1) {
target = land.getName(name[i]).get(0);
break;
}
//see if there are only 2 lands of the same type
if(target == null) {
for(int i = 0; i < name.length; i++)
if(land.getName(name[i]).size() == 2) {
target = land.getName(name[i]).get(0);
break;
}
}//if
if(target == null) {
land.shuffle();
target = land.get(0);
}
setTargetCard(target);
}//chooseTargetAI()
@Override
public boolean canPlayAI() {
CardList land = new CardList(AllZone.Human_Play.getCards());
land = land.getType("Land");
return land.size() != 0;
}
};//SpellAbility
spell.setBeforePayMana(CardFactoryUtil.input_targetType(spell, "Land"));
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Volcanic Awakening")) {
SpellAbility spell = new Spell(card) {