mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Added Roiling Terrain, Tectonic Edge and Evolving Wilds
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user