From 3961f64c7c74b78bbfaa8ee08a1608d0e7a1cfe0 Mon Sep 17 00:00:00 2001 From: magenoxx Date: Tue, 9 Aug 2011 09:28:06 +0400 Subject: [PATCH] Fixes in texts. --- .../common/EntersBattlefieldAbility.java | 4 +++ .../common/RemoveCountersSourceCost.java | 6 +++-- .../common/DrawCardControllerEffect.java | 27 +++++++++---------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/Mage/src/mage/abilities/common/EntersBattlefieldAbility.java b/Mage/src/mage/abilities/common/EntersBattlefieldAbility.java index 79436c685a..ea1becb40d 100644 --- a/Mage/src/mage/abilities/common/EntersBattlefieldAbility.java +++ b/Mage/src/mage/abilities/common/EntersBattlefieldAbility.java @@ -39,6 +39,10 @@ import mage.abilities.effects.EntersBattlefieldEffect; */ public class EntersBattlefieldAbility extends StaticAbility { + public EntersBattlefieldAbility(Effect effect) { + super(Zone.BATTLEFIELD, new EntersBattlefieldEffect(effect, "")); + } + public EntersBattlefieldAbility(Effect effect, String rule) { super(Zone.BATTLEFIELD, new EntersBattlefieldEffect(effect, rule)); } diff --git a/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java b/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java index 1c8ef227dd..396466b31a 100644 --- a/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java +++ b/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java @@ -47,13 +47,15 @@ public class RemoveCountersSourceCost extends CostImpl public RemoveCountersSourceCost(String name, int amount) { this.amount = amount; this.name = name; - this.text = "Remove " + amount + " " + name + " counters from {this}"; + this.text = "Remove " + (amount == 1 ? "a" : amount) + " " + name + " counter" + + (amount != 1 ? "s" : "") + " from {this}"; } public RemoveCountersSourceCost(Counter counter) { this.amount = counter.getCount(); this.name = counter.getName(); - this.text = "Remove " + amount + " " + name + " counters from {this}"; + this.text = "Remove " + (amount == 1 ? "a" : amount) + " " + name + " counter" + + (amount != 1 ? "s" : "") + "from {this}"; } public RemoveCountersSourceCost(RemoveCountersSourceCost cost) { diff --git a/Mage/src/mage/abilities/effects/common/DrawCardControllerEffect.java b/Mage/src/mage/abilities/effects/common/DrawCardControllerEffect.java index b6e95a63b3..e0d5312b36 100644 --- a/Mage/src/mage/abilities/effects/common/DrawCardControllerEffect.java +++ b/Mage/src/mage/abilities/effects/common/DrawCardControllerEffect.java @@ -37,16 +37,15 @@ import mage.game.Game; import mage.players.Player; /** - * * @author BetaSteward_at_googlemail.com */ public class DrawCardControllerEffect extends OneShotEffect { protected DynamicValue amount; - public DrawCardControllerEffect(int amount) { - this(new StaticValue(amount)); - } + public DrawCardControllerEffect(int amount) { + this(new StaticValue(amount)); + } public DrawCardControllerEffect(DynamicValue amount) { super(Outcome.DrawCard); @@ -76,16 +75,16 @@ public class DrawCardControllerEffect extends OneShotEffect 0) { - sb.append(" for each "); - } - sb.append(message); + boolean oneCard = amount instanceof StaticValue && amount.calculate(null, null) == 1; + sb.append("draw ").append(oneCard ? "a" : amount).append(" card"); + if (!oneCard) { + sb.append("s"); + } + String message = amount.getMessage(); + if (message.length() > 0) { + sb.append(" for each "); + } + sb.append(message); staticText = sb.toString(); }