mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Changes for getting correct name of object.
This commit is contained in:
parent
fa15ccd41f
commit
e64b5fb67c
4 changed files with 4 additions and 4 deletions
|
@ -127,7 +127,7 @@ class DoUnlessTargetPaysCost extends OneShotEffect {
|
|||
if (message == null) {
|
||||
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();
|
||||
if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(executingEffect.getOutcome(), message, game)) {
|
||||
cost.pay(source, game, source.getSourceId(), player.getId(), false);
|
||||
|
|
|
@ -816,7 +816,7 @@ public abstract class AbilityImpl implements Ability {
|
|||
logger.warn("Could get no object: " + this.toString());
|
||||
}
|
||||
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(getMessageText(game)).toString();
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class DoIfClashWonEffect extends OneShotEffect {
|
|||
String message = null;
|
||||
if (chooseUseText != null) {
|
||||
message = chooseUseText;
|
||||
message = CardUtil.replaceSourceName(message, mageObject.getName());
|
||||
message = CardUtil.replaceSourceName(message, mageObject.getLogName());
|
||||
}
|
||||
|
||||
if (chooseUseText == null || player.chooseUse(executingEffect.getOutcome(), message, game)) {
|
||||
|
|
|
@ -52,7 +52,7 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
} else {
|
||||
message = chooseUseText;
|
||||
}
|
||||
message = CardUtil.replaceSourceName(message, mageObject.getName());
|
||||
message = CardUtil.replaceSourceName(message, mageObject.getLogName());
|
||||
boolean result = true;
|
||||
if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(executingEffects.get(0).getOutcome(), message, game)) {
|
||||
cost.clearPaid();
|
||||
|
|
Loading…
Reference in a new issue