From 73885ab01dc348083ed6494f1c049440f58ea6b3 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 4 Apr 2014 08:39:19 +0200 Subject: [PATCH] * Iona, Shiel of Emeria - Added choice information to card tooltip. --- .../java/mage/player/ai/ComputerPlayer.java | 3 ++ .../sets/zendikar/IonaShieldOfEmeria.java | 10 ++++--- Mage/src/mage/abilities/StaticAbility.java | 1 + Mage/src/mage/choices/ChoiceColor.java | 30 ++++++++++--------- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index 1e2d3a5996..968d8d3abd 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -1307,6 +1307,9 @@ public class ComputerPlayer> extends PlayerImpl i @Override public int getAmount(int min, int max, String message, Game game) { log.debug("getAmount"); + if (message.startsWith("Assign damage to ")) { + return min; + } //TODO: improve this if (min < max && min == 0) { return new Random().nextInt(max+1); diff --git a/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java b/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java index a21c19c11f..0307edd159 100644 --- a/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java +++ b/Mage.Sets/src/mage/sets/zendikar/IonaShieldOfEmeria.java @@ -96,13 +96,15 @@ class IonaShieldOfEmeriaChooseColorEffect extends OneShotEffectChosen color: ").append(colorChoice.getChoice()).append("").toString()); } + return true; } return false; } diff --git a/Mage/src/mage/abilities/StaticAbility.java b/Mage/src/mage/abilities/StaticAbility.java index 2a3bb373cc..8cc31d9bdd 100644 --- a/Mage/src/mage/abilities/StaticAbility.java +++ b/Mage/src/mage/abilities/StaticAbility.java @@ -35,6 +35,7 @@ import mage.abilities.effects.Effect; /** * * @author BetaSteward_at_googlemail.com + * @param */ public abstract class StaticAbility> extends AbilityImpl { diff --git a/Mage/src/mage/choices/ChoiceColor.java b/Mage/src/mage/choices/ChoiceColor.java index 490359d061..c777be594f 100644 --- a/Mage/src/mage/choices/ChoiceColor.java +++ b/Mage/src/mage/choices/ChoiceColor.java @@ -57,20 +57,22 @@ public class ChoiceColor extends ChoiceImpl { public ObjectColor getColor() { ObjectColor color = new ObjectColor(); - if (choice.equals("Black")) { - color.setBlack(true); - } - else if (choice.equals("Blue")) { - color.setBlue(true); - } - else if (choice.equals("Green")) { - color.setGreen(true); - } - else if (choice.equals("Red")) { - color.setRed(true); - } - else if (choice.equals("White")) { - color.setWhite(true); + switch (choice) { + case "Black": + color.setBlack(true); + break; + case "Blue": + color.setBlue(true); + break; + case "Green": + color.setGreen(true); + break; + case "Red": + color.setRed(true); + break; + case "White": + color.setWhite(true); + break; } return color; }