From 94d8ff554fbadce46a1ea51e150268ff6f56d95c Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 30 May 2014 21:21:17 +0200 Subject: [PATCH] Fixed some tooltip texts and display of choosen color in tooltip. --- .../src/mage/sets/dissension/UtopiaSprawl.java | 1 + .../mage/sets/journeyintonyx/HallOfTriumph.java | 2 +- Mage.Sets/src/mage/sets/legions/WardSliver.java | 4 ++-- Mage.Sets/src/mage/sets/newphyrexia/CagedSun.java | 15 +++++++++------ .../sets/riseoftheeldrazi/CurseOfWizardry.java | 1 + .../mage/sets/shadowmoor/GreaterAuramancy.java | 2 +- .../mage/sets/shadowmoor/LureboundScarecrow.java | 14 +++++++------- .../src/mage/sets/shadowmoor/PaintersServant.java | 7 ++++--- .../mage/sets/zendikar/IonaShieldOfEmeria.java | 2 +- Mage/src/mage/ObjectColor.java | 1 - 10 files changed, 27 insertions(+), 22 deletions(-) diff --git a/Mage.Sets/src/mage/sets/dissension/UtopiaSprawl.java b/Mage.Sets/src/mage/sets/dissension/UtopiaSprawl.java index e529cdea68..959e735284 100644 --- a/Mage.Sets/src/mage/sets/dissension/UtopiaSprawl.java +++ b/Mage.Sets/src/mage/sets/dissension/UtopiaSprawl.java @@ -114,6 +114,7 @@ class ChooseColorEffect extends OneShotEffect { if (player.choose(Outcome.Neutral, colorChoice, game)) { game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor()); + permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getColor().getDescription() + ""); } } return false; diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java b/Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java index 6e7adacfe2..aff7fae524 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/HallOfTriumph.java @@ -102,7 +102,7 @@ class HallOfTriumphEffect extends OneShotEffect { if (colorChoice.getChoice() != null) { game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor()); - permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getChoice().toString() + ""); + permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getColor().getDescription() + ""); } } return false; diff --git a/Mage.Sets/src/mage/sets/legions/WardSliver.java b/Mage.Sets/src/mage/sets/legions/WardSliver.java index 9f2b9517fe..d638ae49e6 100644 --- a/Mage.Sets/src/mage/sets/legions/WardSliver.java +++ b/Mage.Sets/src/mage/sets/legions/WardSliver.java @@ -107,7 +107,7 @@ class WardSliverEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanent(source.getSourceId()); if (player != null && permanent != null) { - Choice colorChoice = new ChoiceColor(); + ChoiceColor colorChoice = new ChoiceColor(); colorChoice.setMessage("Choose color"); while (!player.choose(Outcome.BoostCreature, colorChoice, game)) { if (!player.isInGame()) { @@ -117,7 +117,7 @@ class WardSliverEffect extends OneShotEffect { if (colorChoice.getChoice() != null) { game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); game.getState().setValue(permanent.getId() + "_color", colorChoice.getChoice()); - permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getChoice().toString() + ""); + permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getColor().getDescription() + ""); } } return false; diff --git a/Mage.Sets/src/mage/sets/newphyrexia/CagedSun.java b/Mage.Sets/src/mage/sets/newphyrexia/CagedSun.java index 20e58f6636..d5b0faa992 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/CagedSun.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/CagedSun.java @@ -103,6 +103,7 @@ class CagedSunEffect1 extends OneShotEffect { if (player.choose(Outcome.BoostCreature, colorChoice, game)) { game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice()); game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor()); + permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getColor().getDescription() + ""); } } return false; @@ -173,8 +174,9 @@ class CagedSunTriggeredAbility extends TriggeredManaAbility { Player player = game.getPlayer(source.getControllerId()); if (player != null) { ObjectColor color = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color"); - if (color.isBlack()) + if (color.isBlack()) { player.getManaPool().addMana(Mana.BlackMana, game, source); - else if (color.isBlue()) + } else if (color.isBlue()) { player.getManaPool().addMana(Mana.BlueMana, game, source); - else if (color.isRed()) + } else if (color.isRed()) { player.getManaPool().addMana(Mana.RedMana, game, source); - else if (color.isGreen()) + } else if (color.isGreen()) { player.getManaPool().addMana(Mana.GreenMana, game, source); - else if (color.isWhite()) + } else if (color.isWhite()) { player.getManaPool().addMana(Mana.WhiteMana, game, source); + } } return true; } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/CurseOfWizardry.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/CurseOfWizardry.java index 8d8fa1668e..493e228e1c 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/CurseOfWizardry.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/CurseOfWizardry.java @@ -97,6 +97,7 @@ class CurseOfWizardryChooseColorEffect extends OneShotEffectChosen color: " + colorChoice.getColor().getDescription() + ""); } } return false; diff --git a/Mage.Sets/src/mage/sets/shadowmoor/GreaterAuramancy.java b/Mage.Sets/src/mage/sets/shadowmoor/GreaterAuramancy.java index 5c7507e4c4..66395bd4df 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/GreaterAuramancy.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/GreaterAuramancy.java @@ -50,7 +50,7 @@ import mage.filter.predicate.permanent.EnchantedPredicate; public class GreaterAuramancy extends CardImpl { private static final FilterPermanent filter = new FilterPermanent("enchantments"); - private static final FilterPermanent filter2 = new FilterPermanent("Creatures"); + private static final FilterPermanent filter2 = new FilterPermanent("Enchanted creatures"); static { filter.add(new ControllerPredicate(TargetController.YOU)); diff --git a/Mage.Sets/src/mage/sets/shadowmoor/LureboundScarecrow.java b/Mage.Sets/src/mage/sets/shadowmoor/LureboundScarecrow.java index f23e4e0e08..66567bd0ec 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/LureboundScarecrow.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/LureboundScarecrow.java @@ -27,8 +27,7 @@ */ package mage.sets.shadowmoor; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; @@ -39,7 +38,9 @@ import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.choices.ChoiceColor; +import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -47,8 +48,6 @@ import mage.game.permanent.Permanent; import mage.game.stack.StackObject; import mage.players.Player; -import java.util.UUID; - /** * * @author jeffwadsworth @@ -95,12 +94,13 @@ class LureboundScarecrowChooseColorEffect extends OneShotEffectChosen color: ").append(colorChoice.getColor().getDescription()).append("").toString()); } } return false; diff --git a/Mage.Sets/src/mage/sets/shadowmoor/PaintersServant.java b/Mage.Sets/src/mage/sets/shadowmoor/PaintersServant.java index 1185220f43..ad35378e39 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/PaintersServant.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/PaintersServant.java @@ -96,12 +96,13 @@ class ChooseColorEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); - Card card = game.getCard(source.getSourceId()); - if (player != null && card != null) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (player != null && permanent != null) { ChoiceColor colorChoice = new ChoiceColor(); if (player.choose(Outcome.Neutral, colorChoice, game)) { - game.informPlayers(new StringBuilder(card.getName()).append(": ").append(player.getName()).append(" has chosen ").append(colorChoice.getChoice()).toString()); + game.informPlayers(new StringBuilder(permanent.getName()).append(": ").append(player.getName()).append(" has chosen ").append(colorChoice.getChoice()).toString()); game.getState().setValue(source.getSourceId() + "_color", colorChoice.getColor()); + permanent.addInfo("chosen color", "Chosen color: " + colorChoice.getColor().getDescription() + ""); } } return false; diff --git a/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java b/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java index 0307edd159..8017fd8661 100644 --- a/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java +++ b/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java @@ -102,7 +102,7 @@ class IonaShieldOfEmeriaChooseColorEffect extends OneShotEffectChosen color: ").append(colorChoice.getChoice()).append("").toString()); + permanent.addInfo("chosen color", new StringBuilder("Chosen color: ").append(colorChoice.getColor().getDescription()).append("").toString()); } return true; } diff --git a/Mage/src/mage/ObjectColor.java b/Mage/src/mage/ObjectColor.java index d1631141f9..091463f2b0 100644 --- a/Mage/src/mage/ObjectColor.java +++ b/Mage/src/mage/ObjectColor.java @@ -182,7 +182,6 @@ public class ObjectColor implements Serializable, Copyable, Compara } public String getDescription() { - StringBuilder sb = new StringBuilder(); if (getColorCount() > 1) { return "multicolored"; } else {