Fixes in texts.

This commit is contained in:
magenoxx 2011-08-09 09:28:06 +04:00
parent b559ea03d7
commit 3961f64c7c
3 changed files with 21 additions and 16 deletions

View file

@ -39,6 +39,10 @@ import mage.abilities.effects.EntersBattlefieldEffect;
*/
public class EntersBattlefieldAbility extends StaticAbility<EntersBattlefieldAbility> {
public EntersBattlefieldAbility(Effect effect) {
super(Zone.BATTLEFIELD, new EntersBattlefieldEffect(effect, ""));
}
public EntersBattlefieldAbility(Effect effect, String rule) {
super(Zone.BATTLEFIELD, new EntersBattlefieldEffect(effect, rule));
}

View file

@ -47,13 +47,15 @@ public class RemoveCountersSourceCost extends CostImpl<RemoveCountersSourceCost>
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) {

View file

@ -37,16 +37,15 @@ import mage.game.Game;
import mage.players.Player;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class DrawCardControllerEffect extends OneShotEffect<DrawCardControllerEffect> {
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<DrawCardControllerEf
private void setText() {
StringBuilder sb = new StringBuilder();
sb.append("draw ").append(amount).append(" card");
if (amount instanceof StaticValue && amount.calculate(null, null) == 1) {
} else {
sb.append("s");
}
String message = amount.getMessage();
if (message.length() > 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();
}