diff --git a/.gitattributes b/.gitattributes index 948a185d234..1acb9a9209f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/res/cardsfolder/last_stand.txt b/res/cardsfolder/last_stand.txt new file mode 100644 index 00000000000..280699bbe51 --- /dev/null +++ b/res/cardsfolder/last_stand.txt @@ -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 diff --git a/src/forge/CardFactory_Sorceries.java b/src/forge/CardFactory_Sorceries.java index 044eab58091..b6f044ffada 100644 --- a/src/forge/CardFactory_Sorceries.java +++ b/src/forge/CardFactory_Sorceries.java @@ -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");