mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Converted Roiling Terrain to script. Note that there is no current way to find the number of anything in a targetedcontroller graveyard, so this spell assumes you will target your opponent. Many other cards in Forge do the same thing.
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
Name:Roiling Terrain
|
||||
ManaCost:2 R R
|
||||
Types:Sorcery
|
||||
Text:Destroy target land, then Roiling Terrain deals damage to that land's controller equal to the number of land cards in that player's graveyard.
|
||||
Text:no text
|
||||
#There is no way to count the number of anything in the targeted controller's graveyard yet. So, like many other cards, this one assumes you will target your opponent.
|
||||
A:SP$ Destroy | Cost$ 2 R R | ValidTgts$ Land.YouDontCtrl | TgtPrompt$ Select target land | IsCurse$ True | SubAbility$ SVar=DBDamage | SpellDescription$ Destroy target land, then CARDNAME deals damage to that land's controller equal to the number of land cards in that player's graveyard.
|
||||
SVar:DBDamage:DB$DealDamage | NumDmg$ X | Defined$ Opponent
|
||||
SVar:X:Count$TypeInOppYard.Land
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/roiling_terrain.jpg
|
||||
SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/88.jpg
|
||||
|
||||
@@ -399,63 +399,7 @@ public class CardFactory_Sorceries {
|
||||
}//*************** 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();
|
||||
getTargetCard().getController().addDamage(Damage, card);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void chooseTargetAI() {
|
||||
//target basic land that Human only has 1 or 2 in play
|
||||
CardList land = new CardList(AllZone.Human_Battlefield.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_Battlefield.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("Mind's Desire"))
|
||||
|
||||
Reference in New Issue
Block a user