Merge pull request #9080 from Jetz72/fixes20251104

Apply display/flavor names in more places
This commit is contained in:
Jetz72
2025-11-04 09:53:20 -06:00
committed by GitHub
52 changed files with 146 additions and 160 deletions

View File

@@ -475,11 +475,11 @@ public final class CardRules implements ICardCharacteristics {
return getName();
ICardFace mainFace = Objects.requireNonNullElse(mainPart.getFunctionalVariant(variantName), mainPart);
String mainPartName = Objects.requireNonNullElse(mainFace.getFlavorName(), mainFace.getName());
String mainPartName = mainFace.getDisplayName();
if(splitType.getAggregationMethod() == CardSplitType.FaceSelectionMethod.COMBINE) {
ICardFace otherFace = Objects.requireNonNullElse(otherPart.getFunctionalVariant(variantName), otherPart);
String otherPartName = Objects.requireNonNullElse(otherFace.getFlavorName(), otherFace.getName());
String otherPartName = otherFace.getDisplayName();
return mainPartName + " // " + otherPartName;
}
else

View File

@@ -9,6 +9,15 @@ import java.util.Map;
public interface ICardFace extends ICardCharacteristics, ICardRawAbilites, Comparable<ICardFace> {
String getFlavorName();
/**
* @return this card's flavor name if it has one. Otherwise, the card's Oracle name.
*/
default String getDisplayName() {
if (this.getFlavorName() != null)
return this.getFlavorName();
return this.getName();
}
boolean hasFunctionalVariants();
ICardFace getFunctionalVariant(String variant);
Map<String, ? extends ICardFace> getFunctionalVariants();

View File

@@ -1776,7 +1776,7 @@ public class GameAction {
if (sb.length() == 0) {
sb.append(p).append(" ").append(Localizer.getInstance().getMessage("lblAssigns")).append("\n");
}
String creature = CardTranslation.getTranslatedName(assignee.getName()) + " (" + assignee.getId() + ")";
String creature = assignee.getTranslatedName() + " (" + assignee.getId() + ")";
sb.append(creature).append(" ").append(sector).append("\n");
}
if (sb.length() > 0) {
@@ -1793,7 +1793,7 @@ public class GameAction {
c.getGame().getTracker().flush();
c.setMoveToCommandZone(false);
if (c.getOwner().getController().confirmAction(c.getFirstSpellAbility(), PlayerActionConfirmMode.ChangeZoneToAltDestination, c.getName() + ": If a commander is in a graveyard or in exile and that card was put into that zone since the last time state-based actions were checked, its owner may put it into the command zone.", null)) {
if (c.getOwner().getController().confirmAction(c.getFirstSpellAbility(), PlayerActionConfirmMode.ChangeZoneToAltDestination, c.getDisplayName() + ": If a commander is in a graveyard or in exile and that card was put into that zone since the last time state-based actions were checked, its owner may put it into the command zone.", null)) {
moveTo(c.getOwner().getZone(ZoneType.Command), c, null, mapParams);
return true;
}
@@ -2217,7 +2217,7 @@ public class GameAction {
/** Delivers a message to all players. (use reveal to show Cards) */
public void notifyOfValue(SpellAbility saSource, GameObject relatedTarget, String value, Player playerExcept) {
if (saSource != null) {
String name = CardTranslation.getTranslatedName(saSource.getHostCard().getName());
String name = saSource.getHostCard().getTranslatedName();
value = TextUtil.fastReplace(value, "CARDNAME", name);
value = TextUtil.fastReplace(value, "NICKNAME", Lang.getInstance().getNickName(name));
}
@@ -2420,7 +2420,7 @@ public class GameAction {
// it to either player or the papercard object so it feels like rule based for the player side..
if (!c.hasMarkedColor()) {
if (takesAction.isAI()) {
String prompt = CardTranslation.getTranslatedName(c.getName()) + ": " +
String prompt = c.getTranslatedName() + ": " +
Localizer.getInstance().getMessage("lblChooseNColors", Lang.getNumeral(2));
SpellAbility sa = new SpellAbility.EmptySa(ApiType.ChooseColor, c, takesAction);
sa.putParam("AILogic", "MostProminentInComputerDeck");
@@ -2806,7 +2806,7 @@ public class GameAction {
final FCollection<Player> players = game.getPlayers().filter(PlayerPredicates.canBeAttached(source, null));
final Player pa = p.getController().chooseSingleEntityForEffect(players, aura,
Localizer.getInstance().getMessage("lblSelectAPlayerAttachSourceTo", CardTranslation.getTranslatedName(source.getName())), null);
Localizer.getInstance().getMessage("lblSelectAPlayerAttachSourceTo", source.getTranslatedName()), null);
if (pa != null) {
source.attachToEntity(pa, null, true);
return true;
@@ -2831,7 +2831,7 @@ public class GameAction {
}
final Card o = p.getController().chooseSingleEntityForEffect(list, aura,
Localizer.getInstance().getMessage("lblSelectACardAttachSourceTo", CardTranslation.getTranslatedName(source.getName())), null);
Localizer.getInstance().getMessage("lblSelectACardAttachSourceTo", source.getTranslatedName()), null);
if (o != null) {
source.attachToEntity(game.getCardState(o), null, true);
return true;

View File

@@ -633,7 +633,7 @@ public final class GameActionUtil {
}
} else if (o.equals("Conspire")) {
final String conspireCost = "tapXType<2/Creature.SharesColorWith/" +
"creature that shares a color with " + host.getName() + ">";
"creature that shares a color with " + host.getDisplayName() + ">";
final Cost cost = new Cost(conspireCost, false);
String str = "Pay for Conspire? " + cost.toSimpleString();
@@ -744,7 +744,7 @@ public final class GameActionUtil {
for (KeywordInterface ki : c.getKeywords()) {
if (kw.equals(ki.getOriginal())) {
final Cost cost = new Cost(ManaCost.ONE, false);
String str = "Choose Amount for " + c.getName() + ": " + cost.toSimpleString();
String str = "Choose Amount for " + c.getDisplayName() + ": " + cost.toSimpleString();
int v = pc.chooseNumberForKeywordCost(sa, cost, ki, str, Integer.MAX_VALUE);

View File

@@ -229,18 +229,18 @@ public abstract class GameEntity implements GameObject, IIdentifiable {
}
public String cantBeAttachedMsg(final Card attach, SpellAbility sa, boolean checkSBA) {
if (!attach.isAttachment()) {
return attach.getName() + " is not an attachment";
return attach.getDisplayName() + " is not an attachment";
}
if (equals(attach)) {
return attach.getName() + " can't attach to itself";
return attach.getDisplayName() + " can't attach to itself";
}
if (attach.isCreature() && !attach.hasKeyword(Keyword.RECONFIGURE)) {
return attach.getName() + " is a creature without reconfigure";
return attach.getDisplayName() + " is a creature without reconfigure";
}
if (attach.isPhasedOut()) {
return attach.getName() + " is phased out";
return attach.getDisplayName() + " is phased out";
}
if (attach.isAura()) {

View File

@@ -147,7 +147,7 @@ public abstract class SpellAbilityEffect {
sb.append(TextUtil.enclosedParen(TextUtil.concatNoSpace("X","=",String.valueOf(amount))));
}
String currentName = CardTranslation.getTranslatedName(sa.getHostCard().getName());
String currentName = sa.getHostCard().getTranslatedName();
String substitutedDesc = TextUtil.fastReplace(sb.toString(), "CARDNAME", currentName);
substitutedDesc = TextUtil.fastReplace(substitutedDesc, "NICKNAME", Lang.getInstance().getNickName(currentName));
return substitutedDesc;
@@ -670,7 +670,7 @@ public abstract class SpellAbilityEffect {
}
// build an Effect with that information
String name = host.getName() + "'s Effect";
String name = host.getDisplayName() + "'s Effect";
final Card eff = createEffect(sa, controller, name, host.getImageKey());
if (cards != null) {
@@ -735,7 +735,7 @@ public abstract class SpellAbilityEffect {
Map<String, Object> params = Maps.newHashMap();
params.put("Attacker", c);
defender = sa.getActivatingPlayer().getController().chooseSingleEntityForEffect(defs, sa,
Localizer.getInstance().getMessage("lblChooseDefenderToAttackWithCard", CardTranslation.getTranslatedName(c.getName())), false, params);
Localizer.getInstance().getMessage("lblChooseDefenderToAttackWithCard", c.getTranslatedName()), false, params);
if (defender != null && !combat.getAttackersOf(defender).contains(c)) {
// we might be reselecting

View File

@@ -9,7 +9,6 @@ import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.trigger.TriggerType;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Localizer;
public class AbandonEffect extends SpellAbilityEffect {
@@ -24,7 +23,7 @@ public class AbandonEffect extends SpellAbilityEffect {
Player controller = source.getController();
boolean isOptional = sa.hasParam("Optional");
if (isOptional && !controller.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblWouldYouLikeAbandonSource", CardTranslation.getTranslatedName(source.getName())), null)) {
if (isOptional && !controller.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblWouldYouLikeAbandonSource", source.getTranslatedName()), null)) {
return;
}

View File

@@ -69,7 +69,7 @@ public class AddTurnEffect extends SpellAbilityEffect {
public static void createCantSetSchemesInMotionEffect(SpellAbility sa) {
final Card hostCard = sa.getHostCard();
final Game game = hostCard.getGame();
final String name = hostCard.getName() + "'s Effect";
final String name = hostCard.getDisplayName() + "'s Effect";
final String image = hostCard.getImageKey();
final Card eff = createEffect(sa, sa.getActivatingPlayer(), name, image);

View File

@@ -20,7 +20,6 @@ import forge.game.card.CardPredicates;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Lang;
import forge.util.Localizer;
import forge.util.collect.FCollection;
@@ -124,7 +123,7 @@ public class AttachEffect extends SpellAbilityEffect {
}
String attachToName;
if (attachTo instanceof Card) {
attachToName = CardTranslation.getTranslatedName(((Card)attachTo).getName());
attachToName = ((Card) attachTo).getTranslatedName();
} else {
attachToName = attachTo.toString();
}
@@ -141,7 +140,7 @@ public class AttachEffect extends SpellAbilityEffect {
continue;
}
String message = Localizer.getInstance().getMessage("lblDoYouWantAttachSourceToTarget", CardTranslation.getTranslatedName(attachment.getName()), attachToName);
String message = Localizer.getInstance().getMessage("lblDoYouWantAttachSourceToTarget", attachment.getTranslatedName(), attachToName);
if (sa.hasParam("Optional") && !activator.getController().confirmAction(sa, null, message, null))
// TODO add params for message
continue;

View File

@@ -9,7 +9,6 @@ import forge.game.event.GameEventCombatChanged;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.spellability.SpellAbilityStackInstance;
import forge.util.CardTranslation;
import forge.util.Lang;
import forge.util.Localizer;
@@ -35,7 +34,7 @@ public class ChangeCombatantsEffect extends SpellAbilityEffect {
// TODO: may expand this effect for defined blocker (False Orders, General Jarkeld, Sorrow's Path, Ydwen Efreet)
for (final Card c : getTargetCards(sa)) {
String cardString = CardTranslation.getTranslatedName(c.getName()) + " (" + c.getId() + ")";
String cardString = c.getTranslatedName() + " (" + c.getId() + ")";
if (isOptional && !activator.getController().confirmAction(sa, null,
Localizer.getInstance().getMessage("lblChangeCombatantOption", cardString), null)) {
continue;

View File

@@ -553,7 +553,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
hostCard.addRemembered(CardCopyService.getLKICopy(gameCard));
}
final String prompt = TextUtil.concatWithSpace(Localizer.getInstance().getMessage("lblDoYouWantMoveTargetFromOriToDest", CardTranslation.getTranslatedName(gameCard.getName()), Lang.joinHomogenous(origin, ZoneType::getTranslatedName), destination.getTranslatedName()));
final String prompt = TextUtil.concatWithSpace(Localizer.getInstance().getMessage("lblDoYouWantMoveTargetFromOriToDest", gameCard.getTranslatedName(), Lang.joinHomogenous(origin, ZoneType::getTranslatedName), destination.getTranslatedName()));
if (optional && !chooser.getController().confirmAction(sa, null, prompt, null)) {
continue;
}
@@ -710,7 +710,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), sa.getParam("AttachAfter"), hostCard.getController(), hostCard, sa);
}
if (!list.isEmpty()) {
String title = Localizer.getInstance().getMessage("lblSelectACardAttachSourceTo", CardTranslation.getTranslatedName(gameCard.getName()));
String title = Localizer.getInstance().getMessage("lblSelectACardAttachSourceTo", gameCard.getTranslatedName());
Map<String, Object> params = Maps.newHashMap();
params.put("Attach", gameCard);
Card attachedTo = chooser.getController().chooseSingleEntityForEffect(list, sa, title, params);
@@ -735,7 +735,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
if (ZoneType.Hand.equals(destination) && ZoneType.Command.equals(originZone.getZoneType())) {
StringBuilder sb = new StringBuilder();
sb.append(movedCard.getName()).append(" has moved from Command Zone to ").append(activator).append("'s hand.");
sb.append(movedCard.getDisplayName()).append(" has moved from Command Zone to ").append(activator).append("'s hand.");
game.getGameLog().add(GameLogEntryType.ZONE_CHANGE, sb.toString());
commandCards.add(movedCard); //add to list to reveal the commandzone cards
}
@@ -1043,10 +1043,10 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
final int fetchNum = Math.min(player.getCardsIn(ZoneType.Library).size(), 4);
CardCollectionView shown = !decider.hasKeyword("LimitSearchLibrary") ? player.getCardsIn(ZoneType.Library) : player.getCardsIn(ZoneType.Library, fetchNum);
// Look at whole library before moving onto choosing a card
delayedReveal = new DelayedReveal(shown, ZoneType.Library, PlayerView.get(player), CardTranslation.getTranslatedName(source.getName()) + " - " + Localizer.getInstance().getMessage("lblLookingCardIn") + " ");
delayedReveal = new DelayedReveal(shown, ZoneType.Library, PlayerView.get(player), source.getTranslatedName() + " - " + Localizer.getInstance().getMessage("lblLookingCardIn") + " ");
}
else if (origin.contains(ZoneType.Hand) && player.isOpponentOf(decider)) {
delayedReveal = new DelayedReveal(player.getCardsIn(ZoneType.Hand), ZoneType.Hand, PlayerView.get(player), CardTranslation.getTranslatedName(source.getName()) + " - " + Localizer.getInstance().getMessage("lblLookingCardIn") + " ");
delayedReveal = new DelayedReveal(player.getCardsIn(ZoneType.Hand), ZoneType.Hand, PlayerView.get(player), source.getTranslatedName() + " - " + Localizer.getInstance().getMessage("lblLookingCardIn") + " ");
}
}
@@ -1346,7 +1346,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
list = CardLists.filter(list, CardPredicates.canBeAttached(c, sa));
}
if (!list.isEmpty()) {
String title = Localizer.getInstance().getMessage("lblSelectACardAttachSourceTo", CardTranslation.getTranslatedName(c.getName()));
String title = Localizer.getInstance().getMessage("lblSelectACardAttachSourceTo", c.getTranslatedName());
Map<String, Object> params = Maps.newHashMap();
params.put("Attach", c);
Card attachedTo = decider.getController().chooseSingleEntityForEffect(list, sa, title, params);
@@ -1363,7 +1363,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
if (sa.hasParam("AttachedToPlayer")) {
FCollectionView<Player> list = AbilityUtils.getDefinedPlayers(source, sa.getParam("AttachedToPlayer"), sa);
if (!list.isEmpty()) {
String title = Localizer.getInstance().getMessage("lblSelectACardAttachSourceTo", CardTranslation.getTranslatedName(c.getName()));
String title = Localizer.getInstance().getMessage("lblSelectACardAttachSourceTo", c.getTranslatedName());
Map<String, Object> params = Maps.newHashMap();
params.put("Attach", c);
Player attachedTo = player.getController().chooseSingleEntityForEffect(list, sa, title, params);
@@ -1391,7 +1391,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), sa.getParam("AttachAfter"), c.getController(), c, sa);
}
if (!list.isEmpty()) {
String title = Localizer.getInstance().getMessage("lblSelectACardAttachSourceTo", CardTranslation.getTranslatedName(c.getName()));
String title = Localizer.getInstance().getMessage("lblSelectACardAttachSourceTo", c.getTranslatedName());
Map<String, Object> params = Maps.newHashMap();
params.put("Attach", movedCard);
Card attachedTo = decider.getController().chooseSingleEntityForEffect(list, sa, title, params);
@@ -1530,7 +1530,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
continue;
}
SpellAbility tgtSA = decider.getController().getAbilityToPlay(tgtCard, sas);
if (!decider.getController().confirmAction(tgtSA, null, Localizer.getInstance().getMessage("lblDoYouWantPlayCard", CardTranslation.getTranslatedName(tgtCard.getName())), null)) {
if (!decider.getController().confirmAction(tgtSA, null, Localizer.getInstance().getMessage("lblDoYouWantPlayCard", tgtCard.getTranslatedName()), null)) {
continue;
}
// if played, that card cannot be found

View File

@@ -16,7 +16,6 @@ import forge.game.player.Player;
import forge.game.spellability.AbilitySub;
import forge.game.spellability.SpellAbility;
import forge.util.Aggregates;
import forge.util.CardTranslation;
import forge.util.Lang;
import forge.util.Localizer;
import forge.util.collect.FCollection;
@@ -235,7 +234,7 @@ public class CharmEffect extends SpellAbilityEffect {
}
boolean isOptional = sa.hasParam("Optional");
if (isOptional && !activator.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblWouldYouLikeCharm", CardTranslation.getTranslatedName(source.getName())), null)) {
if (isOptional && !activator.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblWouldYouLikeCharm", source.getTranslatedName()), null)) {
return false;
}

View File

@@ -6,7 +6,6 @@ import com.google.common.collect.Lists;
import forge.game.Direction;
import forge.game.player.DelayedReveal;
import forge.game.player.PlayerView;
import forge.util.CardTranslation;
import forge.card.CardType;
import forge.game.Game;
@@ -256,7 +255,7 @@ public class ChooseCardEffect extends SpellAbilityEffect {
CardCollectionView shown = !p.hasKeyword("LimitSearchLibrary")
? searched.getCardsIn(ZoneType.Library) : searched.getCardsIn(ZoneType.Library, fetchNum);
DelayedReveal delayedReveal = new DelayedReveal(shown, ZoneType.Library, PlayerView.get(searched),
CardTranslation.getTranslatedName(host.getName()) + " - " +
host.getTranslatedName() + " - " +
Localizer.getInstance().getMessage("lblLookingCardIn") + " ");
Card choice = p.getController().chooseSingleEntityForEffect(pChoices, delayedReveal, sa, title,
!sa.hasParam("Mandatory"), p, null);

View File

@@ -23,7 +23,7 @@ public class ClashEffect extends SpellAbilityEffect {
*/
@Override
protected String getStackDescription(final SpellAbility sa) {
return sa.getHostCard().getName() + " - Clash with an opponent.";
return sa.getHostCard().getDisplayName() + " - Clash with an opponent.";
}
/* (non-Javadoc)
@@ -101,7 +101,7 @@ public class ClashEffect extends SpellAbilityEffect {
pCMC = pCard.getCMC();
toReveal.add(pCard);
reveal.append(player).append(" " + Localizer.getInstance().getMessage("lblReveals") + ": ").append(pCard.getName()).append(". " + Localizer.getInstance().getMessage("lblCMC") + "= ").append(pCMC);
reveal.append(player).append(" " + Localizer.getInstance().getMessage("lblReveals") + ": ").append(pCard.getDisplayName()).append(". " + Localizer.getInstance().getMessage("lblCMC") + "= ").append(pCMC);
reveal.append("\n");
}
if (!oLib.isEmpty()) {
@@ -109,7 +109,7 @@ public class ClashEffect extends SpellAbilityEffect {
oCMC = oCard.getCMC();
toReveal.add(oCard);
reveal.append(opponent).append(" " + Localizer.getInstance().getMessage("lblReveals") + ": ").append(oCard.getName()).append(". " + Localizer.getInstance().getMessage("lblCMC") + "= ").append(oCMC);
reveal.append(opponent).append(" " + Localizer.getInstance().getMessage("lblReveals") + ": ").append(oCard.getDisplayName()).append(". " + Localizer.getInstance().getMessage("lblCMC") + "= ").append(oCMC);
reveal.append("\n");
}
@@ -138,7 +138,7 @@ public class ClashEffect extends SpellAbilityEffect {
final GameAction action = p.getGame().getAction();
final boolean putOnTop = p.getController().willPutCardOnTop(c);
final String location = putOnTop ? "top" : "bottom";
final String clashOutcome = p.getName() + " clashed and put " + c.getName() + " to the " + location + " of library.";
final String clashOutcome = p.getName() + " clashed and put " + c.getDisplayName() + " to the " + location + " of library.";
if (putOnTop) {
action.moveToLibrary(c, sa);

View File

@@ -11,7 +11,6 @@ import forge.game.card.Card;
import forge.game.event.GameEventRandomLog;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.util.CardTranslation;
import forge.util.Localizer;
public class CleanUpEffect extends SpellAbilityEffect {
@@ -76,7 +75,7 @@ public class CleanUpEffect extends SpellAbilityEffect {
protected String logOutput(SpellAbility sa, Card source) {
final StringBuilder log = new StringBuilder();
final String name = CardTranslation.getTranslatedName(source.getName());
final String name = source.getTranslatedName();
String linebreak = "\r\n";
if (sa.hasParam("ClearRemembered") && source.getRememberedCount() != 0) {

View File

@@ -11,7 +11,6 @@ import forge.game.event.GameEventCardStatsChanged;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.IterableUtil;
import forge.util.Localizer;
import forge.util.collect.FCollection;
@@ -109,7 +108,7 @@ public class CloneEffect extends SpellAbilityEffect {
}
final boolean optional = sa.hasParam("Optional");
if (optional && !host.getController().getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblDoYouWantCopy", CardTranslation.getTranslatedName(cardToCopy.getName())), null)) {
if (optional && !host.getController().getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblDoYouWantCopy", cardToCopy.getTranslatedName()), null)) {
return;
}

View File

@@ -9,7 +9,6 @@ import forge.game.card.Card;
import forge.game.card.CardCollectionView;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.util.CardTranslation;
import forge.util.Localizer;
@@ -87,8 +86,8 @@ public class ControlExchangeEffect extends SpellAbilityEffect {
if (sa.hasParam("Optional") && !sa.getActivatingPlayer().getController().confirmAction(sa, null,
Localizer.getInstance().getMessage("lblExchangeControl",
CardTranslation.getTranslatedName(object1.getName()),
CardTranslation.getTranslatedName(object2.getName())), null)) {
object1.getTranslatedName(),
object2.getTranslatedName()), null)) {
return;
}

View File

@@ -22,7 +22,6 @@ import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.trigger.TriggerType;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Localizer;
public class ControlGainEffect extends SpellAbilityEffect {
@@ -154,7 +153,7 @@ public class ControlGainEffect extends SpellAbilityEffect {
if (sa.hasParam("Optional") && !activator.getController().confirmAction(sa, null,
Localizer.getInstance().getMessage("lblGainControlConfirm", newController,
CardTranslation.getTranslatedName(tgtC.getName())), null)) {
tgtC.getTranslatedName()), null)) {
continue;
}

View File

@@ -92,7 +92,7 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
}
for (SpellAbility chosenSA : copySpells) {
if (isOptional && !controller.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblDoyouWantCopyTheSpell", CardTranslation.getTranslatedName(chosenSA.getHostCard().getName())), null)) {
if (isOptional && !controller.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblDoyouWantCopyTheSpell", chosenSA.getHostCard().getTranslatedName()), null)) {
continue;
}

View File

@@ -19,7 +19,6 @@ import forge.game.player.Player;
import forge.game.player.PlayerController;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Localizer;
import forge.util.TextUtil;
@@ -182,7 +181,7 @@ public class CountersMoveEffect extends SpellAbilityEffect {
if (counterNum.equals("Any")) {
tgtCards = activator.getController().chooseCardsForEffect(
tgtCards, sa, Localizer.getInstance().getMessage("lblChooseCardToGetCountersFrom",
cType.getName(), CardTranslation.getTranslatedName(source.getName())),
cType.getName(), source.getTranslatedName()),
0, tgtCards.size(), true, params);
}
@@ -212,7 +211,7 @@ public class CountersMoveEffect extends SpellAbilityEffect {
params.put("Target", cur);
int cnum = activator.getController().chooseNumber(sa,
Localizer.getInstance().getMessage("lblPutHowManyTargetCounterOnCard", cType.getName(),
CardTranslation.getTranslatedName(cur.getName())),
cur.getTranslatedName()),
0, source.getCounters(cType), params);
if (cnum > 0) {
@@ -353,7 +352,7 @@ public class CountersMoveEffect extends SpellAbilityEffect {
int min = sa.hasParam("NonZero") && countersToAdd.isEmpty() ? 1 : 0;
cnum = pc.chooseNumber(
sa, Localizer.getInstance().getMessage("lblTakeHowManyTargetCounterFromCard",
cType.getName(), CardTranslation.getTranslatedName(src.getName())),
cType.getName(), src.getTranslatedName()),
min, cmax, params);
} else {
cnum = Math.min(cmax, AbilityUtils.calculateAmount(host, counterNum, sa));

View File

@@ -486,7 +486,7 @@ public class CountersPutEffect extends SpellAbilityEffect {
} else {
counterAmount = pc.chooseNumber(sa,
Localizer.getInstance().getMessage("lblHowManyCountersThis",
CardTranslation.getTranslatedName(gameCard.getName())),
gameCard.getTranslatedName()),
1, counterRemain, params);
}
}
@@ -529,7 +529,7 @@ public class CountersPutEffect extends SpellAbilityEffect {
String message = Localizer.getInstance().getMessage(
"lblDoYouWantPutTargetP1P1CountersOnCard", String.valueOf(counterAmount),
CardTranslation.getTranslatedName(gameCard.getName()));
gameCard.getTranslatedName());
placer = pc.chooseSingleEntityForEffect(activator.getOpponents(), sa,
Localizer.getInstance().getMessage("lblChooseAnOpponent"), params);
@@ -721,7 +721,7 @@ public class CountersPutEffect extends SpellAbilityEffect {
protected String logOutput(Map<Object, Integer> randomMap, Card card) {
StringBuilder randomLog = new StringBuilder();
randomLog.append(card.getName()).append(" randomly distributed ");
randomLog.append(card.getDisplayName()).append(" randomly distributed ");
if (randomMap.entrySet().size() == 0) {
randomLog.append("no counters.");
} else {

View File

@@ -16,7 +16,6 @@ import forge.game.player.Player;
import forge.game.player.PlayerController;
import forge.game.player.PlayerController.BinaryChoiceType;
import forge.game.spellability.SpellAbility;
import forge.util.CardTranslation;
import forge.util.Expressions;
import forge.util.Lang;
import forge.util.Localizer;
@@ -80,7 +79,7 @@ public class CountersPutOrRemoveEffect extends SpellAbilityEffect {
}
if (sa.hasParam("Optional") && !pl.getController().confirmAction(sa, null,
Localizer.getInstance().getMessage("lblWouldYouLikePutRemoveCounters", ctype.getName(),
CardTranslation.getTranslatedName(gameCard.getName())), null)) {
gameCard.getTranslatedName()), null)) {
continue;
}
if (gameCard.hasCounters()) {
@@ -135,7 +134,7 @@ public class CountersPutOrRemoveEffect extends SpellAbilityEffect {
putCounter = false;
} else {
params.put("CounterType", chosenType);
prompt = Localizer.getInstance().getMessage("lblWhatToDoWithTargetCounter", chosenType.getName(), CardTranslation.getTranslatedName(tgtCard.getName())) + " ";
prompt = Localizer.getInstance().getMessage("lblWhatToDoWithTargetCounter", chosenType.getName(), tgtCard.getTranslatedName()) + " ";
putCounter = pc.chooseBinary(sa, prompt, BinaryChoiceType.AddOrRemove, params);
}
}

View File

@@ -28,7 +28,7 @@ public class DestroyAllEffect extends SpellAbilityEffect {
final StringBuilder sb = new StringBuilder();
final boolean noRegen = sa.hasParam("NoRegen");
sb.append(sa.getHostCard().getName()).append(" - Destroy permanents.");
sb.append(sa.getHostCard().getDisplayName()).append(" - Destroy permanents.");
if (noRegen) {
sb.append(" They can't be regenerated");

View File

@@ -16,7 +16,6 @@ import forge.game.player.Player;
import forge.game.player.PlayerView;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Lang;
import forge.util.Localizer;
import forge.util.TextUtil;
@@ -197,7 +196,7 @@ public class DigEffect extends SpellAbilityEffect {
}
else if (!sa.hasParam("NoLooking")) {
// show the user the revealed cards
delayedReveal = new DelayedReveal(top, srcZone, PlayerView.get(p), CardTranslation.getTranslatedName(host.getName()) + " - " + Localizer.getInstance().getMessage("lblLookingCardIn") + " ");
delayedReveal = new DelayedReveal(top, srcZone, PlayerView.get(p), host.getTranslatedName() + " - " + Localizer.getInstance().getMessage("lblLookingCardIn") + " ");
}
if (sa.hasParam("RememberRevealed") && hasRevealed) {
@@ -249,7 +248,7 @@ public class DigEffect extends SpellAbilityEffect {
// Optional abilities that use a dialog box to prompt the user to skip the ability (e.g. Explorer's Scope, Quest for Ula's Temple)
if (optional && mayBeSkipped && !valid.isEmpty()) {
String prompt = optionalAbilityPrompt != null ? optionalAbilityPrompt : Localizer.getInstance().getMessage("lblWouldYouLikeProceedWithOptionalAbility") + " " + host + "?\n\n(" + sa.getDescription() + ")";
if (!p.getController().confirmAction(sa, null, TextUtil.fastReplace(prompt, "CARDNAME", CardTranslation.getTranslatedName(host.getName())), null)) {
if (!p.getController().confirmAction(sa, null, TextUtil.fastReplace(prompt, "CARDNAME", host.getTranslatedName()), null)) {
return;
}
}

View File

@@ -19,7 +19,6 @@ import forge.game.trigger.TriggerType;
import forge.game.zone.PlayerZone;
import forge.game.zone.Zone;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Lang;
import forge.util.Localizer;
@@ -79,7 +78,7 @@ public class DiscoverEffect extends SpellAbilityEffect {
params.put("Card", found);
if (found != null) {
String prompt = Localizer.getInstance().getMessage("lblDiscoverChoice",
CardTranslation.getTranslatedName(found.getName()));
found.getTranslatedName());
final Zone origin = found.getZone();
List<String> options =
Arrays.asList(StringUtils.capitalize(Localizer.getInstance().getMessage("lblCast")),

View File

@@ -24,7 +24,7 @@ import java.util.*;
final StringBuilder sb = new StringBuilder();
sb.append(player).append(" drafts a card from ").append(source.getName()).append("'s spellbook");
sb.append(player).append(" drafts a card from ").append(source.getDisplayName()).append("'s spellbook");
if (zone.equals(ZoneType.Hand)) {
sb.append(".");
} else if (zone.equals(ZoneType.Battlefield)) {

View File

@@ -11,7 +11,6 @@ import forge.game.card.CardCollectionView;
import forge.game.card.CardZoneTable;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.util.CardTranslation;
import forge.util.Localizer;
public class EncodeEffect extends SpellAbilityEffect {
@@ -47,7 +46,7 @@ public class EncodeEffect extends SpellAbilityEffect {
}
// Handle choice of whether or not to encoded
if (!activator.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblDoYouWantExileCardAndEncodeOntoYouCreature", CardTranslation.getTranslatedName(host.getName())), null)) {
if (!activator.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblDoYouWantExileCardAndEncodeOntoYouCreature", host.getTranslatedName()), null)) {
return;
}

View File

@@ -21,7 +21,6 @@ import forge.game.event.GameEventTokenCreated;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Lang;
import forge.util.Localizer;
@@ -69,7 +68,7 @@ public class EndureEffect extends TokenEffectBase {
params.put("Amount", amount);
if (gamec != null && gamec.isInPlay() && gamec.equalsWithGameTimestamp(c) && gamec.canReceiveCounters(CounterEnumType.P1P1)
&& pl.getController().confirmAction(sa, null,
Localizer.getInstance().getMessage("lblEndureAction", CardTranslation.getTranslatedName(c.getName()), amount),
Localizer.getInstance().getMessage("lblEndureAction", c.getTranslatedName(), amount),
gamec, params)) {
gamec.addCounter(CounterEnumType.P1P1, amount, pl, table);
} else {

View File

@@ -18,7 +18,6 @@ import forge.game.replacement.ReplacementType;
import forge.game.spellability.SpellAbility;
import forge.game.trigger.TriggerType;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Lang;
import forge.util.Localizer;
@@ -82,7 +81,7 @@ public class ExploreEffect extends SpellAbilityEffect {
params.put("RevealedCard", r);
if (pl.getController().confirmAction(sa, null,
Localizer.getInstance().getMessage("lblPutThisCardToYourGraveyard",
CardTranslation.getTranslatedName(r.getName())), r, params))
r.getTranslatedName()), r, params))
game.getAction().moveTo(ZoneType.Graveyard, r, sa, moveParams);
}
}

View File

@@ -17,7 +17,6 @@ import forge.game.player.Player;
import forge.game.replacement.ReplacementType;
import forge.game.spellability.SpellAbility;
import forge.game.trigger.TriggerType;
import forge.util.CardTranslation;
import forge.util.Lang;
import forge.util.Localizer;
@@ -65,7 +64,7 @@ public class FightEffect extends DamageBaseEffect {
Player controller = host.getController();
boolean isOptional = sa.hasParam("Optional");
if (isOptional && !controller.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblWouldYouLikeFight", CardTranslation.getTranslatedName(fighters.get(0).getName()), CardTranslation.getTranslatedName(fighters.get(1).getName())), null)) {
if (isOptional && !controller.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblWouldYouLikeFight", fighters.get(0).getTranslatedName(), fighters.get(1).getTranslatedName()), null)) {
return;
}

View File

@@ -206,7 +206,7 @@ public class FlipCoinEffect extends SpellAbilityEffect {
} else {
// no reason to ask if result is fixed anyway
if (!noCall) {
choice = flipper.getController().chooseBinary(sa, sa.getHostCard().getName() + " - " + Localizer.getInstance().getMessage("lblCallCoinFlip") + info, PlayerController.BinaryChoiceType.HeadsOrTails);
choice = flipper.getController().chooseBinary(sa, sa.getHostCard().getDisplayName() + " - " + Localizer.getInstance().getMessage("lblCallCoinFlip") + info, PlayerController.BinaryChoiceType.HeadsOrTails);
}
for (int i = 0; i < multiplier; i++) {

View File

@@ -109,7 +109,7 @@ public class MakeCardEffect extends SpellAbilityEffect {
chosen = Aggregates.random(faces).getName();
} else {
final String sbName = sa.hasParam("SpellbookName") ? sa.getParam("SpellbookName") :
CardTranslation.getTranslatedName(source.getName());
source.getTranslatedName();
final String message = sa.hasParam("Choices") ?
Localizer.getInstance().getMessage("lblChooseaCard") :
Localizer.getInstance().getMessage("lblChooseFromSpellbook", sbName);

View File

@@ -13,7 +13,6 @@ import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.zone.PlayerZone;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Lang;
import forge.util.Localizer;
@@ -82,7 +81,7 @@ public class PeekAndRevealEffect extends SpellAbilityEffect {
boolean doReveal = !sa.hasParam("NoReveal") && !revealableCards.isEmpty();
if (!noPeek) {
peekingPlayer.getController().reveal(peekCards, srcZone, zoneToPeek,
CardTranslation.getTranslatedName(source.getName()) + " - " +
source.getTranslatedName() + " - " +
Localizer.getInstance().getMessage("lblLookingCardFrom"));
}
@@ -91,7 +90,7 @@ public class PeekAndRevealEffect extends SpellAbilityEffect {
if (doReveal) {
peekingPlayer.getGame().getAction().reveal(revealableCards, srcZone, zoneToPeek, !noPeek,
CardTranslation.getTranslatedName(source.getName()) + " - " +
source.getTranslatedName() + " - " +
Localizer.getInstance().getMessage("lblRevealingCardFrom"));
if (rememberRevealed) {

View File

@@ -247,7 +247,7 @@ public class PlayEffect extends SpellAbilityEffect {
game.getAction().revealTo(tgtCard, controller);
}
String prompt = sa.hasParam("CastTransformed") ? "lblDoYouWantPlayCardTransformed" : "lblDoYouWantPlayCard";
if (singleOption && !controller.getController().confirmAction(sa, null, Localizer.getInstance().getMessage(prompt, CardTranslation.getTranslatedName(tgtCard.getName())), tgtCard, null)) {
if (singleOption && !controller.getController().confirmAction(sa, null, Localizer.getInstance().getMessage(prompt, tgtCard.getTranslatedName()), tgtCard, null)) {
if (wasFaceDown) {
tgtCard.turnFaceDownNoUpdate();
tgtCard.updateStateForView();
@@ -490,7 +490,7 @@ public class PlayEffect extends SpellAbilityEffect {
public static void addReplaceGraveyardEffect(Card c, Card hostCard, SpellAbility sa, SpellAbility tgtSA, String zone) {
final Game game = hostCard.getGame();
final Player controller = sa.getActivatingPlayer();
final String name = hostCard.getName() + "'s Effect";
final String name = hostCard.getDisplayName() + "'s Effect";
final String image = hostCard.getImageKey();
final Card eff = createEffect(sa, controller, name, image);

View File

@@ -94,7 +94,7 @@ public class SacrificeEffect extends SpellAbilityEffect {
if (valid.equals("Self") && game.getZoneOf(host) != null) {
if (host.getController().equals(activator) && game.getZoneOf(host).is(ZoneType.Battlefield) &&
(!optional || activator.getController().confirmAction(sa, null,
Localizer.getInstance().getMessage("lblDoYouWantSacrificeThis", host.getName()), null))) {
Localizer.getInstance().getMessage("lblDoYouWantSacrificeThis", host.getDisplayName()), null))) {
if (game.getAction().sacrifice(new CardCollection(host), sa, true, params) != null && remSacrificed) {
host.addRemembered(host);
}

View File

@@ -162,7 +162,7 @@ public class SetStateEffect extends SpellAbilityEffect {
}
if (optional) {
String message = TextUtil.concatWithSpace("Transform", gameCard.getName(), "?");
String message = TextUtil.concatWithSpace("Transform", gameCard.getDisplayName(), "?");
if (!p.getController().confirmAction(sa, PlayerActionConfirmMode.Random, message, null)) {
return;
}
@@ -183,22 +183,22 @@ public class SetStateEffect extends SpellAbilityEffect {
}
if (hasTransformed) {
if (sa.isMorphUp()) {
String sb = p + " has unmorphed " + gameCard.getName();
String sb = p + " has unmorphed " + gameCard.getDisplayName();
game.getGameLog().add(GameLogEntryType.STACK_RESOLVE, sb);
} else if (sa.isManifestUp()) {
String sb = p + " has unmanifested " + gameCard.getName();
String sb = p + " has unmanifested " + gameCard.getDisplayName();
game.getGameLog().add(GameLogEntryType.STACK_RESOLVE, sb);
} else if (sa.isDisguiseUp()) {
String sb = p + " has undisguised " + gameCard.getName();
String sb = p + " has undisguised " + gameCard.getDisplayName();
game.getGameLog().add(GameLogEntryType.STACK_RESOLVE, sb);
} else if (sa.isCloakUp()) {
String sb = p + " has uncloaked " + gameCard.getName();
String sb = p + " has uncloaked " + gameCard.getDisplayName();
game.getGameLog().add(GameLogEntryType.STACK_RESOLVE, sb);
} else if (sa.isKeyword(Keyword.DOUBLE_AGENDA)) {
String sb = p + " has revealed " + gameCard.getName() + " with the chosen names: " + gameCard.getNamedCards();
String sb = p + " has revealed " + gameCard.getDisplayName() + " with the chosen names: " + gameCard.getNamedCards();
game.getGameLog().add(GameLogEntryType.STACK_RESOLVE, sb);
} else if (sa.isKeyword(Keyword.HIDDEN_AGENDA)) {
String sb = p + " has revealed " + gameCard.getName() + " with the chosen name " + gameCard.getNamedCard();
String sb = p + " has revealed " + gameCard.getDisplayName() + " with the chosen name " + gameCard.getNamedCard();
game.getGameLog().add(GameLogEntryType.STACK_RESOLVE, sb);
}
game.fireEvent(new GameEventCardStatsChanged(gameCard));

View File

@@ -23,7 +23,6 @@ import forge.game.spellability.SpellAbility;
import forge.game.zone.PlayerZone;
import forge.game.zone.ZoneType;
import forge.item.PaperCard;
import forge.util.CardTranslation;
import forge.util.Lang;
import forge.util.Localizer;
import forge.util.collect.FCollectionView;
@@ -77,7 +76,7 @@ public class SubgameEffect extends SpellAbilityEffect {
Card cmd = Card.fromPaperCard(card.getPaperCard(), player);
if (cmd.hasKeyword("If CARDNAME is your commander, choose a color before the game begins.")) {
List<String> colorChoices = new ArrayList<>(MagicColor.Constant.ONLY_COLORS);
String prompt = Localizer.getInstance().getMessage("lblChooseAColorFor", cmd.getName());
String prompt = Localizer.getInstance().getMessage("lblChooseAColorFor", cmd.getDisplayName());
List<String> chosenColors;
SpellAbility cmdColorsa = new SpellAbility.EmptySa(ApiType.ChooseColor, cmd, player);
chosenColors = player.getController().chooseColors(prompt,cmdColorsa, 1, 1, colorChoices);
@@ -164,7 +163,7 @@ public class SubgameEffect extends SpellAbilityEffect {
Game subgame = createSubGame(maingame, startingLife);
String startMessage = Localizer.getInstance().getMessage("lblSubgameStart",
CardTranslation.getTranslatedName(hostCard.getName()));
hostCard.getTranslatedName());
maingame.fireEvent(new GameEventSubgameStart(subgame, startMessage));
prepareAllZonesSubgame(maingame, subgame);

View File

@@ -11,7 +11,6 @@ import forge.game.player.Player;
import forge.game.player.PlayerController;
import forge.game.spellability.SpellAbility;
import forge.game.trigger.TriggerType;
import forge.util.CardTranslation;
import forge.util.Lang;
import forge.util.Localizer;
@@ -64,7 +63,7 @@ public class TapOrUntapEffect extends SpellAbilityEffect {
// If the effected card is controlled by the same controller of the SA, default to untap.
boolean tap;
if(!toggle)
tap = pc.chooseBinary(sa, Localizer.getInstance().getMessage("lblTapOrUntapTarget", CardTranslation.getTranslatedName(gameCard.getName())), PlayerController.BinaryChoiceType.TapOrUntap,
tap = pc.chooseBinary(sa, Localizer.getInstance().getMessage("lblTapOrUntapTarget", gameCard.getTranslatedName()), PlayerController.BinaryChoiceType.TapOrUntap,
!gameCard.getController().equals(tapper));
else
tap = !gameCard.isTapped();

View File

@@ -19,7 +19,6 @@ import forge.game.player.PlayerController;
import forge.game.player.PlayerController.BinaryChoiceType;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Localizer;
public class TimeTravelEffect extends SpellAbilityEffect {
@@ -53,7 +52,7 @@ public class TimeTravelEffect extends SpellAbilityEffect {
Map<String, Object> params = Maps.newHashMap();
params.put("Target", c);
params.put("CounterType", counterType);
prompt = Localizer.getInstance().getMessage("lblWhatToDoWithTargetCounter", counterType.getName(), CardTranslation.getTranslatedName(c.getName())) + " ";
prompt = Localizer.getInstance().getMessage("lblWhatToDoWithTargetCounter", counterType.getName(), c.getTranslatedName()) + " ";
boolean putCounter = pc.chooseBinary(sa, prompt, BinaryChoiceType.AddOrRemove, params);
if (putCounter) {

View File

@@ -7171,7 +7171,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars, ITr
String v = kwt.getValidType();
String desc = kwt.getTypeDescription();
if (!isValid(v.split(","), aura.getController(), aura, null) || (!v.contains("inZone") && !isInPlay())) {
return getName() + " is not " + Lang.nounWithAmount(1, desc);
return getDisplayName() + " is not " + Lang.nounWithAmount(1, desc);
}
}
}
@@ -7182,17 +7182,17 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars, ITr
@Override
protected String cantBeEquippedByMsg(final Card equip, SpellAbility sa) {
if (!isInPlay()) {
return getName() + " is not in play";
return getDisplayName() + " is not in play";
}
if (sa != null && sa.isEquip()) {
if (!isValid(sa.getTargetRestrictions().getValidTgts(), sa.getActivatingPlayer(), equip, sa)) {
Equip eq = (Equip) sa.getKeyword();
return getName() + " is not " + Lang.nounWithAmount(1, eq.getValidDescription());
return getDisplayName() + " is not " + Lang.nounWithAmount(1, eq.getValidDescription());
}
return null;
}
if (!isCreature()) {
return getName() + " is not a creature";
return getDisplayName() + " is not a creature";
}
return null;
}
@@ -7200,13 +7200,13 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars, ITr
@Override
protected String cantBeFortifiedByMsg(final Card fort) {
if (!isLand()) {
return getName() + " is not a Land";
return getDisplayName() + " is not a Land";
}
if (!isInPlay()) {
return getName() + " is not in play";
return getDisplayName() + " is not in play";
}
if (fort.isLand()) {
return fort.getName() + " is a Land";
return fort.getDisplayName() + " is a Land";
}
return null;
@@ -7215,7 +7215,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars, ITr
@Override
public String cantBeAttachedMsg(final Card attach, SpellAbility sa, boolean checkSBA) {
if (isPhasedOut() && !attach.isPhasedOut()) {
return getName() + " is phased out";
return getDisplayName() + " is phased out";
}
return super.cantBeAttachedMsg(attach, sa, checkSBA);
}

View File

@@ -222,7 +222,7 @@ public class CardFactoryUtil {
//Predicate<Card> pc = Predicates.in(player.getAllCards());
// TODO This would be better to send in the player's deck, not all cards
String name = player.getController().chooseCardName(sa, cpp, "Card",
"Name a card for " + card.getName());
"Name a card for " + card.getDisplayName());
if (name == null || name.isEmpty()) {
return false;
}
@@ -230,7 +230,7 @@ public class CardFactoryUtil {
if (ki.getKeyword().equals(Keyword.DOUBLE_AGENDA)) {
String name2 = player.getController().chooseCardName(sa, cpp, "Card.!NamedCard",
"Name a second card for " + card.getName());
"Name a second card for " + card.getDisplayName());
if (name2 == null || name2.isEmpty()) {
return false;
}
@@ -1289,10 +1289,10 @@ public class CardFactoryUtil {
final StringBuilder sb = new StringBuilder();
if (card.isCreature()) {
sb.append("When ").append(card.getName());
sb.append("When ").append(card.getDisplayName());
sb.append(" enters or the creature it haunts dies, ");
} else {
sb.append("When the creature ").append(card.getName());
sb.append("When the creature ").append(card.getDisplayName());
sb.append(" haunts dies, ");
}
@@ -1484,7 +1484,7 @@ public class CardFactoryUtil {
if (!"ManaCost".equals(manacost)) {
desc.append(ManaCostParser.parse(manacost)).append(" ");
}
desc.append(" - " + card.getName());
desc.append(" - " + card.getDisplayName());
final String trigStr = "Mode$ Exiled | ValidCard$ Card.Self | Secondary$ True | TriggerDescription$ " + desc.toString();
@@ -3762,10 +3762,10 @@ public class CardFactoryUtil {
c.addCounter(CounterEnumType.TIME, counters, getActivatingPlayer(), table);
table.replaceCounterEffect(game, this, false); // this is a special Action, not an Effect
String sb = TextUtil.concatWithSpace(getActivatingPlayer().toString(),"has suspended", c.getName(), "with", String.valueOf(counters),"time counters on it.");
String sb = TextUtil.concatWithSpace(getActivatingPlayer().toString(),"has suspended", c.getDisplayName(), "with", String.valueOf(counters),"time counters on it.");
game.getGameLog().add(GameLogEntryType.STACK_RESOLVE, sb);
//reveal suspended card
game.getAction().reveal(new CardCollection(c), c.getOwner(), true, c.getName() + " is suspended with " + counters + " time counters in ");
game.getAction().reveal(new CardCollection(c), c.getOwner(), true, c.getDisplayName() + " is suspended with " + counters + " time counters in ");
}
};
final StringBuilder sbDesc = new StringBuilder();

View File

@@ -38,7 +38,6 @@ import forge.game.spellability.SpellAbilityStackInstance;
import forge.game.staticability.StaticAbilityAssignCombatDamageAsUnblocked;
import forge.game.trigger.TriggerType;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.IterableUtil;
import forge.util.Localizer;
import forge.util.collect.FCollection;
@@ -733,7 +732,7 @@ public class Combat {
"defending player and/or any number of creatures they control.")
&& blocker.getController().getController().confirmStaticApplication(blocker, PlayerActionConfirmMode.AlternativeDamageAssignment,
Localizer.getInstance().getMessage("lblAssignCombatDamageAsChoose",
CardTranslation.getTranslatedName(blocker.getName())), null);
blocker.getTranslatedName()), null);
// choose defending player
if (divideCombatDamageAsChoose) {
defender = blocker.getController().getController().chooseSingleEntityForEffect(attackingPlayer.getOpponents(), null, Localizer.getInstance().getMessage("lblChoosePlayer"), null);
@@ -811,7 +810,7 @@ public class Combat {
&& StaticAbilityAssignCombatDamageAsUnblocked.assignCombatDamageAsUnblocked(attacker)) {
assignToPlayer = assigningPlayer.getController().confirmStaticApplication(attacker, PlayerActionConfirmMode.AlternativeDamageAssignment,
Localizer.getInstance().getMessage("lblAssignCombatDamageWerentBlocked",
CardTranslation.getTranslatedName(attacker.getName())), null);
attacker.getTranslatedName()), null);
}
boolean divideCombatDamageAsChoose = false;
@@ -823,7 +822,7 @@ public class Combat {
"defending player and/or any number of creatures they control.")
&& assigningPlayer.getController().confirmStaticApplication(attacker, PlayerActionConfirmMode.AlternativeDamageAssignment,
Localizer.getInstance().getMessage("lblAssignCombatDamageAsChoose",
CardTranslation.getTranslatedName(attacker.getName())), null);
attacker.getTranslatedName()), null);
if (defender instanceof Card && divideCombatDamageAsChoose) {
defender = getDefenderPlayerByAttacker(attacker);
}
@@ -831,7 +830,7 @@ public class Combat {
assignCombatDamageToCreature = !attacker.getGame().getCombat().isBlocked(attacker) && getDefendersCreatures().size() > 0 &&
attacker.hasKeyword("If CARDNAME is unblocked, you may have it assign its combat damage to a creature defending player controls.") &&
assigningPlayer.getController().confirmStaticApplication(attacker, PlayerActionConfirmMode.AlternativeDamageAssignment,
Localizer.getInstance().getMessage("lblAssignCombatDamageToCreature", CardTranslation.getTranslatedName(attacker.getName())), null);
Localizer.getInstance().getMessage("lblAssignCombatDamageToCreature", attacker.getTranslatedName()), null);
if (divideCombatDamageAsChoose) {
if (orderedBlockers == null || orderedBlockers.isEmpty()) {
orderedBlockers = getDefendersCreatures();

View File

@@ -3017,7 +3017,7 @@ public class Player extends GameEntity implements Comparable<Player> {
if (color) {
Player p = cmd.getController();
List<String> colorChoices = new ArrayList<>(MagicColor.Constant.ONLY_COLORS);
String prompt = Localizer.getInstance().getMessage("lblChooseAColorFor", cmd.getName());
String prompt = Localizer.getInstance().getMessage("lblChooseAColorFor", cmd.getDisplayName());
List<String> chosenColors;
SpellAbility cmdColorsa = new SpellAbility.EmptySa(ApiType.ChooseColor, cmd, p);
chosenColors = p.getController().chooseColors(prompt,cmdColorsa, 1, 1, colorChoices);
@@ -3219,7 +3219,7 @@ public class Player extends GameEntity implements Comparable<Player> {
}
public static DetachedCardEffect createCompanionEffect(Game game, Card companion) {
final String name = Lang.getInstance().getPossesive(companion.getName()) + " Companion Effect";
final String name = Lang.getInstance().getPossesive(companion.getDisplayName()) + " Companion Effect";
DetachedCardEffect eff = new DetachedCardEffect(companion, name);
String addToHandAbility = "Mode$ Continuous | EffectZone$ Command | Affected$ Card.YouOwn+EffectSource | AffectedZone$ Command | AddAbility$ MoveToHand";

View File

@@ -45,7 +45,6 @@ import forge.game.spellability.AbilitySub;
import forge.game.spellability.SpellAbility;
import forge.game.zone.Zone;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Localizer;
import forge.util.TextUtil;
import forge.util.Visitor;
@@ -311,7 +310,7 @@ public class ReplacementHandler {
replacementEffect.getParam("OptionalDecider"), effectSA).get(0);
}
String name = CardTranslation.getTranslatedName(MoreObjects.firstNonNull(host.getRenderForUI() ? host.getCardForUi() : null, host).getName());
String name = MoreObjects.firstNonNull(host.getRenderForUI() ? host.getCardForUi() : null, host).getTranslatedName();
String effectDesc = TextUtil.fastReplace(replacementEffect.getDescription(), "CARDNAME", name);
final String question = runParams.containsKey(AbilityKey.Card)
? Localizer.getInstance().getMessage("lblApplyCardReplacementEffectToCardConfirm", name, runParams.get(AbilityKey.Card).toString(), effectDesc)

View File

@@ -1025,12 +1025,12 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
public String getStackDescription() {
String text = getHostCard().getView().getText();
if (stackDescription.equals(text) && !text.isEmpty()) {
return getHostCard().getName() + " - " + text;
return getHostCard().getDisplayName() + " - " + text;
}
if (stackDescription.isEmpty()) {
return "";
}
return TextUtil.fastReplace(stackDescription, "CARDNAME", getHostCard().getName());
return TextUtil.fastReplace(stackDescription, "CARDNAME", getHostCard().getDisplayName());
}
public void setStackDescription(final String s) {
originalStackDescription = s;
@@ -1129,7 +1129,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
desc = TextUtil.fastReplace(desc, "CARDNAME", translatedName);
desc = TextUtil.fastReplace(desc, "NICKNAME", Lang.getInstance().getNickName(translatedName));
if (node.getOriginalHost() != null) {
desc = TextUtil.fastReplace(desc, "ORIGINALHOST", node.getOriginalHost().getName());
desc = TextUtil.fastReplace(desc, "ORIGINALHOST", node.getOriginalHost().getDisplayName());
}
sb.append(desc);
}
@@ -1954,7 +1954,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
resetTargets();
targetChosen.add(card);
setStackDescription(getHostCard().getName() + " - targeting " + card);
setStackDescription(getHostCard().getDisplayName() + " - targeting " + card);
}
/**

View File

@@ -128,14 +128,14 @@ public abstract class Trigger extends TriggerReplacementBase {
desc = TextUtil.fastReplace(desc,"CARDNAME", translatedName);
desc = TextUtil.fastReplace(desc,"NICKNAME", Lang.getInstance().getNickName(translatedName));
if (desc.contains("ORIGINALHOST") && this.getOriginalHost() != null) {
desc = TextUtil.fastReplace(desc, "ORIGINALHOST", this.getOriginalHost().getName());
desc = TextUtil.fastReplace(desc, "ORIGINALHOST", this.getOriginalHost().getDisplayName());
}
}
if (getHostCard().getEffectSource() != null) {
if (active)
desc = TextUtil.fastReplace(desc, "EFFECTSOURCE", getHostCard().getEffectSource().toString());
else
desc = TextUtil.fastReplace(desc, "EFFECTSOURCE", getHostCard().getEffectSource().getName());
desc = TextUtil.fastReplace(desc, "EFFECTSOURCE", getHostCard().getEffectSource().getDisplayName());
}
sb.append(desc);
if (!this.triggerRemembered.isEmpty()) {
@@ -210,7 +210,7 @@ public abstract class Trigger extends TriggerReplacementBase {
saDesc = saDesc.substring(0, 1).toLowerCase() + saDesc.substring(1);
}
if (saDesc.contains("ORIGINALHOST") && sa.getOriginalHost() != null) {
saDesc = TextUtil.fastReplace(saDesc, "ORIGINALHOST", sa.getOriginalHost().getName());
saDesc = TextUtil.fastReplace(saDesc, "ORIGINALHOST", sa.getOriginalHost().getDisplayName());
}
} else {
saDesc = "<take no action>"; // printed in case nothing is chosen for the ability (e.g. Charm with Up to X)

View File

@@ -84,9 +84,9 @@ public class MessageUtil {
default:
String tgt = mayBeYou(player, target);
if (tgt.equals("(null)")) {
return Localizer.getInstance().getMessage("lblCardEffectValueIs", CardTranslation.getTranslatedName(sa.getHostCard().getName()), value);
return Localizer.getInstance().getMessage("lblCardEffectValueIs", sa.getHostCard().getTranslatedName(), value);
} else {
return Localizer.getInstance().getMessage("lblCardEffectToTargetValueIs", CardTranslation.getTranslatedName(sa.getHostCard().getName()), tgt, value);
return Localizer.getInstance().getMessage("lblCardEffectToTargetValueIs", sa.getHostCard().getTranslatedName(), tgt, value);
}
}
}

View File

@@ -78,7 +78,7 @@ public class InputBlock extends InputSyncronizedBase {
if (currentAttacker == null) {
showMessage(localizer.getMessage("lblSelectBlockTarget"));
} else {
String attackerName = currentAttacker.isFaceDown() ? localizer.getMessage("lblMorph") : currentAttacker.getName() + " (" + currentAttacker.getId() + ")";
String attackerName = currentAttacker.isFaceDown() ? localizer.getMessage("lblMorph") : currentAttacker.getDisplayName() + " (" + currentAttacker.getId() + ")";
String message = localizer.getMessage("lblSelectBlocker") + attackerName + " " + localizer.getMessage("lblOrSelectBlockTarget");
showMessage(message);
}

View File

@@ -120,7 +120,7 @@ public final class InputSelectTargets extends InputSyncronizedBase {
sb.append(TextUtil.concatNoSpace("\n(", String.valueOf(maxTargets - targeted), " more can be targeted)"));
}
String name = CardTranslation.getTranslatedName(sa.getHostCard().getName());
String name = sa.getHostCard().getTranslatedName();
String message = TextUtil.fastReplace(TextUtil.fastReplace(sb.toString(),
"CARDNAME", name), "(Targeting ERROR)", "");
message = TextUtil.fastReplace(message, "NICKNAME", Lang.getInstance().getNickName(name));

View File

@@ -185,7 +185,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
public PaymentDecision visit(final CostDamage cost) {
int c = cost.getAbilityAmount(ability);
if (confirmAction(cost, Localizer.getInstance().getMessage("lblDoYouWantCardDealNDamageToYou", CardTranslation.getTranslatedName(source.getName()), String.valueOf(c)))) {
if (confirmAction(cost, Localizer.getInstance().getMessage("lblDoYouWantCardDealNDamageToYou", source.getTranslatedName(), String.valueOf(c)))) {
return PaymentDecision.number(c);
}
return null;
@@ -234,7 +234,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
if (onlyPayable != null) {
if (onlyPayable.canExiledBy(ability, isEffect()) && onlyPayable.getZone() == player.getZone(cost.from.get(0))
&& confirmAction(cost, Localizer.getInstance().getMessage("lblExileConfirm", CardTranslation.getTranslatedName(onlyPayable.getName())))) {
&& confirmAction(cost, Localizer.getInstance().getMessage("lblExileConfirm", onlyPayable.getTranslatedName()))) {
return PaymentDecision.card(onlyPayable);
}
return null;
@@ -447,7 +447,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
private PaymentDecision exileFromMiscZone(final CostExile cost, final int nNeeded, final CardCollection typeList, final boolean sharedType) {
// when it's always a single triggered card getting exiled don't act like it might be different by offering the zone for choice
if (cost.zoneRestriction == -1 && ability.isTrigger() && nNeeded == 1 && typeList.size() == 1) {
if (confirmAction(cost, Localizer.getInstance().getMessage("lblExileConfirm", CardTranslation.getTranslatedName(typeList.getFirst().getName())))) {
if (confirmAction(cost, Localizer.getInstance().getMessage("lblExileConfirm", typeList.getFirst().getTranslatedName()))) {
return PaymentDecision.card(typeList.getFirst());
}
return null;
@@ -512,7 +512,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
if (cost.payCostFromSource()) {
if (source.getController() == ability.getActivatingPlayer() && source.isInPlay()) {
return confirmAction(cost, Localizer.getInstance().getMessage("lblExertCardConfirm", CardTranslation.getTranslatedName(source.getName()))) ? PaymentDecision.card(source) : null;
return confirmAction(cost, Localizer.getInstance().getMessage("lblExertCardConfirm", source.getTranslatedName())) ? PaymentDecision.card(source) : null;
}
return null;
}
@@ -638,7 +638,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
}
GameEntityViewMap<Player, PlayerView> gameCachePlayer = GameEntityView.getMap(oppsThatCanGainLife);
final PlayerView pv = controller.getGui().oneOrNone(Localizer.getInstance().getMessage("lblCardChooseAnOpponentToGainNLife", CardTranslation.getTranslatedName(source.getName()), String.valueOf(c)), gameCachePlayer.getTrackableKeys());
final PlayerView pv = controller.getGui().oneOrNone(Localizer.getInstance().getMessage("lblCardChooseAnOpponentToGainNLife", source.getTranslatedName(), String.valueOf(c)), gameCachePlayer.getTrackableKeys());
if (pv == null || !gameCachePlayer.containsKey(pv)) {
return null;
}
@@ -738,7 +738,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
player.getCardsIn(cost.getFrom()), cost.getType().split(";"), player, source, ability);
if (cost.payCostFromSource()) {
return source.getZone() == player.getZone(cost.from) && confirmAction(cost, Localizer.getInstance().getMessage("lblPutCardToLibraryConfirm", CardTranslation.getTranslatedName(source.getName()))) ? PaymentDecision.card(source) : null;
return source.getZone() == player.getZone(cost.from) && confirmAction(cost, Localizer.getInstance().getMessage("lblPutCardToLibraryConfirm", source.getTranslatedName())) ? PaymentDecision.card(source) : null;
}
if (cost.from == ZoneType.Hand) {
@@ -818,7 +818,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
if (cost.payCostFromSource()) {
// UnlessCost so player might not want to pay (Fabricate)
if (ability.hasParam("UnlessCost") && !confirmAction(cost, Localizer.getInstance().getMessage("lblPutNTypeCounterOnTarget", String.valueOf(c), cost.getCounter().getName(), ability.getHostCard().getName()))) {
if (ability.hasParam("UnlessCost") && !confirmAction(cost, Localizer.getInstance().getMessage("lblPutNTypeCounterOnTarget", String.valueOf(c), cost.getCounter().getName(), ability.getHostCard().getDisplayName()))) {
return null;
}
cost.setLastPaidAmount(c);
@@ -998,7 +998,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
counterType = cType;
String fromWhat = costPart.getDescriptiveType();
if (fromWhat.equals("CARDNAME") || fromWhat.equals("NICKNAME")) {
fromWhat = CardTranslation.getTranslatedName(sa.getHostCard().getName());
fromWhat = sa.getHostCard().getTranslatedName();
}
setMessage(Localizer.getInstance().getMessage("lblRemoveNTargetCounterFromCardPayCostSelect",
@@ -1121,7 +1121,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
if (maxCounters < cntRemoved) {
return null;
}
if (!confirmAction(cost, Localizer.getInstance().getMessage("lblRemoveNTargetCounterFromCardPayCostConfirm", amount, anyCounters ? "" : cntrs.getName().toLowerCase(), CardTranslation.getTranslatedName(source.getName())))) {
if (!confirmAction(cost, Localizer.getInstance().getMessage("lblRemoveNTargetCounterFromCardPayCostConfirm", amount, anyCounters ? "" : cntrs.getName().toLowerCase(), source.getTranslatedName()))) {
return null;
}
}
@@ -1218,7 +1218,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
if (cost.payCostFromSource()) {
if (source.getController() == ability.getActivatingPlayer() && source.canBeSacrificedBy(ability, isEffect()) &&
(mandatory || confirmAction(cost, Localizer.getInstance().getMessage("lblSacrificeCardConfirm", CardTranslation.getTranslatedName(source.getName()))))) {
(mandatory || confirmAction(cost, Localizer.getInstance().getMessage("lblSacrificeCardConfirm", source.getTranslatedName())))) {
return PaymentDecision.card(source);
}
return null;
@@ -1227,7 +1227,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
if (type.equals("OriginalHost")) {
Card host = ability.getOriginalHost();
if (host.getController() == ability.getActivatingPlayer() && host.canBeSacrificedBy(ability, isEffect()) &&
confirmAction(cost, Localizer.getInstance().getMessage("lblSacrificeCardConfirm", CardTranslation.getTranslatedName(host.getName())))) {
confirmAction(cost, Localizer.getInstance().getMessage("lblSacrificeCardConfirm", host.getTranslatedName()))) {
return PaymentDecision.card(host);
}
return null;
@@ -1413,7 +1413,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
@Override
public PaymentDecision visit(final CostUnattach cost) {
final CardCollection cardToUnattach = cost.findCardToUnattach(source, player, ability);
if (cardToUnattach.size() == 1 && confirmAction(cost, Localizer.getInstance().getMessage("lblUnattachCardConfirm", CardTranslation.getTranslatedName(cardToUnattach.getFirst().getName())))) {
if (cardToUnattach.size() == 1 && confirmAction(cost, Localizer.getInstance().getMessage("lblUnattachCardConfirm", cardToUnattach.getFirst().getTranslatedName()))) {
return PaymentDecision.card(cardToUnattach.getFirst());
}
if (cardToUnattach.size() > 1) {

View File

@@ -296,7 +296,7 @@ public class HumanPlaySpellAbility {
// For older abilities that don't setStackDescription set it here
final StringBuilder sb = new StringBuilder();
sb.append(ability.getHostCard().getName());
sb.append(ability.getHostCard().getDisplayName());
if (ability.usesTargeting()) {
final Iterable<GameObject> targets = ability.getTargets();
if (!Iterables.isEmpty(targets)) {

View File

@@ -415,14 +415,14 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
ability.getParamOrDefault("AnnounceTitle", announce);
if (cost.isMandatory()) {
return chooseNumber(ability, localizer.getMessage("lblChooseAnnounceForCard", announceTitle,
CardTranslation.getTranslatedName(host.getName())), min, max);
host.getTranslatedName()), min, max);
}
if ("NumTimes".equals(announce)) {
return getGui().getInteger(localizer.getMessage("lblHowManyTimesToPay", ability.getPayCosts().getTotalMana(),
CardTranslation.getTranslatedName(host.getName())), min, max, min + 9);
host.getTranslatedName()), min, max, min + 9);
}
return getGui().getInteger(localizer.getMessage("lblChooseAnnounceForCard", announceTitle,
CardTranslation.getTranslatedName(host.getName())), min, max, min + 9);
host.getTranslatedName()), min, max, min + 9);
}
@Override
@@ -1282,7 +1282,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
final List<String> options = Lists.newArrayList();
for (int i = 0; i < manaChoices.size(); i++) {
final Mana m = manaChoices.get(i);
options.add(localizer.getMessage("lblNColorManaFromCard", String.valueOf(1 + i), MagicColor.toLongString(m.getColor()), CardTranslation.getTranslatedName(m.getSourceCard().getName())));
options.add(localizer.getMessage("lblNColorManaFromCard", String.valueOf(1 + i), MagicColor.toLongString(m.getColor()), m.getSourceCard().getTranslatedName()));
}
final String chosen = getGui().one(localizer.getMessage("lblPayManaFromManaPool"), options);
final String idx = TextUtil.split(chosen, '.')[0];
@@ -1400,7 +1400,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
public String chooseSector(Card assignee, String ai, List<String> sectors) {
String prompt;
if (assignee != null) {
String creature = CardTranslation.getTranslatedName(assignee.getName()) + " (" + assignee.getId() + ")";
String creature = assignee.getTranslatedName() + " (" + assignee.getId() + ")";
prompt = Localizer.getInstance().getMessage("lblAssignSectorCreature", creature);
} else {
prompt = Localizer.getInstance().getMessage("lblChooseSectorEffect");
@@ -1410,7 +1410,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
@Override
public int chooseSprocket(Card assignee, boolean forceDifferent) {
String cardName = CardTranslation.getTranslatedName(assignee.getName()) + " (" + assignee.getId() + ")";
String cardName = assignee.getTranslatedName() + " (" + assignee.getId() + ")";
String prompt = Localizer.getInstance().getMessage("lblAssignSprocket", cardName);
List<Integer> options = Lists.newArrayList(1, 2, 3);
if(forceDifferent)
@@ -1736,7 +1736,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
if (!call) {
Collections.reverse(sortedResults);
}
return getGui().one(sa.getHostCard().getName() + " - " + localizer.getMessage("lblChooseAResult"), sortedResults).equals(labelsSrc[0]);
return getGui().one(sa.getHostCard().getDisplayName() + " - " + localizer.getMessage("lblChooseAResult"), sortedResults).equals(labelsSrc[0]);
}
@Override
@@ -1747,7 +1747,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
}
final List<Pair<SpellAbilityStackInstance, GameObject>> chosen = getGui()
.getChoices(saSpellskite.getHostCard().getName(), 1, 1, allTargets, null, new FnTargetToString());
.getChoices(saSpellskite.getHostCard().getDisplayName(), 1, 1, allTargets, null, new FnTargetToString());
return Iterables.getFirst(chosen, null);
}
@@ -1801,7 +1801,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
if (trackerFrozen) {
getGame().getTracker().freeze(); // refreeze if the tracker was frozen prior to this update
}
final String modeTitle = localizer.getMessage("lblPlayerActivatedCardChooseMode", sa.getActivatingPlayer().toString(), CardTranslation.getTranslatedName(sa.getHostCard().getName()));
final String modeTitle = localizer.getMessage("lblPlayerActivatedCardChooseMode", sa.getActivatingPlayer().toString(), sa.getHostCard().getTranslatedName());
final List<AbilitySub> chosen = Lists.newArrayListWithCapacity(num);
int chosenPawprint = 0;
for (int i = 0; i < num; i++) {
@@ -1890,7 +1890,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
final String name) {
List<CardFaceView> choices = FModel.getMagicDb().getCommonCards().streamAllFaces()
.filter(cpp)
.map(cardFace -> new CardFaceView(CardTranslation.getTranslatedName(cardFace.getName()), cardFace.getName()))
.map(cardFace -> new CardFaceView(CardTranslation.getTranslatedName(cardFace.getDisplayName()), cardFace.getName()))
.sorted()
.collect(Collectors.toList());
CardFaceView cardFaceView = getGui().one(message, choices);
@@ -2949,7 +2949,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
List<CardFaceView> choices = new ArrayList<>();
CardFaceView cardFaceView;
for (ICardFace cardFace : faces) {
cardFaceView = new CardFaceView(CardTranslation.getTranslatedName(cardFace.getName()), cardFace.getName());
cardFaceView = new CardFaceView(CardTranslation.getTranslatedName(cardFace.getDisplayName()), cardFace.getName());
choices.add(cardFaceView);
}
Collections.sort(choices);
@@ -2991,7 +2991,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
lastSummoningSickness = true;
} else {
lastSummoningSickness = getGui().confirm(forgeCard.getView(),
localizer.getMessage("lblCardShouldBeSummoningSicknessConfirm", CardTranslation.getTranslatedName(forgeCard.getName())));
localizer.getMessage("lblCardShouldBeSummoningSicknessConfirm", forgeCard.getTranslatedName()));
}
}
}
@@ -3041,7 +3041,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
}
} else if (targetZone == ZoneType.Library) {
if (!repeatLast) {
lastTopOfTheLibrary = getGui().confirm(forgeCard.getView(), localizer.getMessage("lblCardShouldBeAddedToLibraryTopOrBottom", CardTranslation.getTranslatedName(forgeCard.getName())),
lastTopOfTheLibrary = getGui().confirm(forgeCard.getView(), localizer.getMessage("lblCardShouldBeAddedToLibraryTopOrBottom", forgeCard.getTranslatedName()),
true, Arrays.asList(localizer.getMessage("lblTop"), localizer.getMessage("lblBottom")));
}
if (lastTopOfTheLibrary) {