diff --git a/.gitattributes b/.gitattributes index 1815481814c..36df1bc6027 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2610,6 +2610,7 @@ res/cardsfolder/mythic_proportions.txt -text svneol=native#text/plain res/cardsfolder/nacatl_outlander.txt -text svneol=native#text/plain res/cardsfolder/nacatl_savage.txt -text svneol=native#text/plain res/cardsfolder/nameless_inversion.txt -text svneol=native#text/plain +res/cardsfolder/nameless_race.txt -text svneol=native#text/plain res/cardsfolder/nantuko_calmer.txt -text svneol=native#text/plain res/cardsfolder/nantuko_disciple.txt -text svneol=native#text/plain res/cardsfolder/nantuko_elder.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/nameless_race.txt b/res/cardsfolder/nameless_race.txt new file mode 100644 index 00000000000..1ba48beadb1 --- /dev/null +++ b/res/cardsfolder/nameless_race.txt @@ -0,0 +1,10 @@ +Name:Nameless Race +ManaCost:3 B +Types:Creature +Text:As Nameless Race enters the battlefield, pay any amount of life. The amount you pay can't be more than the total number of white nontoken permanents your opponents control plus the total number of white cards in their graveyards.\r\nNameless Race's power and toughness are each equal to the life paid as it entered the battlefield. +PT:1/1 +K:Trample +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/nameless_race.jpg +End \ No newline at end of file diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index a4b29ce67f1..877ec346703 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -19641,6 +19641,63 @@ public class CardFactory_Creatures { card.addComesIntoPlayCommand(intoPlay); }//*************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Nameless Race")) { + /* + * As Nameless Race enters the battlefield, pay any amount of life. + * The amount you pay can't be more than the total number of white + * nontoken permanents your opponents control plus the total number + * of white cards in their graveyards. + * Nameless Race's power and toughness are each equal to the life + * paid as it entered the battlefield. + */ + final SpellAbility ability = new Ability(card, "0") { + @Override + public void resolve() { + String player = card.getController(); + String opp = AllZone.GameAction.getOpponent(player); + int max = 0; + CardList play = AllZoneUtil.getPlayerCardsInPlay(opp); + play = play.filter(AllZoneUtil.nonToken); + play = play.filter(AllZoneUtil.white); + max += play.size(); + + CardList grave = AllZoneUtil.getPlayerGraveyard(opp); + grave = grave.filter(AllZoneUtil.white); + max += grave.size(); + + String[] life = new String[max+1]; + for(int i = 0; i <= max; i++) { + life[i] = String.valueOf(i); + } + + Object o = AllZone.Display.getChoice("Nameless Race - pay X life", life); + String answer = (String) o; + int loseLife = 0; + try { + loseLife = Integer.parseInt(answer.trim()); + } + catch (NumberFormatException nfe) { + System.out.println(card.getName()+" - NumberFormatException: " + nfe.getMessage()); + } + + card.setBaseAttack(loseLife); + card.setBaseDefense(loseLife); + + AllZone.GameAction.loseLife(player, loseLife); + }//resolve() + };//SpellAbility + Command intoPlay = new Command() { + private static final long serialVersionUID = 931101364538995898L; + + public void execute() { + AllZone.Stack.add(ability); + } + }; + ability.setStackDescription(cardName + " - pay any amount of life."); + card.addComesIntoPlayCommand(intoPlay); + }//*************** END ************ END ************************** + // Cards with Cycling abilities // -1 means keyword "Cycling" not found