add Last Stand (from Ravinica: City of Guilds)

This commit is contained in:
jendave
2011-08-06 08:44:49 +00:00
parent de81146ed9
commit c93786efe6
3 changed files with 71 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -2208,6 +2208,7 @@ res/cardsfolder/last_breath.txt -text svneol=native#text/plain
res/cardsfolder/last_caress.txt -text svneol=native#text/plain
res/cardsfolder/last_gasp.txt -text svneol=native#text/plain
res/cardsfolder/last_kiss.txt -text svneol=native#text/plain
res/cardsfolder/last_stand.txt -text svneol=native#text/plain
res/cardsfolder/last_word.txt -text svneol=native#text/plain
res/cardsfolder/launch.txt -text svneol=native#text/plain
res/cardsfolder/lava_axe.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,8 @@
Name:Last Stand
ManaCost:W U B R G
Types:Sorcery
Text:Target opponent loses 2 life for each Swamp you control. Last Stand deals damage equal to the number of Mountains you control to target creature. Put a 1/1 green Saproling creature token onto the battlefield for each Forest you control. You gain 2 life for each Plains you control. Draw a card for each Island you control, then discard that many cards.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/last_stand.jpg
End

View File

@@ -8261,6 +8261,68 @@ public class CardFactory_Sorceries {
card.addSpellAbility(spell);
}// *************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Last Stand")) {
/*
* Target opponent loses 2 life for each Swamp you control.
* Last Stand deals damage equal to the number of Mountains
* you control to target creature.
* Put a 1/1 green Saproling creature token onto the battlefield
* for each Forest you control.
* You gain 2 life for each Plains you control.
* Draw a card for each Island you control, then discard that many cards.
*/
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 4475834103787262421L;
@Override
public boolean canPlayAI() {
return false;
}
@Override
public void resolve() {
String player = card.getController();
String opp = AllZone.GameAction.getOpponent(player);
int numSwamps = AllZoneUtil.getPlayerTypeInPlay(player, "Swamp").size();
int numMountains = AllZoneUtil.getPlayerTypeInPlay(player, "Mountain").size();
int numForests = AllZoneUtil.getPlayerTypeInPlay(player, "Forest").size();
int numPlains = AllZoneUtil.getPlayerTypeInPlay(player, "Plains").size();
int numIslands = AllZoneUtil.getPlayerTypeInPlay(player, "Island").size();
//swamps
AllZone.GameAction.loseLife(opp, 2*numSwamps);
//mountain
AllZone.GameAction.addDamage(getTargetCard(), card, numMountains);
//forest
for(int i = 0; i < numForests; i++)
CardFactoryUtil.makeToken("Saproling", "G 1 1 Saproling", player, "G",
new String[] {"Creature", "Saproling"}, 1, 1, new String[] {""});
//plains
AllZone.GameAction.gainLife(player, 2*numPlains);
//islands
int max = Math.min(numIslands, AllZoneUtil.getPlayerCardsInLibrary(player).size());
if(max > 0) {
AllZone.GameAction.drawCards(player, max);
if(player.equals(Constant.Player.Human)) {
AllZone.InputControl.setInput(CardFactoryUtil.input_discard(max, this));
}
else {
AllZone.GameAction.discardRandom(Constant.Player.Computer, max, this);
}
}
}//resolve()
};//SpellAbility
card.clearSpellAbility();
card.addSpellAbility(spell);
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
}//*************** END ************ END **************************
// -1 means keyword "Cycling" not found
if(hasKeyword(card, "Cycling") != -1) {
int n = hasKeyword(card, "Cycling");