From f362724fb1bbad4cd17a400dcafce58fc4464d14 Mon Sep 17 00:00:00 2001 From: Sloth Date: Mon, 17 Oct 2011 19:54:22 +0000 Subject: [PATCH] - Converted the second ability of Meddling Mage to script. --- res/cardsfolder/m/meddling_mage.txt | 3 +- src/main/java/forge/GameActionUtil.java | 48 ------------------------- src/main/java/forge/StaticEffects.java | 2 -- 3 files changed, 2 insertions(+), 51 deletions(-) diff --git a/res/cardsfolder/m/meddling_mage.txt b/res/cardsfolder/m/meddling_mage.txt index c69b5556de4..4f05f50622b 100644 --- a/res/cardsfolder/m/meddling_mage.txt +++ b/res/cardsfolder/m/meddling_mage.txt @@ -1,8 +1,9 @@ Name:Meddling Mage ManaCost:U W Types:Creature Human Wizard -Text:As Meddling Mage enters the battlefield, name a nonland card.\r\nThe named card can't be cast. +Text:As Meddling Mage enters the battlefield, name a nonland card. PT:2/2 +S:Mode$ CantBeCast | ValidCard$ Card.NamedCard | Description$ The named card can't be cast. SVar:RemRandomDeck:True SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/meddling_mage.jpg diff --git a/src/main/java/forge/GameActionUtil.java b/src/main/java/forge/GameActionUtil.java index ad9e1b99149..2cf0d66982a 100644 --- a/src/main/java/forge/GameActionUtil.java +++ b/src/main/java/forge/GameActionUtil.java @@ -2095,53 +2095,6 @@ public final class GameActionUtil { } // execute() }; // Muraganda_Petroglyphs - /** Constant Meddling_Mage. */ - public static Command Meddling_Mage = new Command() { - private static final long serialVersionUID = 738264163993370439L; - CardList gloriousAnthemList = new CardList(); - - public void execute() { - CardList list = gloriousAnthemList; - Card c; - // reset all cards in list - aka "old" cards - for (int i = 0; i < list.size(); i++) { - c = list.get(i); - //c.removeIntrinsicKeyword("This card can't be cast"); - c.setUnCastable(false); - } - - list.clear(); - - CardList cl = AllZoneUtil.getCardsIn(Zone.Battlefield, "Meddling Mage"); - - for (int i = 0; i < cl.size(); i++) { - final Card crd = cl.get(i); - - CardList spells = new CardList(); - spells.addAll(AllZone.getHumanPlayer().getCardsIn(Zone.Graveyard)); - spells.addAll(AllZone.getHumanPlayer().getCardsIn(Zone.Hand)); - spells.addAll(AllZone.getComputerPlayer().getCardsIn(Zone.Hand)); - spells.addAll(AllZone.getComputerPlayer().getCardsIn(Zone.Graveyard)); - spells = spells.filter(new CardListFilter() { - public boolean addCard(final Card c) { - return !c.isLand() - && c.getName().equals( - crd.getNamedCard()); - } - }); - - for (int j = 0; j < spells.size(); j++) { - c = spells.get(j); - if (!c.isLand()) { - //c.addIntrinsicKeyword("This card can't be cast"); - c.setUnCastable(true); - gloriousAnthemList.add(c); - } - } // for inner - } // for outer - } // execute() - }; // Meddling_Mage - /** Constant Gaddock_Teeg. */ public static Command Gaddock_Teeg = new Command() { private static final long serialVersionUID = -479252814191086571L; @@ -2235,7 +2188,6 @@ public final class GameActionUtil { commands.put("Koth_Emblem", Koth_Emblem); commands.put("Liu_Bei", Liu_Bei); - commands.put("Meddling_Mage", Meddling_Mage); commands.put("Muraganda_Petroglyphs", Muraganda_Petroglyphs); commands.put("Old_Man_of_the_Sea", Old_Man_of_the_Sea); diff --git a/src/main/java/forge/StaticEffects.java b/src/main/java/forge/StaticEffects.java index 58ccf26859e..0d1c5479338 100644 --- a/src/main/java/forge/StaticEffects.java +++ b/src/main/java/forge/StaticEffects.java @@ -206,10 +206,8 @@ public class StaticEffects { cardToEffectsList.put("Gaddock Teeg", new String[]{"Gaddock_Teeg"}); cardToEffectsList.put("Homarid", new String[]{"Homarid"}); - cardToEffectsList.put("Iona, Shield of Emeria", new String[]{"Iona_Shield_of_Emeria"}); cardToEffectsList.put("Liu Bei, Lord of Shu", new String[]{"Liu_Bei"}); - cardToEffectsList.put("Meddling Mage", new String[]{"Meddling_Mage"}); cardToEffectsList.put("Muraganda Petroglyphs", new String[]{"Muraganda_Petroglyphs"}); cardToEffectsList.put("Old Man of the Sea", new String[]{"Old_Man_of_the_Sea"});