From 20a032ccdf4406c85add1328ccde97081e1348fc Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 19:09:24 +0000 Subject: [PATCH] convert Unstable Mutation to triggers --- res/cardsfolder/unstable_mutation.txt | 4 ++- src/forge/GameActionUtil.java | 38 --------------------------- 2 files changed, 3 insertions(+), 39 deletions(-) diff --git a/res/cardsfolder/unstable_mutation.txt b/res/cardsfolder/unstable_mutation.txt index 0c2e07c318b..aabfff019d5 100644 --- a/res/cardsfolder/unstable_mutation.txt +++ b/res/cardsfolder/unstable_mutation.txt @@ -1,8 +1,10 @@ Name:Unstable Mutation ManaCost:U Types:Enchantment Aura -Text:At the beginning of the upkeep of enchanted creature's controller, put a -1/-1 counter on that creature. +Text:no text K:enPump:+3/+3 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ EnchantedController | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of the upkeep of enchanted creature's controller, put a -1/-1 counter on that creature. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Enchanted | CounterType$ M1M1 | CounterNum$ 1 SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/unstable_mutation.jpg SetInfo:TSB|Special|http://magiccards.info/scans/en/tsts/33.jpg diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 1e835ed8864..e67991eafc5 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -48,7 +48,6 @@ public class GameActionUtil { upkeep_Dance_of_the_Dead(); upkeep_Mana_Crypt(); upkeep_Farmstead(); - upkeep_Unstable_Mutation(); /* Converteded to AF Trigger upkeep_Plague_Spitter(); @@ -4824,43 +4823,6 @@ public class GameActionUtil { } }//upkeep_Mana_Crypt - private static void upkeep_Unstable_Mutation() { - final String auraName = "Unstable Mutation"; - final Player player = AllZone.Phase.getPlayerTurn(); - - CardList list = AllZoneUtil.getPlayerCardsInPlay(player); - list = list.filter(new CardListFilter() { - public boolean addCard(Card c) { - return c.isCreature() && c.isEnchanted(); - } - }); - - if(list.size() > 0) { - Ability ability; - for(final Card creature:list) { - if(creature.isEnchantedBy(auraName)) { - CardList auras = new CardList(creature.getEnchantedBy().toArray()); - auras = auras.getName(auraName); - for(Card aura:auras) { - final Card source = aura; - ability = new Ability(source, "0") { - @Override - public void resolve() { - creature.addCounter(Counters.M1M1, 1); - } - }; - - StringBuilder sb = new StringBuilder(); - sb.append(source.getName()).append(" - put a -1/-1 counter on ").append(creature.getName()); - ability.setStackDescription(sb.toString()); - - AllZone.Stack.add(ability); - } - } - } - }//list > 0 - }//upkeep_Unstable_Mutation() - private static void upkeep_Farmstead() { final String auraName = "Farmstead"; final Player player = AllZone.Phase.getPlayerTurn();