mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-11 16:26:22 +00:00
Compare commits
6 Commits
6d188c09ca
...
01da2df6f0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01da2df6f0 | ||
|
|
ec84a3f137 | ||
|
|
02e2e713ed | ||
|
|
a21666040c | ||
|
|
fe2bd016b6 | ||
|
|
0bb67ec8d0 |
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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")),
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import forge.game.spellability.SpellAbility;
|
||||
import forge.util.Lang;
|
||||
import forge.util.Localizer;
|
||||
|
||||
|
||||
public class ScryEffect extends SpellAbilityEffect {
|
||||
@Override
|
||||
protected String getStackDescription(SpellAbility sa) {
|
||||
@@ -37,10 +36,8 @@ public class ScryEffect extends SpellAbilityEffect {
|
||||
}
|
||||
|
||||
boolean isOptional = sa.hasParam("Optional");
|
||||
final List<Player> players = Lists.newArrayList();
|
||||
|
||||
final List<Player> players = Lists.newArrayList(); // players really affected
|
||||
|
||||
// Optional here for spells that have optional multi-player scrying
|
||||
for (final Player p : getTargetPlayers(sa)) {
|
||||
if (!p.isInGame()) {
|
||||
continue;
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -21,11 +21,12 @@ import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Iterables;
|
||||
import forge.game.ability.AbilityKey;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardCollection;
|
||||
import forge.game.card.CardLists;
|
||||
import forge.game.card.CardZoneTable;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.util.Localizer;
|
||||
import forge.util.TextUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -84,14 +85,13 @@ public class TriggerAbilityTriggered extends Trigger {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (hasParam("TriggeredOwnAbility") && "True".equals(getParam("TriggeredOwnAbility")) && !Iterables.contains(causes, source)) {
|
||||
if (hasParam("TriggeredOwnAbility") && !Iterables.contains(causes, source)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final void setTriggeringObjects(final SpellAbility sa, Map<AbilityKey, Object> runParams) {
|
||||
@@ -118,14 +118,16 @@ public class TriggerAbilityTriggered extends Trigger {
|
||||
newRunParams.put(AbilityKey.Cause, ImmutableList.of(runParams.get(AbilityKey.Card)));
|
||||
} else if (regtrig.getMode() == TriggerType.ChangesZoneAll) {
|
||||
final CardZoneTable table = (CardZoneTable) runParams.get(AbilityKey.Cards);
|
||||
Set<String> destinations = new HashSet<>();
|
||||
for (ZoneType dest : ZoneType.values()) {
|
||||
if (table.containsColumn(dest) && !table.column(dest).isEmpty()) {
|
||||
destinations.add(dest.toString());
|
||||
}
|
||||
}
|
||||
newRunParams.put(AbilityKey.Destination, TextUtil.join(destinations, ","));
|
||||
newRunParams.put(AbilityKey.Destination, StringUtils.join(table.columnKeySet(), ","));
|
||||
newRunParams.put(AbilityKey.Cause, table.allCards());
|
||||
} else if (regtrig.getMode() == TriggerType.Attacks) {
|
||||
newRunParams.put(AbilityKey.Cause, ImmutableList.of(runParams.get(AbilityKey.Attacker)));
|
||||
} else if (regtrig.getMode() == TriggerType.AttackersDeclared || regtrig.getMode() == TriggerType.AttackersDeclaredOneTarget) {
|
||||
CardCollection attackers = (CardCollection) runParams.get(AbilityKey.Attackers);
|
||||
if (regtrig.hasParam("ValidAttackers")) {
|
||||
attackers = CardLists.getValidCards(attackers, regtrig.getParam("ValidAttackers"), regtrig.getHostCard().getController(), regtrig.getHostCard(), regtrig);
|
||||
}
|
||||
newRunParams.put(AbilityKey.Cause, attackers);
|
||||
}
|
||||
|
||||
newRunParams.put(AbilityKey.SpellAbility, sa);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ Name:Drannith Magistrate
|
||||
ManaCost:1 W
|
||||
Types:Creature Human Wizard
|
||||
PT:1/3
|
||||
S:Mode$ CantBeCast | ValidCard$ Card | Caster$ Opponent | Origin$ Library,Graveyard,Exile,Command | Description$ Your opponents can't cast spells from anywhere other than their hands.
|
||||
S:Mode$ CantBeCast | ValidCard$ Card.!wasCastFromTheirHand | Caster$ Opponent | Description$ Your opponents can't cast spells from anywhere other than their hands.
|
||||
Oracle:Your opponents can't cast spells from anywhere other than their hands.
|
||||
|
||||
@@ -7,8 +7,7 @@ SVar:OppDiscard:DB$ ChoosePlayer | Defined$ You | Choices$ Player.Opponent | Cho
|
||||
SVar:DBDiscard:DB$ Discard | Defined$ ChosenPlayer | AILogic$ DiscardUncastableAndExcess | AnyNumber$ True | Optional$ True | Mode$ TgtChoose | RememberDiscarded$ True | SubAbility$ DBDraw
|
||||
SVar:DBDraw:DB$ Draw | Defined$ ChosenPlayer | NumCards$ Y | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBSearch
|
||||
SVar:DBSearch:DB$ ChangeZone | Origin$ Library | Hidden$ True | ChangeNum$ 3 | ChangeType$ Card | Destination$ Hand | SubAbility$ DBResolve
|
||||
SVar:DBResolve:DB$ ChangeZoneResolve | SubAbility$ DBDiscard2
|
||||
SVar:DBSearch:DB$ ChangeZone | Origin$ Library | Hidden$ True | ChangeNum$ 3 | ChangeType$ Card | Destination$ Hand | SubAbility$ DBDiscard2
|
||||
SVar:DBDiscard2:DB$ Discard | Defined$ You | NumCards$ 3 | Mode$ Random
|
||||
SVar:Y:Remembered$Amount
|
||||
SVar:AltCostPaid:Count$AltCost.1.0
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
Name:Airship Engine Room
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplacementResult$ Updated | ReplaceWith$ ETBTapped | Description$ This land enters tapped.
|
||||
SVar:ETBTapped:DB$ Tap | Defined$ Self | ETB$ True
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo U R | SpellDescription$ Add {U} or {R}.
|
||||
A:AB$ Draw | Cost$ 4 T Sac<1/CARDNAME> | SpellDescription$ Draw a card.
|
||||
DeckHas:Ability$Sacrifice
|
||||
Oracle:This land enters tapped.\n{T}: Add {U} or {R}.\n{4}, {T}, Sacrifice this land: Draw a card.
|
||||
9
forge-gui/res/cardsfolder/upcoming/avatars_wrath.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/avatars_wrath.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Avatar's Wrath
|
||||
ManaCost:2 W W
|
||||
Types:Sorcery
|
||||
A:SP$ Pump | ValidTgts$ Creature | TgtPrompt$ Select up to one target creature | TargetMin$ 0 | TargetMax$ 1 | SubAbility$ DBAirbend | SpellDescription$ Choose up to one target creature, then airbend all other creatures. (Exile them. While each one is exiled, its owner may cast it for {2} rather than its mana cost.) Until your next turn, your opponents can't cast spells from anywhere other than their hands. Exile CARDNAME.
|
||||
SVar:DBAirbend:DB$ Airbend | Defined$ Valid Creature.NotDefinedTargeted | SubAbility$ DBEffect
|
||||
SVar:DBEffect:DB$ Effect | StaticAbilities$ CantCast | Duration$ UntilYourNextTurn | SubAbility$ DBExile
|
||||
SVar:CantCast:Mode$ CantBeCast | ValidCard$ Card.!wasCastFromTheirHand | Caster$ Opponent | Description$ Your opponents can't cast spells from anywhere other than their hands.
|
||||
SVar:DBExile:DB$ ChangeZone | Origin$ Stack | Destination$ Exile
|
||||
Oracle:Choose up to one target creature, then airbend all other creatures. (Exile them. While each one is exiled, its owner may cast it for {2} rather than its mana cost.)\nUntil your next turn, your opponents can't cast spells from anywhere other than their hands.\nExile Avatar's Wrath.
|
||||
@@ -0,0 +1,8 @@
|
||||
Name:Beifong's Bounty Hunters
|
||||
ManaCost:2 B G
|
||||
Types:Creature Human Mercenary
|
||||
PT:4/4
|
||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.nonLand+YouCtrl | Execute$ TrigEarthbend | TriggerDescription$ Whenever a nonland creature you control dies, earthbend X, where X is that creature's power. (Target land you control becomes a 0/0 creature with haste that's still a land. Put X +1/+1 counters on it. When it dies or is exiled, return it to the battlefield tapped.)
|
||||
SVar:TrigEarthbend:DB$ Earthbend | Num$ X
|
||||
SVar:X:TriggeredCard$CardPower
|
||||
Oracle:Whenever a nonland creature you control dies, earthbend X, where X is that creature's power. (Target land you control becomes a 0/0 creature with haste that's still a land. Put X +1/+1 counters on it. When it dies or is exiled, return it to the battlefield tapped.)
|
||||
7
forge-gui/res/cardsfolder/upcoming/bitter_work.txt
Normal file
7
forge-gui/res/cardsfolder/upcoming/bitter_work.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Name:Bitter Work
|
||||
ManaCost:1 R G
|
||||
Types:Enchantment
|
||||
T:Mode$ AttackersDeclaredOneTarget | ValidAttackers$ Creature.YouCtrl+powerGE4 | AttackedTarget$ Player | Execute$ TrigDraw | TriggerZones$ Battlefield | TriggerDescription$ Whenever you attack a player with one or more creatures with power 4 or greater, draw a card.
|
||||
SVar:TrigDraw:DB$ Draw
|
||||
A:AB$ Earthbend | Cost$ 4 | Exhaust$ True | PlayerTurn$ True | Num$ 4 | SpellDescription$ Earthbend 4. Activate only during your turn. (Target land you control becomes a 0/0 creature with haste that's still a land. Put four +1/+1 counters on it. When it dies or is exiled, return it to the battlefield tapped. Activate each exhaust ability only once.)
|
||||
Oracle:Whenever you attack a player with one or more creatures with power 4 or greater, draw a card.\nExhaust — {4}: Earthbend 4. Activate only during your turn. (Target land you control becomes a 0/0 creature with haste that's still a land. Put four +1/+1 counters on it. When it dies or is exiled, return it to the battlefield tapped. Activate each exhaust ability only once.)
|
||||
@@ -0,0 +1,9 @@
|
||||
Name:Boiling Rock Prison
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplacementResult$ Updated | ReplaceWith$ ETBTapped | Description$ This land enters tapped.
|
||||
SVar:ETBTapped:DB$ Tap | Defined$ Self | ETB$ True
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo B R | SpellDescription$ Add {B} or {R}.
|
||||
A:AB$ Draw | Cost$ 4 T Sac<1/CARDNAME> | SpellDescription$ Draw a card.
|
||||
DeckHas:Ability$Sacrifice
|
||||
Oracle:This land enters tapped.\n{T}: Add {B} or {R}.\n{4}, {T}, Sacrifice this land: Draw a card.
|
||||
7
forge-gui/res/cardsfolder/upcoming/boomerang_basics.txt
Normal file
7
forge-gui/res/cardsfolder/upcoming/boomerang_basics.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Name:Boomerang Basics
|
||||
ManaCost:U
|
||||
Types:Sorcery Lesson
|
||||
A:SP$ ChangeZone | Origin$ Battlefield | Destination$ Hand | Defined$ Targeted | ValidTgts$ Permanent.nonLand | TgtPrompt$ Select target nonland permanent | RememberLKI$ True | SubAbility$ DBDraw | SpellDescription$ Return target nonland permanent to its owner's hand. If you controlled that permanent, draw a card.
|
||||
SVar:DBDraw:DB$ Draw | ConditionDefined$ RememberedLKI | ConditionPresent$ Card.YouCtrl | NumCards$ 1 | StackDescription$ If you controlled that permanent, draw a card. | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
Oracle:Return target nonland permanent to its owner's hand. If you controlled that permanent, draw a card.
|
||||
9
forge-gui/res/cardsfolder/upcoming/callous_inspector.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/callous_inspector.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Callous Inspector
|
||||
ManaCost:B
|
||||
Types:Creature Human Soldier
|
||||
PT:1/1
|
||||
K:Menace
|
||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigDamage | TriggerDescription$ When this creature dies, it deals 1 damage to you. Create a Clue token. (It's an artifact with "{2}, Sacrifice this token: Draw a card.")
|
||||
SVar:TrigDamage:DB$ DealDamage | NumDmg$ 1 | Defined$ You | SubAbility$ DBToken
|
||||
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_a_clue_draw | TokenOwner$ You
|
||||
Oracle:Menace (This creature can't be blocked except by two or more creatures.)\nWhen this creature dies, it deals 1 damage to you. Create a Clue token. (It's an artifact with "{2}, Sacrifice this token: Draw a card.")
|
||||
12
forge-gui/res/cardsfolder/upcoming/earth_kingdom_general.txt
Normal file
12
forge-gui/res/cardsfolder/upcoming/earth_kingdom_general.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Name:Earth Kingdom General
|
||||
ManaCost:3 G
|
||||
Types:Creature Human Soldier Ally
|
||||
PT:2/2
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigEarthbend | TriggerDescription$ When this creature enters, earthbend 2. (Target land you control becomes a 0/0 creature with haste that's still a land. Put two +1/+1 counters on it. When it dies or is exiled, return it to the battlefield tapped.)
|
||||
SVar:TrigEarthbend:DB$ Earthbend | Num$ 2
|
||||
T:Mode$ CounterAddedOnce | CounterType$ P1P1 | Valid$ Creature | TriggerZones$ Battlefield | Execute$ TrigGainLife | ResolvedLimit$ 1 | OptionalDecider$ You | ValidSource$ You | TriggerDescription$ Whenever you put one or more +1/+1 counters on a creature, you may gain that much life. Do this only once each turn.
|
||||
SVar:TrigGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X
|
||||
SVar:X:TriggerCount$Amount
|
||||
DeckHas:Ability$Lifegain
|
||||
DeckHints:Ability$Counters
|
||||
Oracle:When this creature enters, earthbend 2. (Target land you control becomes a 0/0 creature with haste that's still a land. Put two +1/+1 counters on it. When it dies or is exiled, return it to the battlefield tapped.)\nWhenever you put one or more +1/+1 counters on a creature, you may gain that much life. Do this only once each turn.
|
||||
@@ -0,0 +1,8 @@
|
||||
Name:Elemental Teachings
|
||||
ManaCost:4 G
|
||||
Types:Instant
|
||||
A:SP$ ChangeZone | Origin$ Library | Destination$ Library | ChangeType$ Land | ChangeNum$ 4 | RememberChanged$ True | Reveal$ True | Shuffle$ False | DifferentNames$ True | StackDescription$ SpellDescription | SubAbility$ DBChangeZone1 | SpellDescription$ Search your library for up to four land cards with different names and reveal them. An opponent chooses two of those cards. Put the chosen cards into your graveyard and the rest onto the battlefield tapped, then shuffle.
|
||||
SVar:DBChangeZone1:DB$ ChangeZone | Origin$ Library | Destination$ Graveyard | ChangeType$ Card.IsRemembered | Chooser$ Opponent | ChangeNum$ 2 | Mandatory$ True | NoLooking$ True | SelectPrompt$ Select two cards to be put into the graveyard of CARDNAME's controller | Shuffle$ False | SubAbility$ DBChangeZone2 | StackDescription$ None
|
||||
SVar:DBChangeZone2:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | Tapped$ True | ChangeType$ Card.IsRemembered | ChangeNum$ 2 | Mandatory$ True | NoLooking$ True | StackDescription$ None | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
Oracle:Search your library for up to four land cards with different names and reveal them. An opponent chooses two of those cards. Put the chosen cards into your graveyard and the rest onto the battlefield tapped, then shuffle.
|
||||
@@ -0,0 +1,5 @@
|
||||
Name:Enter the Avatar State
|
||||
ManaCost:W
|
||||
Types:Instant Lesson
|
||||
A:SP$ Animate | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | Keywords$ Flying & First Strike & Lifelink & Hexproof | Types$ Avatar | SpellDescription$ Until end of turn, target creature you control becomes an Avatar in addition to its other types and gains flying, first strike, lifelink, and hexproof. (A creature with hexproof can't be the target of spells or abilities your opponents control.)
|
||||
Oracle:Until end of turn, target creature you control becomes an Avatar in addition to its other types and gains flying, first strike, lifelink, and hexproof. (A creature with hexproof can't be the target of spells or abilities your opponents control.)
|
||||
@@ -0,0 +1,9 @@
|
||||
Name:Firebender Ascension
|
||||
ManaCost:1 R
|
||||
Types:Enchantment
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When this enchantment enters, create a 2/2 red Soldier creature token with firebending 1.
|
||||
SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ r_2_2_soldier_firebending_1 | TokenOwner$ You
|
||||
T:Mode$ AbilityTriggered | TriggerZones$ Battlefield | ValidMode$ Attacks,AttackersDeclared,AttackersDeclaredOneTarget | Execute$ TrigPutCounter | ValidSource$ Creature.YouCtrl | TriggeredOwnAbility$ True | TriggerDescription$ Whenever a creature you control attacking causes a triggered ability of that creature to trigger, put a quest counter on this enchantment. Then if it has four or more quest counters on it, you may copy that ability. You may choose new targets for the copy.
|
||||
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ QUEST | CounterNum$ 1 | SubAbility$ DBCopy
|
||||
SVar:DBCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | Optional$ True | MayChooseTarget$ True | ConditionPresent$ Card.Self+counters_GE4_QUEST
|
||||
Oracle:When this enchantment enters, create a 2/2 red Soldier creature token with firebending 1.\nWhenever a creature you control attacking causes a triggered ability of that creature to trigger, put a quest counter on this enchantment. Then if it has four or more quest counters on it, you may copy that ability. You may choose new targets for the copy.
|
||||
@@ -0,0 +1,9 @@
|
||||
Name:Foggy Bottom Swamp
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplacementResult$ Updated | ReplaceWith$ ETBTapped | Description$ This land enters tapped.
|
||||
SVar:ETBTapped:DB$ Tap | Defined$ Self | ETB$ True
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo B G | SpellDescription$ Add {B} or {G}.
|
||||
A:AB$ Draw | Cost$ 4 T Sac<1/CARDNAME> | SpellDescription$ Draw a card.
|
||||
DeckHas:Ability$Sacrifice
|
||||
Oracle:This land enters tapped.\n{T}: Add {B} or {G}.\n{4}, {T}, Sacrifice this land: Draw a card.
|
||||
@@ -0,0 +1,10 @@
|
||||
Name:Jeong Jeong, the Deserter
|
||||
ManaCost:2 R
|
||||
Types:Legendary Creature Human Rebel Ally
|
||||
PT:2/3
|
||||
K:Firebending:1
|
||||
A:AB$ PutCounter | Cost$ 3 | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | Exhaust$ True | SubAbility$ DBTrigger | SpellDescription$ Put a +1/+1 counter on NICKNAME. When you next cast a Lesson spell this turn, copy it and you may choose new targets for the copy. (Activate each exhaust ability only once.)
|
||||
SVar:DBTrigger:DB$ DelayedTrigger | Mode$ SpellCast | ValidCard$ Lesson | ValidActivatingPlayer$ You | ThisTurn$ True | Execute$ EffTrigCopy | TriggerDescription$ When you next cast a Lesson spell this turn, copy it and you may choose new targets for the copy.
|
||||
SVar:EffTrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | MayChooseTarget$ True
|
||||
DeckHints:Type$Lesson
|
||||
Oracle:Firebending 1 (Whenever this creature attacks, add {R}. This mana lasts until end of combat.)\nExhaust — {3}: Put a +1/+1 counter on Jeong Jeong. When you next cast a Lesson spell this turn, copy it and you may choose new targets for the copy. (Activate each exhaust ability only once.)
|
||||
9
forge-gui/res/cardsfolder/upcoming/kyoshi_village.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/kyoshi_village.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Kyoshi Village
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplacementResult$ Updated | ReplaceWith$ ETBTapped | Description$ This land enters tapped.
|
||||
SVar:ETBTapped:DB$ Tap | Defined$ Self | ETB$ True
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo G W | SpellDescription$ Add {G} or {W}.
|
||||
A:AB$ Draw | Cost$ 4 T Sac<1/CARDNAME> | SpellDescription$ Draw a card.
|
||||
DeckHas:Ability$Sacrifice
|
||||
Oracle:This land enters tapped.\n{T}: Add {G} or {W}.\n{4}, {T}, Sacrifice this land: Draw a card.
|
||||
@@ -0,0 +1,8 @@
|
||||
Name:Mai, Scornful Striker
|
||||
ManaCost:1 B
|
||||
Types:Legendary Creature Human Noble Ally
|
||||
PT:2/2
|
||||
K:First Strike
|
||||
T:Mode$ SpellCast | TriggerZones$ Battlefield | ValidCard$ Card.nonCreature | ValidActivatingPlayer$ Player | Execute$ TrigLoseLife | TriggerDescription$ Whenever a player casts a noncreature spell, they lose 2 life.
|
||||
SVar:TrigLoseLife:DB$ LoseLife | Defined$ TriggeredActivator | LifeAmount$ 2
|
||||
Oracle:First strike\nWhenever a player casts a noncreature spell, they lose 2 life.
|
||||
9
forge-gui/res/cardsfolder/upcoming/meditation_pools.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/meditation_pools.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Meditation Pools
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplacementResult$ Updated | ReplaceWith$ ETBTapped | Description$ This land enters tapped.
|
||||
SVar:ETBTapped:DB$ Tap | Defined$ Self | ETB$ True
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo G U | SpellDescription$ Add {G} or {U}.
|
||||
A:AB$ Draw | Cost$ 4 T Sac<1/CARDNAME> | SpellDescription$ Draw a card.
|
||||
DeckHas:Ability$Sacrifice
|
||||
Oracle:This land enters tapped.\n{T}: Add {G} or {U}.\n{4}, {T}, Sacrifice this land: Draw a card.
|
||||
9
forge-gui/res/cardsfolder/upcoming/misty_palms_oasis.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/misty_palms_oasis.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Misty Palms Oasis
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplacementResult$ Updated | ReplaceWith$ ETBTapped | Description$ This land enters tapped.
|
||||
SVar:ETBTapped:DB$ Tap | Defined$ Self | ETB$ True
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo W B | SpellDescription$ Add {W} or {B}.
|
||||
A:AB$ Draw | Cost$ 4 T Sac<1/CARDNAME> | SpellDescription$ Draw a card.
|
||||
DeckHas:Ability$Sacrifice
|
||||
Oracle:This land enters tapped.\n{T}: Add {W} or {B}.\n{4}, {T}, Sacrifice this land: Draw a card.
|
||||
@@ -1,6 +1,6 @@
|
||||
Name:North Pole Gates
|
||||
ManaCost:no cost
|
||||
Types:Land Gate
|
||||
Types:Land
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplacementResult$ Updated | ReplaceWith$ ETBTapped | Description$ This land enters tapped.
|
||||
SVar:ETBTapped:DB$ Tap | Defined$ Self | ETB$ True
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo W U | SpellDescription$ Add {W} or {U}.
|
||||
|
||||
9
forge-gui/res/cardsfolder/upcoming/omashu_city.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/omashu_city.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Omashu City
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplacementResult$ Updated | ReplaceWith$ ETBTapped | Description$ This land enters tapped.
|
||||
SVar:ETBTapped:DB$ Tap | Defined$ Self | ETB$ True
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo R G | SpellDescription$ Add {R} or {G}.
|
||||
A:AB$ Draw | Cost$ 4 T Sac<1/CARDNAME> | SpellDescription$ Draw a card.
|
||||
DeckHas:Ability$Sacrifice
|
||||
Oracle:This land enters tapped.\n{T}: Add {R} or {G}.\n{4}, {T}, Sacrifice this land: Draw a card.
|
||||
11
forge-gui/res/cardsfolder/upcoming/platypus_bear.txt
Normal file
11
forge-gui/res/cardsfolder/upcoming/platypus_bear.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Platypus Bear
|
||||
ManaCost:1 GU
|
||||
Types:Creature Platypus Bear
|
||||
PT:2/3
|
||||
K:Defender
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigMill | TriggerDescription$ When this creature enters, mill two cards. (Put the top two cards of your library into your graveyard.)
|
||||
SVar:TrigMill:DB$ Mill | Defined$ You | NumCards$ 2
|
||||
S:Mode$ CanAttackDefender | ValidCard$ Card.Self | IsPresent$ Lesson.YouOwn | PresentZone$ Graveyard | Description$ As long as there is a Lesson card in your graveyard, this creature can attack as though it didn't have defender.
|
||||
DeckHas:Ability$Mill|Graveyard
|
||||
DeckHints:Type$Lesson
|
||||
Oracle:Defender\nWhen this creature enters, mill two cards. (Put the top two cards of your library into your graveyard.)\nAs long as there is a Lesson card in your graveyard, this creature can attack as though it didn't have defender.
|
||||
16
forge-gui/res/cardsfolder/upcoming/raven_eagle.txt
Normal file
16
forge-gui/res/cardsfolder/upcoming/raven_eagle.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
Name:Raven Eagle
|
||||
ManaCost:2 B
|
||||
Types:Enchantment Creature Bird Assassin
|
||||
PT:2/3
|
||||
K:Flying
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ Whenever this creature enters or attacks, exile up to one target card from a graveyard. If a creature card is exiled this way, create a Clue token. (It's an artifact with "{2}, Sacrifice this token: Draw a card.")
|
||||
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigExile | Secondary$ True | TriggerDescription$ Whenever this creature enters or attacks, exile up to one target card from a graveyard. If a creature card is exiled this way, create a Clue token. (It's an artifact with "{2}, Sacrifice this token: Draw a card.")
|
||||
SVar:TrigExile:DB$ ChangeZone | ValidTgts$ Card | Origin$ Graveyard | TargetMin$ 0 | TargetMax$ 1 | Destination$ Exile | TgtPrompt$ Select up to one target card from a graveyard | RememberChanged$ True | SubAbility$ DBToken
|
||||
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_a_clue_draw | TokenOwner$ You | ConditionDefined$ Targeted | ConditionPresent$ Creature | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
T:Mode$ Drawn | ValidCard$ Card.YouCtrl | Number$ 2 | TriggerZones$ Battlefield | Execute$ DBLoseLife | TriggerDescription$ Whenever you draw your second card each turn, each opponent loses 1 life and you gain 1 life.
|
||||
SVar:DBLoseLife:DB$ LoseLife | Defined$ Player.Opponent | LifeAmount$ 1 | SubAbility$ DBGainLife
|
||||
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ 1
|
||||
SVar:HasAttackEffect:TRUE
|
||||
DeckHas:Ability$Token|Graveyard|LifeGain
|
||||
Oracle:Flying\nWhenever this creature enters or attacks, exile up to one target card from a graveyard. If a creature card is exiled this way, create a Clue token. (It's an artifact with "{2}, Sacrifice this token: Draw a card.")\nWhenever you draw your second card each turn, each opponent loses 1 life and you gain 1 life.
|
||||
9
forge-gui/res/cardsfolder/upcoming/serpents_pass.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/serpents_pass.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Serpent's Pass
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplacementResult$ Updated | ReplaceWith$ ETBTapped | Description$ This land enters tapped.
|
||||
SVar:ETBTapped:DB$ Tap | Defined$ Self | ETB$ True
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo U B | SpellDescription$ Add {U} or {B}.
|
||||
A:AB$ Draw | Cost$ 4 T Sac<1/CARDNAME> | SpellDescription$ Draw a card.
|
||||
DeckHas:Ability$Sacrifice
|
||||
Oracle:This land enters tapped.\n{T}: Add {U} or {B}.\n{4}, {T}, Sacrifice this land: Draw a card.
|
||||
5
forge-gui/res/cardsfolder/upcoming/shared_roots.txt
Normal file
5
forge-gui/res/cardsfolder/upcoming/shared_roots.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
Name:Shared Roots
|
||||
ManaCost:1 G
|
||||
Types:Sorcery Lesson
|
||||
A:SP$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | ChangeTypeDesc$ basic land | Tapped$ True | ChangeNum$ 1 | SpellDescription$ Search your library for a basic land card, put it onto the battlefield tapped, then shuffle.
|
||||
Oracle:Search your library for a basic land card, put it onto the battlefield tapped, then shuffle.
|
||||
9
forge-gui/res/cardsfolder/upcoming/sun_blessed_peak.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/sun_blessed_peak.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Sun-Blessed Peak
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplacementResult$ Updated | ReplaceWith$ ETBTapped | Description$ This land enters tapped.
|
||||
SVar:ETBTapped:DB$ Tap | Defined$ Self | ETB$ True
|
||||
A:AB$ Mana | Cost$ T | Produced$ Combo R W | SpellDescription$ Add {R} or {W}.
|
||||
A:AB$ Draw | Cost$ 4 T Sac<1/CARDNAME> | SpellDescription$ Draw a card.
|
||||
DeckHas:Ability$Sacrifice
|
||||
Oracle:This land enters tapped.\n{T}: Add {R} or {W}.\n{4}, {T}, Sacrifice this land: Draw a card.
|
||||
@@ -0,0 +1,9 @@
|
||||
Name:The Boulder, Ready to Rumble
|
||||
ManaCost:3 G
|
||||
Types:Legendary Creature Human Warrior Performer
|
||||
PT:4/4
|
||||
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigEarthbend | TriggerDescription$ Whenever NICKNAME attacks, earthbend X, where X is the number of creatures you control with power 4 or greater. (Target land you control becomes a 0/0 creature with haste that's still a land. Put X +1/+1 counters on it. When it dies or is exiled, return it to the battlefield tapped.)
|
||||
SVar:TrigEarthbend:DB$ Earthbend | Num$ X
|
||||
SVar:X:Count$Valid Creature.YouCtrl+powerGE4
|
||||
SVar:HasAttackEffect:TRUE
|
||||
Oracle:Whenever The Boulder attacks, earthbend X, where X is the number of creatures you control with power 4 or greater. (Target land you control becomes a 0/0 creature with haste that's still a land. Put X +1/+1 counters on it. When it dies or is exiled, return it to the battlefield tapped.)
|
||||
6
forge-gui/res/cardsfolder/upcoming/tiger_dillo.txt
Normal file
6
forge-gui/res/cardsfolder/upcoming/tiger_dillo.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Name:Tiger-Dillo
|
||||
ManaCost:1 R
|
||||
Types:Creature Cat Armadillo
|
||||
PT:4/3
|
||||
S:Mode$ CantAttack,CantBlock | ValidCard$ Card.Self | IsPresent$ Creature.Other+YouCtrl+powerGE4 | PresentCompare$ EQ0 | Description$ This creature can't attack or block unless you control another creature with power 4 or greater.
|
||||
Oracle:This creature can't attack or block unless you control another creature with power 4 or greater.
|
||||
8
forge-gui/res/cardsfolder/upcoming/tolls_of_war.txt
Normal file
8
forge-gui/res/cardsfolder/upcoming/tolls_of_war.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Tolls of War
|
||||
ManaCost:W B
|
||||
Types:Enchantment
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When this enchantment enters, create a Clue token. (It's an artifact with "{2}, Sacrifice this token: Draw a card.")
|
||||
SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_a_clue_draw | TokenOwner$ You
|
||||
T:Mode$ Sacrificed | ValidCard$ Permanent.YouCtrl | Execute$ TrigToken | TriggerZones$ Battlefield | ValidPlayer$ You | PlayerTurn$ True | ActivationLimit$ 1 | TriggerDescription$ Whenever you sacrifice a permanent during your turn, create a 1/1 white Ally creature token. This ability triggers only once each turn.
|
||||
SVar:TrigToken:DB$ Token | TokenScript$ w_1_1_ally
|
||||
Oracle:When this enchantment enters, create a Clue token. (It's an artifact with "{2}, Sacrifice this token: Draw a card.")\nWhenever you sacrifice a permanent during your turn, create a 1/1 white Ally creature token. This ability triggers only once each turn.
|
||||
@@ -234,6 +234,7 @@ Pilot:Pilots
|
||||
Pincher:Pinchers
|
||||
Pirate:Pirates
|
||||
Plant:Plants
|
||||
Platypus:Platypuses
|
||||
Porcupine:Porcupines
|
||||
Possum:Possums
|
||||
Praetor:Praetors
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user