diff --git a/.gitattributes b/.gitattributes index d1075e4d0c9..d6b3afa52bf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4181,6 +4181,7 @@ res/cardsfolder/shambling_remains.txt -text svneol=native#text/plain res/cardsfolder/shambling_strider.txt -text svneol=native#text/plain res/cardsfolder/shanodin_dryads.txt -text svneol=native#text/plain res/cardsfolder/shaper_guildmage.txt -text svneol=native#text/plain +res/cardsfolder/shapeshifter.txt -text svneol=native#text/plain res/cardsfolder/shard_volley.txt -text svneol=native#text/plain res/cardsfolder/shared_triumph.txt -text svneol=native#text/plain res/cardsfolder/sharuum_the_hegemon.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/shapeshifter.txt b/res/cardsfolder/shapeshifter.txt new file mode 100644 index 00000000000..41d37c08a06 --- /dev/null +++ b/res/cardsfolder/shapeshifter.txt @@ -0,0 +1,8 @@ +Name:Shapeshifter +ManaCost:6 +Types:Artifact Creature Shapeshifter +Text:As Shapeshifter enters the battlefield, choose a number between 0 and 7.\r\nAt the beginning of your upkeep, you may choose a number between 0 and 7.\r\nShapeshifter's power is equal to the last chosen number and its toughness is equal to 7 minus that number. +PT:*/7-* +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/shapeshifter.jpg +End \ No newline at end of file diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index 329b8934dca..580399e2aa6 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -16446,6 +16446,33 @@ public class CardFactory_Creatures { card.addSpellAbility(ability); }//*************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Shapeshifter")) { + Command intoPlay = new Command() { + private static final long serialVersionUID = 5447692676152380940L; + + public void execute() { + int num = 0; + if(card.getController().isHuman()) { + String[] choices = new String[7]; + for(int j = 0; j < 7; j++) { + choices[j] = ""+j; + } + String answer = (String)(AllZone.Display.getChoiceOptional( + card.getName()+" - Choose a number", choices)); + num = Integer.parseInt(answer); + } + else { + num = 3; + } + card.setBaseAttack(num); + card.setBaseDefense(7-num); + } + }; + + card.addComesIntoPlayCommand(intoPlay); + }//*************** END ************ END ************************** + if(hasKeyword(card, "Level up") != -1 && hasKeyword(card, "maxLevel") != -1) { diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 88b1083fcf9..4661c7477f6 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -71,6 +71,7 @@ public class GameActionUtil { upkeep_Nath(); upkeep_Anowon(); upkeep_Cunning_Lethemancer(); + upkeep_Shapeshifter(); upkeep_Ink_Dissolver(); upkeep_Kithkin_Zephyrnaut(); @@ -10037,6 +10038,35 @@ public class GameActionUtil { } }//list > 0 }//cursed land + + private static void upkeep_Shapeshifter() { + final Player player = AllZone.Phase.getPlayerTurn(); + CardList list = AllZoneUtil.getPlayerCardsInPlay(player, "Shapeshifter"); + + for(final Card c:list) { + SpellAbility ability = new Ability(c, "0") { + @Override + public void resolve() { + int num = 0; + if(player.isHuman()) { + String[] choices = new String[7]; + for(int j = 0; j < 7; j++) { + choices[j] = ""+j; + } + String answer = (String)(AllZone.Display.getChoiceOptional(c.getName()+" - Choose a number", choices)); + num = Integer.parseInt(answer); + } + else { + num = 3; + } + c.setBaseAttack(num); + c.setBaseDefense(7-num); + } + }; + ability.setStackDescription(c.getName()+" - choose a new number"); + AllZone.Stack.add(ability); + }//foreach(Card) + }//upkeep_Shapeshifter private static void upkeep_Pillory_of_the_Sleepless() { final Player player = AllZone.Phase.getPlayerTurn();