diff --git a/.gitattributes b/.gitattributes index 697445af54b..d9a4d5ab1e2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3998,6 +3998,7 @@ res/cardsfolder/razorverge_thicket.txt -text svneol=native#text/plain res/cardsfolder/reach_of_branches.txt -text svneol=native#text/plain res/cardsfolder/reach_through_mists.txt -text svneol=native#text/plain res/cardsfolder/reanimate.txt -text svneol=native#text/plain +res/cardsfolder/reaper_king.txt -text svneol=native#text/plain res/cardsfolder/reaping_the_graves.txt -text svneol=native#text/plain res/cardsfolder/reassembling_skeleton.txt -text svneol=native#text/plain res/cardsfolder/reborn_hope.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/reaper_king.txt b/res/cardsfolder/reaper_king.txt new file mode 100644 index 00000000000..4dfdb19539b --- /dev/null +++ b/res/cardsfolder/reaper_king.txt @@ -0,0 +1,11 @@ +Name:Reaper King +ManaCost:2/W 2/U 2/B 2/R 2/G +Types:Legendary Artifact Creature Scarecrow +Text:Whenever another Scarecrow enters the battlefield under your control, destroy target permanent. +PT:6/6 +K:stPumpAll:Creature.Scarecrow+Other+YouCtrl:1/1:No Condition:Other Scarecrow creatures you control get +1/+1. +SVar:PlayMain1:TRUE +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/reaper_king.jpg +End \ No newline at end of file diff --git a/src/forge/CardFactoryUtil.java b/src/forge/CardFactoryUtil.java index 4b609d6cdea..2967e19c906 100644 --- a/src/forge/CardFactoryUtil.java +++ b/src/forge/CardFactoryUtil.java @@ -2421,11 +2421,11 @@ public class CardFactoryUtil { public void showMessage() { StringTokenizer st = new StringTokenizer(cardTypeList, ";"); if(cardTypeList.equals("All")) { - AllZone.Display.showMessage("Select target permanent"); + AllZone.Display.showMessage(spell.getSourceCard()+" - Select target permanent"); } else { StringBuffer toDisplay = new StringBuffer(); - toDisplay.append("Select target "); + toDisplay.append(spell.getSourceCard()+" - Select target "); while( st.hasMoreTokens() ) { toDisplay.append(st.nextToken()); if( st.hasMoreTokens() ) { diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 9537722665e..71aa82c6540 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -5076,6 +5076,53 @@ public class GameActionUtil { } return true; // Tell the calling routine it's okay to call again if there are other Valakuts in play } + + public static void execute_Reaper_King_Destroy_Effect(final Card reaper) { + + SpellAbility destroyTgt = new Spell(reaper) { + private static final long serialVersionUID = 7708410549601333534L; + + /*CardList getPermanents() { + CardList list = AllZoneUtil.getPlayerCardsInPlay(AllZone.HumanPlayer); + list = list.filter(new CardListFilter() { + public boolean addCard(Card c) { + return !c.hasKeyword("Indestructible"); + } + }); + list = list.filter(AllZoneUtil.getCanTargetFilter(reaper)); + return list; + }//getCreature() + + /*@Override + public void chooseTargetAI() { + // Get a list of all permanents Reaper King could destroy + CardList list = getPermanents(); + else { + list.shuffle(); + setTargetCard(list.get(0)); + } + }//chooseTargetAI() */ + + @Override + public void resolve() { + Card target = getTargetCard(); + if(getTargetCard() != null) { + if(AllZone.GameAction.isCardInPlay(target) && CardFactoryUtil.canTarget(reaper, target)) { + AllZone.GameAction.destroy(target); + } + } + }//resolve() + + }; + destroyTgt.setManaCost("0"); + destroyTgt.setStackDescription(reaper+" - destroy target permanent."); + if (reaper.getController() == AllZone.HumanPlayer) { + AllZone.InputControl.setInput(CardFactoryUtil.input_targetType(destroyTgt, "All")); + } else { + destroyTgt.setChooseTargetAI(CardFactoryUtil.AI_targetType("Permanent", AllZone.getZone(Constant.Zone.Battlefield, AllZone.HumanPlayer))); + AllZone.Stack.add(destroyTgt); + } + } private static boolean showLandfallDialog(Card c) { diff --git a/src/forge/PlayerZone_ComesIntoPlay.java b/src/forge/PlayerZone_ComesIntoPlay.java index b436cbc6c92..202ebdd419e 100644 --- a/src/forge/PlayerZone_ComesIntoPlay.java +++ b/src/forge/PlayerZone_ComesIntoPlay.java @@ -129,6 +129,14 @@ public class PlayerZone_ComesIntoPlay extends DefaultPlayerZone { } } + if(c.isType("Scarecrow") && AllZoneUtil.isCardInPlay("Reaper King", c.getController())) { + CardList kings = AllZoneUtil.getCardsInPlay("Reaper King"); + kings.remove(c); + for(final Card king:kings){ + GameActionUtil.execute_Reaper_King_Destroy_Effect(king); + } + } + if(c.isCreature() && AllZoneUtil.isCardInPlay("Intruder Alarm")) { CardList alarms = AllZoneUtil.getCardsInPlay("Intruder Alarm"); for(Card alarm:alarms) { @@ -295,24 +303,24 @@ public class PlayerZone_ComesIntoPlay extends DefaultPlayerZone { if(SimultaneousEntry == false) { // For Cards with Multiple Token Entry. Only Affects Allies at the moment. for(int i = 0; i < SimultaneousEntryCounter; i++) { - if(c.getType().contains("Ally") || (c.getKeyword().contains("Changeling") && c.isCreature()) - || (clist.size() > 0 && (c.getType().contains("Creature") || c.getKeyword().contains( - "Changeling"))) || allyNamesList.contains(c.getName())) { - CardList list = new CardList(play.getCards()); - list = list.filter(new CardListFilter() { - public boolean addCard(Card c) { - return c.getType().contains("Ally") || c.getKeyword().contains("Changeling") - || allyNamesList.contains(c.getName()); - } - }); - - for(Card var:list) { - GameActionUtil.executeAllyEffects(var); - } - } + if(c.getType().contains("Ally") || (c.getKeyword().contains("Changeling") && c.isCreature()) + || (clist.size() > 0 && (c.getType().contains("Creature") || c.getKeyword().contains( + "Changeling"))) || allyNamesList.contains(c.getName())) { + CardList list = new CardList(play.getCards()); + list = list.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.getType().contains("Ally") || c.getKeyword().contains("Changeling") + || allyNamesList.contains(c.getName()); + } + }); + + for(Card var:list) { + GameActionUtil.executeAllyEffects(var); + } + } } SimultaneousEntryCounter = 1; - } else SimultaneousEntryCounter = SimultaneousEntryCounter + 1; + } else SimultaneousEntryCounter = SimultaneousEntryCounter + 1; } if(AllZone.StaticEffects.getCardToEffectsList().containsKey(c.getName())) {