* Changes for getting correct name of object.

This commit is contained in:
LevelX2 2014-09-23 17:20:28 +02:00
parent fa15ccd41f
commit e64b5fb67c
4 changed files with 4 additions and 4 deletions

View file

@ -127,7 +127,7 @@ class DoUnlessTargetPaysCost extends OneShotEffect {
if (message == null) { if (message == null) {
message = new StringBuilder(getCostText()).append(" to prevent ").append(executingEffect.getText(source.getModes().getMode())).append("?").toString(); message = new StringBuilder(getCostText()).append(" to prevent ").append(executingEffect.getText(source.getModes().getMode())).append("?").toString();
} }
message = CardUtil.replaceSourceName(message, mageObject.getName()); message = CardUtil.replaceSourceName(message, mageObject.getLogName());
cost.clearPaid(); cost.clearPaid();
if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(executingEffect.getOutcome(), message, game)) { if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(executingEffect.getOutcome(), message, game)) {
cost.pay(source, game, source.getSourceId(), player.getId(), false); cost.pay(source, game, source.getSourceId(), player.getId(), false);

View file

@ -816,7 +816,7 @@ public abstract class AbilityImpl implements Ability {
logger.warn("Could get no object: " + this.toString()); logger.warn("Could get no object: " + this.toString());
} }
return new StringBuilder(" activates: ") return new StringBuilder(" activates: ")
.append(object != null ? this.formatRule(modes.getText(), object.getName()) :modes.getText()) .append(object != null ? this.formatRule(modes.getText(), object.getLogName()) :modes.getText())
.append(" from ") .append(" from ")
.append(getMessageText(game)).toString(); .append(getMessageText(game)).toString();
} }

View file

@ -77,7 +77,7 @@ public class DoIfClashWonEffect extends OneShotEffect {
String message = null; String message = null;
if (chooseUseText != null) { if (chooseUseText != null) {
message = chooseUseText; message = chooseUseText;
message = CardUtil.replaceSourceName(message, mageObject.getName()); message = CardUtil.replaceSourceName(message, mageObject.getLogName());
} }
if (chooseUseText == null || player.chooseUse(executingEffect.getOutcome(), message, game)) { if (chooseUseText == null || player.chooseUse(executingEffect.getOutcome(), message, game)) {

View file

@ -52,7 +52,7 @@ public class DoIfCostPaid extends OneShotEffect {
} else { } else {
message = chooseUseText; message = chooseUseText;
} }
message = CardUtil.replaceSourceName(message, mageObject.getName()); message = CardUtil.replaceSourceName(message, mageObject.getLogName());
boolean result = true; boolean result = true;
if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(executingEffects.get(0).getOutcome(), message, game)) { if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(executingEffects.get(0).getOutcome(), message, game)) {
cost.clearPaid(); cost.clearPaid();