From 9a038a53b64b1d01591f66681a2c06d2c720d37d Mon Sep 17 00:00:00 2001 From: Sloth Date: Mon, 5 Sep 2011 11:46:56 +0000 Subject: [PATCH] - Added SVar:RemAIDeck:True to Brave the Elements. --- res/cardsfolder/b/brave_the_elements.txt | 2 +- .../card/cardFactory/CardFactory_Instants.java | 17 +++-------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/res/cardsfolder/b/brave_the_elements.txt b/res/cardsfolder/b/brave_the_elements.txt index 15da75e42e4..4dda581346d 100644 --- a/res/cardsfolder/b/brave_the_elements.txt +++ b/res/cardsfolder/b/brave_the_elements.txt @@ -2,7 +2,7 @@ Name:Brave the Elements ManaCost:W Types:Instant Text:Choose a color. White creatures you control gain protection from the chosen color until end of turn. -SVar:PlayMain1:TRUE +SVar:RemAIDeck:True SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/brave_the_elements.jpg SetInfo:ZEN|Uncommon|http://magiccards.info/scans/en/zen/4.jpg diff --git a/src/main/java/forge/card/cardFactory/CardFactory_Instants.java b/src/main/java/forge/card/cardFactory/CardFactory_Instants.java index 6ce78a714c0..a080c113ddd 100644 --- a/src/main/java/forge/card/cardFactory/CardFactory_Instants.java +++ b/src/main/java/forge/card/cardFactory/CardFactory_Instants.java @@ -79,7 +79,7 @@ public class CardFactory_Instants { String getChosenColor() { // Choose color for protection in Brave the Elements - String color = ""; + String color = "Black"; if (card.getController().isHuman()) { // String[] colors = Constant.Color.Colors; @@ -91,19 +91,8 @@ public class CardFactory_Instants { Object o = GuiUtils.getChoice("Choose color", colors); color = (String) o; } else { - CardList list = new CardList(); - list.addAll(AllZoneUtil.getPlayerCardsInLibrary(AllZone.getHumanPlayer())); - list.addAll(AllZoneUtil.getPlayerHand(AllZone.getHumanPlayer())); - - if (list.size() > 0) { - String mpcolor = CardFactoryUtil.getMostProminentColor(list); - if (!mpcolor.equals("")) { - color = mpcolor; - } else { - color = "black"; - } - } else { - color = "black"; + if (getAttacker() != null) { + color = getAttacker().getColor().get(0).toString(); } } return color;