From 25e89b04a31551752be97ad7ef00db41c1bb641f Mon Sep 17 00:00:00 2001 From: Northmoc <103371817+Northmoc@users.noreply.github.com> Date: Sat, 14 Oct 2023 05:46:22 -0400 Subject: [PATCH] day_of_the_moon.txt and support/refactor in NameCard (#3890) * day_of_the_moon.txt and support/refactor --- .../src/main/java/forge/ai/GameState.java | 23 ++++-------- .../java/forge/ai/simulation/GameCopier.java | 5 +-- .../ability/effects/ChooseCardNameEffect.java | 5 +-- .../game/ability/effects/CleanUpEffect.java | 2 +- .../game/ability/effects/CloneEffect.java | 2 +- .../game/ability/effects/EffectEffect.java | 2 +- .../game/ability/effects/MakeCardEffect.java | 4 +-- .../game/ability/effects/PlayEffect.java | 2 +- .../game/ability/effects/SetStateEffect.java | 4 +-- .../src/main/java/forge/game/card/Card.java | 35 +++++++------------ .../java/forge/game/card/CardFactoryUtil.java | 4 +-- .../java/forge/game/card/CardProperty.java | 17 ++++++--- .../main/java/forge/game/card/CardUtil.java | 3 +- .../main/java/forge/game/card/CardView.java | 10 ++---- .../StaticAbilityContinuous.java | 6 ++-- .../forge/trackable/TrackableProperty.java | 3 +- .../SpellAbilityPickerSimulationTest.java | 4 +-- forge-gui/res/cardsfolder/a/ach_hans_run.txt | 2 +- forge-gui/res/cardsfolder/b/brain_pry.txt | 2 +- .../res/cardsfolder/b/break_expectations.txt | 9 +++-- .../res/cardsfolder/c/cabal_therapist.txt | 3 +- .../res/cardsfolder/c/cheering_fanatic.txt | 3 +- .../res/cardsfolder/c/conundrum_sphinx.txt | 3 +- .../res/cardsfolder/c/curse_of_silence.txt | 2 +- forge-gui/res/cardsfolder/c/cursed_scroll.txt | 2 +- .../cardsfolder/d/declaration_of_naught.txt | 2 +- .../res/cardsfolder/d/dementia_sliver.txt | 2 +- .../res/cardsfolder/d/diviners_lockbox.txt | 2 +- .../res/cardsfolder/d/divining_witch.txt | 3 +- .../res/cardsfolder/e/estra_friend_to_all.txt | 7 ++-- forge-gui/res/cardsfolder/f/foreshadow.txt | 13 +++---- .../res/cardsfolder/m/medomais_prophecy.txt | 3 +- .../res/cardsfolder/n/nebuchadnezzar.txt | 2 +- forge-gui/res/cardsfolder/n/null_chamber.txt | 14 +++----- forge-gui/res/cardsfolder/p/petra_sphinx.txt | 6 ++-- forge-gui/res/cardsfolder/p/predict.txt | 10 +++--- .../res/cardsfolder/s/sphinx_ambassador.txt | 2 +- .../res/cardsfolder/s/summoners_bond.txt | 4 +-- .../t/tamiyo_collector_of_tales.txt | 3 +- .../res/cardsfolder/t/the_stone_brain.txt | 4 +-- .../res/cardsfolder/t/thought_hemorrhage.txt | 4 +-- .../cardsfolder/upcoming/day_of_the_moon.txt | 7 ++++ .../res/cardsfolder/v/vexing_arcanix.txt | 2 +- forge-gui/res/cardsfolder/w/wood_sage.txt | 3 +- .../java/forge/gui/card/CardDetailUtil.java | 9 ++--- 45 files changed, 120 insertions(+), 139 deletions(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/day_of_the_moon.txt diff --git a/forge-ai/src/main/java/forge/ai/GameState.java b/forge-ai/src/main/java/forge/ai/GameState.java index f70eff1b745..9d0a9e681fe 100644 --- a/forge-ai/src/main/java/forge/ai/GameState.java +++ b/forge-ai/src/main/java/forge/ai/GameState.java @@ -79,8 +79,7 @@ public abstract class GameState { private final Map> cardToRememberedId = new HashMap<>(); private final Map> cardToImprintedId = new HashMap<>(); private final Map> cardToMergedCards = new HashMap<>(); - private final Map cardToNamedCard = new HashMap<>(); - private final Map cardToNamedCard2 = new HashMap<>(); + private final Map> cardToNamedCard = new HashMap<>(); private final Map cardToExiledWithId = new HashMap<>(); private final Map cardAttackMap = new HashMap<>(); @@ -343,9 +342,6 @@ public abstract class GameState { if (!c.getNamedCard().isEmpty()) { newText.append("|NamedCard:").append(c.getNamedCard()); } - if (!c.getNamedCard2().isEmpty()) { - newText.append("|NamedCard2:").append(c.getNamedCard2()); - } List chosenCardIds = Lists.newArrayList(); for (Card obj : c.getChosenCards()) { @@ -1012,15 +1008,11 @@ public abstract class GameState { } // Named card - for (Entry entry : cardToNamedCard.entrySet()) { + for (Entry> entry : cardToNamedCard.entrySet()) { Card c = entry.getKey(); - c.setNamedCard(entry.getValue()); - } - - // Named card 2 - for (Entry entry : cardToNamedCard2.entrySet()) { - Card c = entry.getKey(); - c.setNamedCard2(entry.getValue()); + for (String s : entry.getValue()) { + c.addNamedCard(s); + } } // Chosen cards @@ -1358,9 +1350,8 @@ public abstract class GameState { List cardNames = Arrays.asList(info.substring(info.indexOf(':') + 1).split(",")); cardToMergedCards.put(c, cardNames); } else if (info.startsWith("NamedCard:")) { - cardToNamedCard.put(c, info.substring(info.indexOf(':') + 1)); - } else if (info.startsWith("NamedCard2:")) { - cardToNamedCard2.put(c, info.substring(info.indexOf(':') + 1)); + List cardNames = Arrays.asList(info.substring(info.indexOf(':') + 1).split(",")); + cardToNamedCard.put(c, cardNames); } else if (info.startsWith("ExecuteScript:")) { cardToScript.put(c, info.substring(info.indexOf(':') + 1)); } else if (info.startsWith("RememberedCards:")) { diff --git a/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java b/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java index f493a58a387..82766928065 100644 --- a/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java +++ b/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java @@ -431,10 +431,7 @@ public class GameCopier { newCard.setChosenColors(Lists.newArrayList(c.getChosenColors())); } if (!c.getNamedCard().isEmpty()) { - newCard.setNamedCard(c.getNamedCard()); - } - if (!c.getNamedCard2().isEmpty()) { - newCard.setNamedCard2(c.getNamedCard()); + newCard.setNamedCards(Lists.newArrayList(c.getNamedCards())); } newCard.setSVars(c.getSVars()); newCard.copyChangedSVarsFrom(c); diff --git a/forge-game/src/main/java/forge/game/ability/effects/ChooseCardNameEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ChooseCardNameEffect.java index 7020d913daf..83fa002fdae 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ChooseCardNameEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ChooseCardNameEffect.java @@ -152,13 +152,10 @@ public class ChooseCardNameEffect extends SpellAbilityEffect { } } - host.setNamedCard(chosen); + host.addNamedCard(chosen); if (!randomChoice) { p.setNamedCard(chosen); } - if (sa.hasParam("NoteFor")) { - p.addNoteForName(sa.getParam("NoteFor"), "Name:" + chosen); - } } } diff --git a/forge-game/src/main/java/forge/game/ability/effects/CleanUpEffect.java b/forge-game/src/main/java/forge/game/ability/effects/CleanUpEffect.java index 01d1f465f0b..3e4a6581661 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/CleanUpEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/CleanUpEffect.java @@ -65,7 +65,7 @@ public class CleanUpEffect extends SpellAbilityEffect { source.setChosenColors(null); } if (sa.hasParam("ClearNamedCard")) { - source.setNamedCard(""); + source.setNamedCards(null); } if (sa.hasParam("Log")) { source.getController().getGame().fireEvent(new GameEventRandomLog(logMessage)); diff --git a/forge-game/src/main/java/forge/game/ability/effects/CloneEffect.java b/forge-game/src/main/java/forge/game/ability/effects/CloneEffect.java index 23294c96395..d76cbd1cdb5 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/CloneEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/CloneEffect.java @@ -100,7 +100,7 @@ public class CloneEffect extends SpellAbilityEffect { } else if (sa.usesTargeting()) { cardToCopy = sa.getTargetCard(); } else if (sa.hasParam("CopyFromChosenName")) { - String name = host.getChosenName(); + String name = host.getNamedCard(); cardToCopy = Card.fromPaperCard(StaticData.instance().getCommonCards().getUniqueByName(name), activator); } if (cardToCopy == null) { diff --git a/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java b/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java index 19a00edca59..d4c29464b52 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java @@ -293,7 +293,7 @@ public class EffectEffect extends SpellAbilityEffect { // Set Chosen name if (!hostCard.getNamedCard().isEmpty()) { - eff.setNamedCard(hostCard.getNamedCard()); + eff.setNamedCards(hostCard.getNamedCards()); } // chosen number diff --git a/forge-game/src/main/java/forge/game/ability/effects/MakeCardEffect.java b/forge-game/src/main/java/forge/game/ability/effects/MakeCardEffect.java index c68eacd3c9f..b5170c379f9 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/MakeCardEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/MakeCardEffect.java @@ -52,8 +52,8 @@ public class MakeCardEffect extends SpellAbilityEffect { if (sa.hasParam("Name")) { final String n = sa.getParam("Name"); if (n.equals("ChosenName")) { - if (source.hasChosenName()) { - names.add(source.getChosenName()); + if (source.hasNamedCard()) { + names.addAll(source.getNamedCards()); } else { System.err.println("Malformed MakeCard entry! - " + source.toString()); } diff --git a/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java b/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java index 630293aa5f0..652b1b1377b 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/PlayEffect.java @@ -161,7 +161,7 @@ public class PlayEffect extends SpellAbilityEffect { return; } } else if (sa.hasParam("CopyFromChosenName")) { - String name = source.getChosenName(); + String name = source.getNamedCard(); if (name.trim().isEmpty()) return; Card card = Card.fromPaperCard(StaticData.instance().getCommonCards().getUniqueByName(name), controller); // so it gets added to stack diff --git a/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java b/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java index 51cc7295474..a238179ddce 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java @@ -184,8 +184,8 @@ public class SetStateEffect extends SpellAbilityEffect { game.getGameLog().add(GameLogEntryType.STACK_RESOLVE, sb); } else if (hiddenAgenda) { if (gameCard.hasKeyword("Double agenda")) { - String sb = p + " has revealed " + gameCard.getName() + " with the chosen names " + - gameCard.getNamedCard() + " and " + gameCard.getNamedCard2(); + String sb = p + " has revealed " + gameCard.getName() + " with the chosen names: " + + gameCard.getNamedCards(); game.getGameLog().add(GameLogEntryType.STACK_RESOLVE, sb); } else { String sb = p + " has revealed " + gameCard.getName() + " with the chosen name " + gameCard.getNamedCard(); diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index 27273c6c640..3986d90ea13 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -287,7 +287,7 @@ public class Card extends GameEntity implements Comparable, IHasSVars { private String chosenType2 = ""; private List notedTypes = new ArrayList<>(); private List chosenColors; - private String chosenName = ""; + private List chosenName = new ArrayList<>(); private String chosenName2 = ""; private Integer chosenNumber; private Player chosenPlayer; @@ -1947,34 +1947,23 @@ public class Card extends GameEntity implements Comparable, IHasSVars { // used for cards like Meddling Mage... public final String getNamedCard() { - return getChosenName(); + return hasNamedCard() ? chosenName.get(0) : ""; } - public final void setNamedCard(final String s) { - setChosenName(s); + public final List getNamedCards() { + return chosenName == null ? Lists.newArrayList() : chosenName; } - public final String getNamedCard2() { return getChosenName2(); } - public final void setNamedCard2(final String s) { - setChosenName2(s); - } - - public boolean hasChosenName() { - return chosenName != null; - } - public boolean hasChosenName2() { return chosenName2 != null; } - - public String getChosenName() { - return chosenName; - } - public final void setChosenName(final String s) { + public final void setNamedCards(final List s) { chosenName = s; view.updateNamedCard(this); } - public String getChosenName2() { - return chosenName2; + + public final void addNamedCard(final String s) { + chosenName.add(s); + view.updateNamedCard(this); } - public final void setChosenName2(final String s) { - chosenName2 = s; - view.updateNamedCard2(this); + + public boolean hasNamedCard() { + return chosenName != null && !chosenName.isEmpty(); } public boolean hasChosenEvenOdd() { diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index 9bccc86963b..141cc894084 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -215,7 +215,7 @@ public class CardFactoryUtil { if (name == null || name.isEmpty()) { return false; } - card.setNamedCard(name); + card.addNamedCard(name); if (card.hasKeyword("Double agenda")) { String name2 = player.getController().chooseCardName(sa, cpp, "Card.!NamedCard", @@ -223,7 +223,7 @@ public class CardFactoryUtil { if (name2 == null || name2.isEmpty()) { return false; } - card.setNamedCard2(name2); + card.addNamedCard(name2); } card.turnFaceDown(); diff --git a/forge-game/src/main/java/forge/game/card/CardProperty.java b/forge-game/src/main/java/forge/game/card/CardProperty.java index 937423e3e3f..9a51621199e 100644 --- a/forge-game/src/main/java/forge/game/card/CardProperty.java +++ b/forge-game/src/main/java/forge/game/card/CardProperty.java @@ -69,12 +69,19 @@ public class CardProperty { return false; } } else if (property.equals("NamedCard")) { - if (!card.sharesNameWith(source.getNamedCard())) { - return false; + boolean found = false; + for (String name : source.getNamedCards()) { + if (card.sharesNameWith(name)) { + found = true; + break; + } } - } else if (property.equals("NamedCard2")) { - if (!card.sharesNameWith(source.getNamedCard2())) { - return false; + return found; + } else if (property.startsWith("DifferentNameThan")) { + for (Card c : AbilityUtils.getDefinedCards(source, property.substring(17), spellAbility)) { + if (card.sharesNameWith(c)) { + return false; + } } } else if (property.equals("NamedByRememberedPlayer")) { if (!source.hasRemembered()) { diff --git a/forge-game/src/main/java/forge/game/card/CardUtil.java b/forge-game/src/main/java/forge/game/card/CardUtil.java index 2e63d4c6073..2e17f7c89eb 100644 --- a/forge-game/src/main/java/forge/game/card/CardUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardUtil.java @@ -296,8 +296,7 @@ public final class CardUtil { newCopy.setChosenType(in.getChosenType()); newCopy.setChosenType2(in.getChosenType2()); - newCopy.setChosenName(in.getChosenName()); - newCopy.setChosenName2(in.getChosenName2()); + newCopy.setNamedCards(in.getNamedCards()); newCopy.setChosenColors(Lists.newArrayList(in.getChosenColors())); if (in.hasChosenNumber()) { newCopy.setChosenNumber(in.getChosenNumber()); diff --git a/forge-game/src/main/java/forge/game/card/CardView.java b/forge-game/src/main/java/forge/game/card/CardView.java index 18d247a71cd..34c01c66426 100644 --- a/forge-game/src/main/java/forge/game/card/CardView.java +++ b/forge-game/src/main/java/forge/game/card/CardView.java @@ -509,17 +509,11 @@ public class CardView extends GameEntityView { set(TrackableProperty.Sector, c.getSector()); } - public String getNamedCard() { + public List getNamedCard() { return get(TrackableProperty.NamedCard); } void updateNamedCard(Card c) { - set(TrackableProperty.NamedCard, c.getNamedCard()); - } - public String getNamedCard2() { - return get(TrackableProperty.NamedCard2); - } - void updateNamedCard2(Card c) { - set(TrackableProperty.NamedCard2, c.getNamedCard2()); + set(TrackableProperty.NamedCard, c.getNamedCards()); } public boolean getMayPlayPlayers(PlayerView pv) { TrackableCollection col = get(TrackableProperty.MayPlayPlayers); diff --git a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java index 61331bd03dd..86378447e5b 100644 --- a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java +++ b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java @@ -213,7 +213,7 @@ public final class StaticAbilityContinuous { if (!hostCard.hasChosenPlayer() && input.contains("ChosenPlayer")) { return true; } - if (!hostCard.hasChosenName() && input.contains("ChosenName")) { + if (!hostCard.hasNamedCard() && input.contains("ChosenName")) { return true; } if (!hostCard.hasChosenEvenOdd() && (input.contains("ChosenEvenOdd") || input.contains("chosenEvenOdd"))) { @@ -297,8 +297,8 @@ public final class StaticAbilityContinuous { input = input.replaceAll("ChosenPlayerUID", String.valueOf(cp.getId())); input = input.replaceAll("ChosenPlayerName", cp.getName()); } - if (hostCard.hasChosenName()) { - final String chosenName = hostCard.getChosenName().replace(",", ";"); + if (hostCard.hasNamedCard()) { + final String chosenName = hostCard.getNamedCard().replace(",", ";"); input = input.replaceAll("ChosenName", "Card.named" + chosenName); } if (hostCard.hasChosenEvenOdd()) { diff --git a/forge-game/src/main/java/forge/trackable/TrackableProperty.java b/forge-game/src/main/java/forge/trackable/TrackableProperty.java index 2922e342836..ef7ff1a198d 100644 --- a/forge-game/src/main/java/forge/trackable/TrackableProperty.java +++ b/forge-game/src/main/java/forge/trackable/TrackableProperty.java @@ -78,8 +78,7 @@ public enum TrackableProperty { CurrentRoom(TrackableTypes.StringType), Intensity(TrackableTypes.IntegerType), Remembered(TrackableTypes.StringType), - NamedCard(TrackableTypes.StringType), - NamedCard2(TrackableTypes.StringType), + NamedCard(TrackableTypes.StringListType), PlayerMayLook(TrackableTypes.PlayerViewCollectionType, FreezeMode.IgnoresFreeze), MayPlayPlayers(TrackableTypes.PlayerViewCollectionType, FreezeMode.IgnoresFreeze), EntityAttachedTo(TrackableTypes.GameEntityViewType), diff --git a/forge-gui-desktop/src/test/java/forge/ai/simulation/SpellAbilityPickerSimulationTest.java b/forge-gui-desktop/src/test/java/forge/ai/simulation/SpellAbilityPickerSimulationTest.java index c25c74b44d6..daad3030e63 100644 --- a/forge-gui-desktop/src/test/java/forge/ai/simulation/SpellAbilityPickerSimulationTest.java +++ b/forge-gui-desktop/src/test/java/forge/ai/simulation/SpellAbilityPickerSimulationTest.java @@ -885,11 +885,11 @@ public class SpellAbilityPickerSimulationTest extends SimulationTest { // If we have a Pithing Needle, but it's naming something else, that's still fine. Card pithingNeedle = addCard("Pithing Needle", opponent); - pithingNeedle.setNamedCard("Flooded Strand"); + pithingNeedle.addNamedCard("Flooded Strand"); assertPickIsGoblinBombardmentTargetingOpponent.run(); // But if it's naming Gobling Bombardment, then we can't choose that SA. - pithingNeedle.setNamedCard("Goblin Bombardment"); + pithingNeedle.addNamedCard("Goblin Bombardment"); game.getAction().checkStateEffects(true); AssertJUnit.assertNull(picker.chooseSpellAbilityToPlay(null)); } diff --git a/forge-gui/res/cardsfolder/a/ach_hans_run.txt b/forge-gui/res/cardsfolder/a/ach_hans_run.txt index abb9d24a8df..8c871f92022 100644 --- a/forge-gui/res/cardsfolder/a/ach_hans_run.txt +++ b/forge-gui/res/cardsfolder/a/ach_hans_run.txt @@ -5,5 +5,5 @@ T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | O SVar:TrigAch:DB$ NameCard | Defined$ You | ValidCards$ Card.Creature | ValidDesc$ creature | SubAbility$ DBSearch | SpellDescription$ You may say "Ach! Hans, run! It's the . . ." and the name of a creature card. If you do, search your library for a card with that name, put it onto the battlefield, then shuffle your library. That creature gains haste. Exile it at the beginning of the next end step. SVar:DBSearch:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Card.NamedCard | RememberChanged$ True | SubAbility$ DBPump SVar:DBPump:DB$ Animate | Keywords$ Haste | Duration$ Permanent | AtEOT$ Exile | Defined$ Remembered | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearNamedCard$ True Oracle:At the beginning of your upkeep, you may say "Ach! Hans, run! It's the . . ." and the name of a creature card. If you do, search your library for a card with that name, put it onto the battlefield, then shuffle. That creature gains haste. Exile it at the beginning of the next end step. diff --git a/forge-gui/res/cardsfolder/b/brain_pry.txt b/forge-gui/res/cardsfolder/b/brain_pry.txt index 5bf5f971dae..669444d8f42 100644 --- a/forge-gui/res/cardsfolder/b/brain_pry.txt +++ b/forge-gui/res/cardsfolder/b/brain_pry.txt @@ -5,6 +5,6 @@ A:SP$ NameCard | Cost$ 1 B | Defined$ You | ValidCards$ Card.nonLand | ValidDesc SVar:RevealHand:DB$ RevealHand | RememberRevealed$ True | ValidTgts$ Player | TgtPrompt$ Select target player | SubAbility$ DBDiscard SVar:DBDiscard:DB$ Discard | Defined$ Targeted | NumCards$ 1 | Mode$ TgtChoose | DiscardValid$ Card.NamedCard | SubAbility$ DBDraw SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 1 | ConditionDefined$ Remembered | ConditionPresent$ Card.NamedCard | ConditionCompare$ EQ0 | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearNamedCard$ True AI:RemoveDeck:All Oracle:Choose a nonland card name. Target player reveals their hand. That player discards a card with that name. If they can't, you draw a card. diff --git a/forge-gui/res/cardsfolder/b/break_expectations.txt b/forge-gui/res/cardsfolder/b/break_expectations.txt index ecc9bf5ef28..a4089307bb2 100644 --- a/forge-gui/res/cardsfolder/b/break_expectations.txt +++ b/forge-gui/res/cardsfolder/b/break_expectations.txt @@ -2,9 +2,8 @@ Name:Break Expectations ManaCost:B Types:Sorcery A:SP$ Reveal | ValidTgts$ Player | TgtPrompt$ Select target player | RevealAllValid$ Card.cmcGE2+TargetedPlayerCtrl | SubAbility$ DBExile | StackDescription$ SpellDescription | SpellDescription$ Target player reveals all cards with mana value 2 or greater in their hand. You choose a card from among those cards. Exile that card. If a card was exiled this way, that player drafts a card from CARDNAME's spellbook and reveals it. -SVar:DBExile:DB$ ChangeZone | DefinedPlayer$ Targeted | Chooser$ You | Origin$ Hand | Destination$ Exile | ChangeNum$ 1 | ChangeType$ Card.cmcGE2+TargetedPlayerCtrl | Mandatory$ True | AlreadyRevealed$ True | RememberChanged$ True | AILogic$ BestCard | SubAbility$ DBDraft | StackDescription$ None -SVar:DBDraft:DB$ NameCard | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 | Draft$ True | Defined$ Targeted | ChooseFromList$ Colossal Plow,Millstone,Whirlermaker,Magistrate's Scepter,Replicating Ring,Raiders' Karve,Weapon Rack,Relic Amulet,Orazca Relic,Fifty Feet of Rope,Pyre of Heroes,Treasure Chest,Leather Armor,Spiked Pit Trap,Gingerbrute | SubAbility$ DBMakeCard | StackDescription$ None -SVar:DBMakeCard:DB$ MakeCard | Defined$ Targeted | Name$ ChosenName | Zone$ Hand | ImprintMade$ True | SubAbility$ DBReveal -SVar:DBReveal:DB$ Reveal | Defined$ Targeted | RevealDefined$ Imprinted | SubAbility$ DBCleanup | StackDescription$ None -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True | ClearNamedCard$ True +SVar:DBExile:DB$ ChangeZone | DefinedPlayer$ Targeted | Chooser$ You | Origin$ Hand | Destination$ Exile | ChangeNum$ 1 | ChangeType$ Card.cmcGE2+TargetedPlayerCtrl | Mandatory$ True | AlreadyRevealed$ True | Imprint$ True | AILogic$ BestCard | SubAbility$ DBDraft | StackDescription$ None +SVar:DBDraft:DB$ Draft | ConditionDefined$ Imprinted | ConditionPresent$ Card | ConditionCompare$ GE1 | Defined$ Targeted | Conjure$ True | Spellbook$ Colossal Plow,Millstone,Whirlermaker,Magistrate's Scepter,Replicating Ring,Raiders' Karve,Weapon Rack,Relic Amulet,Orazca Relic,Fifty Feet of Rope,Pyre of Heroes,Treasure Chest,Leather Armor,Spiked Pit Trap,Gingerbrute | RememberDrafted$ True | SubAbility$ DBReveal | StackDescription$ None +SVar:DBReveal:DB$ Reveal | Defined$ Targeted | RevealDefined$ Remembered | SubAbility$ DBCleanup | StackDescription$ None +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True Oracle:Target player reveals all cards with mana value 2 or greater in their hand. You choose a card from among those cards. Exile that card. If a card was exiled this way, that player drafts a card from Break Expectations's spellbook and reveals it. diff --git a/forge-gui/res/cardsfolder/c/cabal_therapist.txt b/forge-gui/res/cardsfolder/c/cabal_therapist.txt index b1d7dac7a81..4295a1727b5 100644 --- a/forge-gui/res/cardsfolder/c/cabal_therapist.txt +++ b/forge-gui/res/cardsfolder/c/cabal_therapist.txt @@ -6,6 +6,7 @@ K:Menace T:Mode$ Phase | PreCombatMain$ True | ValidPlayer$ You | Execute$ DBImmediateTrigger | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your precombat main phase, you may sacrifice a creature. When you do, choose a nonland card name, then target player reveals their hand and discards all cards with that name. SVar:DBImmediateTrigger:DB$ ImmediateTrigger | Execute$ NameCard | TriggerDescription$ You may sacrifice a creature. When you do, choose a nonland card name, then target player reveals their hand and discards all cards with that name. | UnlessCost$ Sac<1/Creature> | UnlessPayer$ You | UnlessSwitched$ True SVar:NameCard:DB$ NameCard | Defined$ You | ValidCards$ Card.nonLand | ValidDesc$ nonland | SubAbility$ DBDiscard | SpellDescription$ Choose a nonland card name. Target player reveals their hand and discards all cards with that name. -SVar:DBDiscard:DB$ Discard | ValidTgts$ Player | TgtPrompt$ Select target player | Mode$ RevealDiscardAll | DiscardValid$ Card.NamedCard +SVar:DBDiscard:DB$ Discard | ValidTgts$ Player | Mode$ RevealDiscardAll | DiscardValid$ Card.NamedCard | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearNamedCard$ True AI:RemoveDeck:All Oracle:Menace\nAt the beginning of your precombat main phase, you may sacrifice a creature. When you do, choose a nonland card name, then target player reveals their hand and discards all cards with that name. diff --git a/forge-gui/res/cardsfolder/c/cheering_fanatic.txt b/forge-gui/res/cardsfolder/c/cheering_fanatic.txt index 4d48fcf36aa..96726ed2f7e 100644 --- a/forge-gui/res/cardsfolder/c/cheering_fanatic.txt +++ b/forge-gui/res/cardsfolder/c/cheering_fanatic.txt @@ -4,7 +4,8 @@ Types:Creature Goblin PT:2/2 T:Mode$ Attacks | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigNameCard | TriggerDescription$ Whenever CARDNAME attacks, choose a card name. Spells with the chosen name cost {1} less to cast this turn. SVar:TrigNameCard:DB$ NameCard | Defined$ You | SubAbility$ DBEffect -SVar:DBEffect:DB$ Effect | StaticAbilities$ CFReduceCost +SVar:DBEffect:DB$ Effect | SubAbility$ DBCleanup | StaticAbilities$ CFReduceCost SVar:CFReduceCost:Mode$ ReduceCost | EffectZone$ Command | ValidCard$ Card.NamedCard | Type$ Spell | Amount$ 1 | Description$ Spells with the chosen name cost {1} less to cast this turn. +SVar:DBCleanup:DB$ Cleanup | ClearNamedCard$ True AI:RemoveDeck:All Oracle:Whenever Cheering Fanatic attacks, choose a card name. Spells with the chosen name cost {1} less to cast this turn. diff --git a/forge-gui/res/cardsfolder/c/conundrum_sphinx.txt b/forge-gui/res/cardsfolder/c/conundrum_sphinx.txt index c6f2511e7e2..b93f28fc497 100644 --- a/forge-gui/res/cardsfolder/c/conundrum_sphinx.txt +++ b/forge-gui/res/cardsfolder/c/conundrum_sphinx.txt @@ -6,7 +6,8 @@ K:Flying T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ EachName | TriggerDescription$ Whenever CARDNAME attacks, each player chooses a card name. Then each player reveals the top card of their library. If the card a player revealed has the name they chose, that player puts it into their hand. If it doesn't, that player puts it on the bottom of their library. SVar:EachName:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBName | SubAbility$ DBDigEach SVar:DBName:DB$ NameCard | Defined$ Player.IsRemembered | AILogic$ RandomInComputerDeck -SVar:DBDigEach:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBDig +SVar:DBDigEach:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBDig | SubAbility$ DBCleanup SVar:DBDig:DB$ Dig | DigNum$ 1 | Defined$ Player.IsRemembered | ChangeNum$ All | ChangeValid$ Card.NamedByRememberedPlayer | Reveal$ True +SVar:DBCleanup:DB$ Cleanup | ClearNamedCard$ True AI:RemoveDeck:Random Oracle:Flying\nWhenever Conundrum Sphinx attacks, each player chooses a card name. Then each player reveals the top card of their library. If the card a player revealed has the name they chose, that player puts it into their hand. If it doesn't, that player puts it on the bottom of their library. diff --git a/forge-gui/res/cardsfolder/c/curse_of_silence.txt b/forge-gui/res/cardsfolder/c/curse_of_silence.txt index de3ad32e9a9..038c960d266 100644 --- a/forge-gui/res/cardsfolder/c/curse_of_silence.txt +++ b/forge-gui/res/cardsfolder/c/curse_of_silence.txt @@ -6,7 +6,7 @@ A:SP$ Attach | ValidTgts$ Player | AILogic$ Curse K:ETBReplacement:Other:DBNameCard SVar:DBNameCard:DB$ NameCard | Defined$ You | SpellDescription$ As CARDNAME enters the battlefield, choose a card name. S:Mode$ RaiseCost | EffectZone$ Battlefield | ValidCard$ Card.NamedCard | Type$ Spell | Activator$ Player.EnchantedBy | Amount$ 2 | Description$ Spells with the chosen name enchanted player casts cost {2} more to cast. -T:Mode$ SpellCast | ValidCard$ Card.NamedCard | ValidActivatingPlayer$ Player.EnchantedBy | Execute$ TrigDraw | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player casts a spell with the chosen name, you may sacrifice Curse of Silence. If you do, draw a card. +T:Mode$ SpellCast | ValidCard$ Card.NamedCard | ValidActivatingPlayer$ Player.EnchantedBy | Execute$ TrigDraw | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player casts a spell with the chosen name, you may sacrifice CARDNAME. If you do, draw a card. SVar:TrigDraw:AB$ Draw | Cost$ Sac<1/CARDNAME> | NumCards$ 1 DeckHas:Ability$Sacrifice Oracle:Enchant player\nAs Curse of Silence enters the battlefield, choose a card name.\nSpells with the chosen name enchanted player casts cost {2} more to cast.\nWhenever enchanted player casts a spell with the chosen name, you may sacrifice Curse of Silence. If you do, draw a card. diff --git a/forge-gui/res/cardsfolder/c/cursed_scroll.txt b/forge-gui/res/cardsfolder/c/cursed_scroll.txt index bf971d312d3..4e661211740 100644 --- a/forge-gui/res/cardsfolder/c/cursed_scroll.txt +++ b/forge-gui/res/cardsfolder/c/cursed_scroll.txt @@ -4,6 +4,6 @@ Types:Artifact A:AB$ NameCard | Cost$ 3 T | Defined$ You | SubAbility$ DBReveal | AILogic$ CursedScroll | SpellDescription$ Choose a card name, then reveal a card at random from your hand. If that card has the chosen name, CARDNAME deals 2 damage to any target. SVar:DBReveal:DB$ Reveal | Random$ True | RememberRevealed$ True | Defined$ You | SubAbility$ DBDamage SVar:DBDamage:DB$ DealDamage | NumDmg$ 2 | ValidTgts$ Any | ConditionDefined$ Remembered | ConditionPresent$ Card.NamedCard | ConditionCompare$ EQ1 | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearNamedCard$ True SVar:PreferredHandSize:1 Oracle:{3}, {T}: Choose a card name, then reveal a card at random from your hand. If that card has the chosen name, Cursed Scroll deals 2 damage to any target. diff --git a/forge-gui/res/cardsfolder/d/declaration_of_naught.txt b/forge-gui/res/cardsfolder/d/declaration_of_naught.txt index 5e6466faee3..c99695b3efa 100644 --- a/forge-gui/res/cardsfolder/d/declaration_of_naught.txt +++ b/forge-gui/res/cardsfolder/d/declaration_of_naught.txt @@ -3,6 +3,6 @@ ManaCost:U U Types:Enchantment K:ETBReplacement:Other:DBNameCard SVar:DBNameCard:DB$ NameCard | Defined$ You | SpellDescription$ As CARDNAME enters the battlefield, choose a card name. -A:AB$ Counter | Cost$ U | TargetType$ Spell | TgtPrompt$ Select target spell with the chosen name. | ValidTgts$ Card.NamedCard | SpellDescription$ Counter target spell with the chosen name. +A:AB$ Counter | Cost$ U | TargetType$ Spell | TgtPrompt$ Select target spell with the chosen name | ValidTgts$ Card.NamedCard | SpellDescription$ Counter target spell with the chosen name. AI:RemoveDeck:Random Oracle:As Declaration of Naught enters the battlefield, choose a card name.\n{U}: Counter target spell with the chosen name. diff --git a/forge-gui/res/cardsfolder/d/dementia_sliver.txt b/forge-gui/res/cardsfolder/d/dementia_sliver.txt index bf7127466f7..11ed2216ec4 100644 --- a/forge-gui/res/cardsfolder/d/dementia_sliver.txt +++ b/forge-gui/res/cardsfolder/d/dementia_sliver.txt @@ -6,7 +6,7 @@ S:Mode$ Continuous | Affected$ Sliver | AddAbility$ ABDementiaNameCard | AddSVar SVar:ABDementiaNameCard:AB$ NameCard | Cost$ T | Defined$ You | SubAbility$ DBDementiaReveal | SpellDescription$ Choose a card name. Target opponent reveals a card at random from their hand. If that card has the chosen name, that player discards it. Activate only during your turn. SVar:DBDementiaReveal:DB$ Reveal | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | Random$ True | PlayerTurn$ True | RememberRevealed$ True | SubAbility$ DBDementiaDiscard SVar:DBDementiaDiscard:DB$ Discard | DiscardValid$ Card.NamedCard+IsRemembered | Mode$ TgtChoose | Defined$ Targeted | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearNamedCard$ True AI:RemoveDeck:All AI:RemoveDeck:Random Oracle:All Slivers have "{T}: Choose a card name. Target opponent reveals a card at random from their hand. If that card has the chosen name, that player discards it. Activate only during your turn." diff --git a/forge-gui/res/cardsfolder/d/diviners_lockbox.txt b/forge-gui/res/cardsfolder/d/diviners_lockbox.txt index b3e180cf764..04c868014ee 100644 --- a/forge-gui/res/cardsfolder/d/diviners_lockbox.txt +++ b/forge-gui/res/cardsfolder/d/diviners_lockbox.txt @@ -5,6 +5,6 @@ A:AB$ NameCard | Cost$ 1 T | Defined$ You | SubAbility$ DBReveal | SorcerySpeed$ SVar:DBReveal:DB$ PeekAndReveal | RememberRevealed$ True | SubAbility$ DBSac SVar:DBSac:DB$ Sacrifice | SacValid$ Self | ConditionDefined$ Remembered | ConditionPresent$ Card.NamedCard | ConditionCompare$ GE1 | SubAbility$ DBDraw SVar:DBDraw:DB$ Draw | NumCards$ 3 | ConditionDefined$ Remembered | ConditionPresent$ Card.NamedCard | ConditionCompare$ GE1 | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearNamedCard$ True AI:RemoveDeck:All Oracle:{1}, {T}: Choose a card name, then reveal the top card of your library. If that card has the chosen name, sacrifice Diviner's Lockbox and draw three cards. Activate only as a sorcery. diff --git a/forge-gui/res/cardsfolder/d/divining_witch.txt b/forge-gui/res/cardsfolder/d/divining_witch.txt index 8ffa7891ecb..efe6cb53569 100644 --- a/forge-gui/res/cardsfolder/d/divining_witch.txt +++ b/forge-gui/res/cardsfolder/d/divining_witch.txt @@ -4,6 +4,7 @@ Types:Creature Human Spellshaper PT:1/1 A:AB$ NameCard | Cost$ 1 B T Discard<1/Card> | Defined$ You | SubAbility$ DBExile | SpellDescription$ Choose a card name. Exile the top six cards of your library, then reveal cards from the top of your library until you reveal a card with the chosen name. Put that card into your hand and exile all other cards revealed this way. SVar:DBExile:DB$ Dig | Defined$ You | DigNum$ 6 | ChangeNum$ All | DestinationZone$ Exile | SubAbility$ DBDigUntil -SVar:DBDigUntil:DB$ DigUntil | Valid$ Card.NamedCard | FoundDestination$ Hand | RevealedDestination$ Exile | ValidDescription$ named card +SVar:DBDigUntil:DB$ DigUntil | Valid$ Card.NamedCard | FoundDestination$ Hand | RevealedDestination$ Exile | SubAbility$ DBCleanup | ValidDescription$ named card +SVar:DBCleanup:DB$ Cleanup | ClearNamedCard$ True AI:RemoveDeck:All Oracle:{1}{B}, {T}, Discard a card: Choose a card name. Exile the top six cards of your library, then reveal cards from the top of your library until you reveal a card with the chosen name. Put that card into your hand and exile all other cards revealed this way. diff --git a/forge-gui/res/cardsfolder/e/estra_friend_to_all.txt b/forge-gui/res/cardsfolder/e/estra_friend_to_all.txt index 05fd5ead561..750264a03f4 100644 --- a/forge-gui/res/cardsfolder/e/estra_friend_to_all.txt +++ b/forge-gui/res/cardsfolder/e/estra_friend_to_all.txt @@ -4,11 +4,12 @@ Types:Legendary Planeswalker Estra Loyalty:5 Text:CARDNAME can be your commander. A:AB$ Token | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | TokenScript$ all_1_1_human_wizard | SpellDescription$ Create a 1/1 Human Wizard creature token that's all colors. -A:AB$ NameCard | Cost$ SubCounter<3/LOYALTY> | Planeswalker$ True | Defined$ You | ChooseFromList$ Enlightened Tutor,Mystical Tutor,Booster Tutor,Imperial Recruiter,Worldly Tutor | SubAbility$ DBCast | StackDescription$ SpellDescription | SpellDescription$ Choose a card name from among Enlightened Tutor, Mystical Tutor, Booster Tutor, Imperial Recruiter, and Worldy Tutor. Create a copy of the card with the chosen name. You may cast the copy without paying its mana cost. -SVar:DBCast:DB$ Play | WithoutManaCost$ True | CopyFromChosenName$ True | Optional$ True | StackDescription$ None +A:AB$ NameCard | Cost$ SubCounter<3/LOYALTY> | Planeswalker$ True | Defined$ You | ChooseFromList$ Enlightened Tutor,Mystical Tutor,Booster Tutor,Imperial Recruiter,Worldly Tutor | SubAbility$ DBCast | StackDescription$ SpellDescription | SpellDescription$ Choose a card name from among Enlightened Tutor, Mystical Tutor, Booster Tutor, Imperial Recruiter, and Worldly Tutor. Create a copy of the card with the chosen name. You may cast the copy without paying its mana cost. +SVar:DBCast:DB$ Play | WithoutManaCost$ True | CopyFromChosenName$ True | Optional$ True | SubAbility$ DBCleanup | StackDescription$ None +SVar:DBCleanup:DB$ Cleanup | ClearNamedCard$ True A:AB$ Effect | Cost$ SubCounter<8/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Ersta, Friend to All | Triggers$ EffPhase | Duration$ Permanent | SpellDescription$ You get an emblem with "At the beginning of your upkeep, if you control twenty or more Wizards, you win the game." SVar:EffPhase:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigWinGame | IsPresent$ Wizard.YouCtrl | PresentCompare$ GE20 | TriggerDescription$ At the beginning of your upkeep, if you control twenty or more Wizards, you win the game. SVar:TrigWinGame:DB$ WinsGame | Defined$ You DeckHas:Ability$Token & Type$Human|Advisor|Wizard DeckNeeds:Type$Wizard -Oracle:[+1]: Create a 1/1 Human Wizard creature token that's all colors.\n[−3]: Choose a card name from among Enlightened Tutor, Mystical Tutor, Booster Tutor, Imperial Recruiter, and Worldy Tutor. Create a copy of the card with the chosen name. You may cast the copy without paying its mana cost.\n[−8]: You get an emblem with "At the beginning of your upkeep, if you control twenty or more Wizards, you win the game."\nErsta, Friend to All can be your commander. +Oracle:[+1]: Create a 1/1 Human Wizard creature token that's all colors.\n[−3]: Choose a card name from among Enlightened Tutor, Mystical Tutor, Booster Tutor, Imperial Recruiter, and Worldly Tutor. Create a copy of the card with the chosen name. You may cast the copy without paying its mana cost.\n[−8]: You get an emblem with "At the beginning of your upkeep, if you control twenty or more Wizards, you win the game."\nErsta, Friend to All can be your commander. diff --git a/forge-gui/res/cardsfolder/f/foreshadow.txt b/forge-gui/res/cardsfolder/f/foreshadow.txt index a2b29361a3b..1b58792b7b4 100644 --- a/forge-gui/res/cardsfolder/f/foreshadow.txt +++ b/forge-gui/res/cardsfolder/f/foreshadow.txt @@ -1,11 +1,12 @@ Name:Foreshadow ManaCost:1 U Types:Instant -A:SP$ NameCard | Cost$ 1 U | Defined$ You | SubAbility$ DBMill | SpellDescription$ Choose a card name, then target opponent puts the top card of their library into their graveyard. If a card with the chosen name was milled this way, you draw a card. Draw a card at the beginning of the next turn's upkeep. -SVar:DBMill:DB$ Mill | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | NumCards$ 1 | RememberMilled$ True | SubAbility$ DBDraw -SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DelTrigSlowtrip -SVar:DelTrigSlowtrip:DB$ DelayedTrigger | NextTurn$ True | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawSlowtrip | TriggerDescription$ Draw a card. -SVar:DrawSlowtrip:DB$ Draw | NumCards$ 1 | Defined$ You -SVar:X:Remembered$Valid Card.NamedCard +A:SP$ NameCard | SubAbility$ DBMill | SpellDescription$ Choose a card name, then target opponent mills a card. If a card with the chosen name was milled this way, you draw a card. Draw a card at the beginning of the next turn's upkeep. +SVar:DBMill:DB$ Mill | ValidTgts$ Opponent | NumCards$ 1 | RememberMilled$ True | SubAbility$ DBDraw +SVar:DBDraw:DB$ Draw | ConditionDefined$ Remembered | ConditionPresent$ Card.NamedCard | SubAbility$ DelTrigSlowtrip +SVar:DelTrigSlowtrip:DB$ DelayedTrigger | NextTurn$ True | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ DrawSlowtrip | SubAbility$ DBCleanup | TriggerDescription$ Draw a card. +SVar:DrawSlowtrip:DB$ Draw +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearNamedCard$ True AI:RemoveDeck:All +DeckHas:Ability$Mill Oracle:Choose a card name, then target opponent mills a card. If a card with the chosen name was milled this way, you draw a card.\nDraw a card at the beginning of the next turn's upkeep. diff --git a/forge-gui/res/cardsfolder/m/medomais_prophecy.txt b/forge-gui/res/cardsfolder/m/medomais_prophecy.txt index f3e8dbc62a9..11c558305d3 100644 --- a/forge-gui/res/cardsfolder/m/medomais_prophecy.txt +++ b/forge-gui/res/cardsfolder/m/medomais_prophecy.txt @@ -4,8 +4,9 @@ Types:Enchantment Saga K:Saga:4:DBScry,DBNameCard,DBEffect,DBLook SVar:DBScry:DB$ Scry | ScryNum$ 2 | SpellDescription$ Scry 2. SVar:DBNameCard:DB$ NameCard | SpellDescription$ Choose a card name. -SVar:DBEffect:DB$ Effect | Triggers$ NamedCardCast | SpellDescription$ When you cast a spell with the chosen name for the first time this turn, draw two cards. +SVar:DBEffect:DB$ Effect | Triggers$ NamedCardCast | SubAbility$ DBCleanup | SpellDescription$ When you cast a spell with the chosen name for the first time this turn, draw two cards. SVar:NamedCardCast:Mode$ SpellCast | ValidCard$ Card.NamedCard | ValidActivatingPlayer$ You | OneOff$ True | TriggerZones$ Command | Execute$ TrigDraw | TriggerDescription$ When you cast a spell with the chosen name for the first time this turn, draw two cards. SVar:TrigDraw:DB$ Draw | NumCards$ 2 +SVar:DBCleanup:DB$ Cleanup | ClearNamedCard$ True SVar:DBLook:DB$ PeekAndReveal | Defined$ Player | NoReveal$ True | SpellDescription$ Look at the top card of each player's library. Oracle:(As this Saga enters and after your draw step, add a lore counter. Sacrifice after IV.)\nI — Scry 2.\nII — Choose a card name.\nIII — When you cast a spell with the chosen name for the first time this turn, draw two cards.\nIV — Look at the top card of each player's library. diff --git a/forge-gui/res/cardsfolder/n/nebuchadnezzar.txt b/forge-gui/res/cardsfolder/n/nebuchadnezzar.txt index 7afc4da2e0b..cc4ac065c7f 100644 --- a/forge-gui/res/cardsfolder/n/nebuchadnezzar.txt +++ b/forge-gui/res/cardsfolder/n/nebuchadnezzar.txt @@ -5,7 +5,7 @@ PT:3/3 A:AB$ NameCard | Cost$ X T | Defined$ You | SubAbility$ DBReveal | PlayerTurn$ True | SpellDescription$ Choose a card name. Target opponent reveals X cards at random from their hand. Then that player discards all cards with that name revealed this way. Activate only during your turn. SVar:DBReveal:DB$ Reveal | ValidTgts$ Opponent | Random$ True | NumCards$ X | RememberRevealed$ True | SubAbility$ DBDiscard SVar:DBDiscard:DB$ Discard | DefinedCards$ ValidHand Card.IsRemembered+NamedCard | Defined$ Targeted | Mode$ Defined | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearNamedCard$ True SVar:X:Count$xPaid AI:RemoveDeck:All DeckHas:Ability$Discard diff --git a/forge-gui/res/cardsfolder/n/null_chamber.txt b/forge-gui/res/cardsfolder/n/null_chamber.txt index 6bccd15f606..504f51eef9c 100644 --- a/forge-gui/res/cardsfolder/n/null_chamber.txt +++ b/forge-gui/res/cardsfolder/n/null_chamber.txt @@ -2,14 +2,10 @@ Name:Null Chamber ManaCost:3 W Types:World Enchantment K:ETBReplacement:Other:DBNameCard -SVar:DBNameCard:DB$ NameCard | Defined$ You | ValidCards$ Card.nonBasic | ValidDesc$ card other than a basic land | SubAbility$ RememberYou | SpellDescription$ As CARDNAME enters the battlefield, you and an opponent each choose a card name other than a basic land card name. -SVar:RememberYou:DB$ Pump | RememberObjects$ ValidAll Card.NamedCard | SubAbility$ ChooseP -SVar:ChooseP:DB$ ChoosePlayer | Defined$ You | Choices$ Opponent | SubAbility$ NameOpp -SVar:NameOpp:DB$ NameCard | Defined$ ChosenPlayer | ValidCards$ Card.nonBasic | ValidDesc$ a card name other than a basic land card name | SubAbility$ RememberOpp -SVar:RememberOpp:DB$ Pump | RememberObjects$ ValidAll Card.NamedCard -S:Mode$ CantBeCast | ValidCard$ Card.IsRemembered | Description$ Spells with the chosen names can't be cast and lands with the chosen names can't be played. -S:Mode$ CantPlayLand | ValidCard$ Land.IsRemembered -T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.Self | Execute$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBNameCard:DB$ NameCard | ValidCards$ Card.nonBasic | ValidDesc$ card other than a basic land | SubAbility$ ChooseP | SpellDescription$ As CARDNAME enters the battlefield, you and an opponent each choose a card name other than a basic land card name. +SVar:ChooseP:DB$ ChoosePlayer | Choices$ Opponent | SubAbility$ NameOpp +SVar:NameOpp:DB$ NameCard | Defined$ ChosenPlayer | ValidCards$ Card.nonBasic | ValidDesc$ a card name other than a basic land card name +S:Mode$ CantBeCast | ValidCard$ Card.NamedCard | Description$ Spells with the chosen names can't be cast and lands with the chosen names can't be played. +S:Mode$ CantPlayLand | ValidCard$ Land.NamedCard AI:RemoveDeck:Random Oracle:As Null Chamber enters the battlefield, you and an opponent each choose a card name other than a basic land card name.\nSpells with the chosen names can't be cast and lands with the chosen names can't be played. diff --git a/forge-gui/res/cardsfolder/p/petra_sphinx.txt b/forge-gui/res/cardsfolder/p/petra_sphinx.txt index f818bb87cc0..c48c4f7cfc0 100644 --- a/forge-gui/res/cardsfolder/p/petra_sphinx.txt +++ b/forge-gui/res/cardsfolder/p/petra_sphinx.txt @@ -2,6 +2,8 @@ Name:Petra Sphinx ManaCost:2 W W W Types:Creature Sphinx PT:3/4 -A:AB$ NameCard | Cost$ T | ValidTgts$ Player | TgtPrompt$ Select target player | SubAbility$ DBDig | AILogic$ MostProminentInComputerDeck | SpellDescription$ Target player chooses a card name, then reveals the top card of their library. If that card has the chosen name, that player puts it into their hand. If it doesn't, the player puts it into their graveyard. -SVar:DBDig:DB$ Dig | DigNum$ 1 | Defined$ Targeted | ChangeNum$ All | ChangeValid$ Card.NamedCard | DestinationZone2$ Graveyard | Reveal$ True +A:AB$ NameCard | Cost$ T | ValidTgts$ Player | SubAbility$ DBDig | AILogic$ MostProminentInComputerDeck | SpellDescription$ Target player chooses a card name, then reveals the top card of their library. If that card has the chosen name, that player puts it into their hand. If it doesn't, the player puts it into their graveyard. +SVar:DBDig:DB$ Dig | DigNum$ 1 | Defined$ Targeted | ChangeNum$ All | ChangeValid$ Card.NamedCard | DestinationZone2$ Graveyard | Reveal$ True | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearNamedCard$ True +DeckHints:Ability$Graveyard Oracle:{T}: Target player chooses a card name, then reveals the top card of their library. If that card has the chosen name, that player puts it into their hand. If it doesn't, the player puts it into their graveyard. diff --git a/forge-gui/res/cardsfolder/p/predict.txt b/forge-gui/res/cardsfolder/p/predict.txt index 8775ae61c7b..45e0fdeafba 100644 --- a/forge-gui/res/cardsfolder/p/predict.txt +++ b/forge-gui/res/cardsfolder/p/predict.txt @@ -1,10 +1,10 @@ Name:Predict ManaCost:1 U Types:Instant -A:SP$ NameCard | Cost$ 1 U | Defined$ You | SubAbility$ DBMill | SpellDescription$ Choose a card name, then target player mills a card. If a card with the chosen name was milled this way, you draw two cards. Otherwise, you draw a card. -SVar:DBMill:DB$ Mill | ValidTgts$ Player | TgtPrompt$ Select target player | NumCards$ 1 | RememberMilled$ True | SubAbility$ DBDraw -SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | SubAbility$ DBDraw2 -SVar:DBDraw2:DB$ Draw | Defined$ You | NumCards$ 1 -SVar:X:Remembered$Valid Card.NamedCard +A:SP$ NameCard | Defined$ You | SubAbility$ DBMill | SpellDescription$ Choose a card name, then target player mills a card. If a card with the chosen name was milled this way, you draw two cards. Otherwise, you draw a card. +SVar:DBMill:DB$ Mill | ValidTgts$ Player | NumCards$ 1 | RememberMilled$ True | SubAbility$ DBDraw +SVar:DBDraw:DB$ Draw | NumCards$ X +SVar:X:Count$Compare Y GE1.2.1 +SVar:Y:Remembered$Valid Card.NamedCard AI:RemoveDeck:All Oracle:Choose a card name, then target player mills a card. If a card with the chosen name was milled this way, you draw two cards. Otherwise, you draw a card. diff --git a/forge-gui/res/cardsfolder/s/sphinx_ambassador.txt b/forge-gui/res/cardsfolder/s/sphinx_ambassador.txt index 51e5e6ebef6..303c9ca649c 100644 --- a/forge-gui/res/cardsfolder/s/sphinx_ambassador.txt +++ b/forge-gui/res/cardsfolder/s/sphinx_ambassador.txt @@ -9,5 +9,5 @@ SVar:DBName:DB$ NameCard | Defined$ TriggeredDefendingPlayer | SubAbility$ DBCha SVar:DBChangeZone:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Battlefield | GainControl$ True | ConditionDefined$ Remembered | Shuffle$ False | ConditionPresent$ Card.NamedCard | ConditionCompare$ EQ0 | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ1 | Optional$ True | OptionalDecider$ You | SubAbility$ DBShuffle SVar:DBShuffle:DB$ Shuffle | Defined$ TriggeredDefendingPlayer | SubAbility$ DBCleanup SVar:X:Count$ValidLibrary Creature.IsRemembered -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearNamedCard$ True Oracle:Flying\nWhenever Sphinx Ambassador deals combat damage to a player, search that player's library for a card, then that player chooses a card name. If you searched for a creature card that doesn't have that name, you may put it onto the battlefield under your control. Then that player shuffles. diff --git a/forge-gui/res/cardsfolder/s/summoners_bond.txt b/forge-gui/res/cardsfolder/s/summoners_bond.txt index 22729f46dd9..c8e656129f4 100644 --- a/forge-gui/res/cardsfolder/s/summoners_bond.txt +++ b/forge-gui/res/cardsfolder/s/summoners_bond.txt @@ -3,7 +3,5 @@ ManaCost:no cost Types:Conspiracy K:Double agenda T:Mode$ SpellCast | ValidCard$ Creature.NamedCard | ValidActivatingPlayer$ You | Execute$ TrigSearch | OptionalDecider$ You | TriggerDescription$ Whenever you cast a creature spell with one of the chosen names, you may search your library for a creature card with the other chosen name, reveal it, put it into your hand, then shuffle. -T:Mode$ SpellCast | ValidCard$ Creature.NamedCard2 | ValidActivatingPlayer$ You | Execute$ TrigSearch2 | OptionalDecider$ You | Secondary$ True | TriggerDescription$ Whenever you cast a creature spell with one of the chosen names, you may search your library for a creature card with the other chosen name, reveal it, put it into your hand, then shuffle. -SVar:TrigSearch:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Creature.NamedCard2 -SVar:TrigSearch2:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Creature.NamedCard +SVar:TrigSearch:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Creature.NamedCard+DifferentNameThanTriggeredSpellAbility Oracle:Double agenda (Start the game with this conspiracy face down in the command zone and secretly choose two different card names. You may turn this conspiracy face up any time and reveal those names.)\nWhenever you cast a creature spell with one of the chosen names, you may search your library for a creature card with the other chosen name, reveal it, put it into your hand, then shuffle. diff --git a/forge-gui/res/cardsfolder/t/tamiyo_collector_of_tales.txt b/forge-gui/res/cardsfolder/t/tamiyo_collector_of_tales.txt index 95b9cb62a75..12dfa79ba68 100644 --- a/forge-gui/res/cardsfolder/t/tamiyo_collector_of_tales.txt +++ b/forge-gui/res/cardsfolder/t/tamiyo_collector_of_tales.txt @@ -5,7 +5,8 @@ Loyalty:5 S:Mode$ CantDiscard | ValidPlayer$ You | ValidCause$ SpellAbility.OppCtrl | ForCost$ False | Description$ Spells and abilities your opponents control can't cause you to discard cards or sacrifice permanents. S:Mode$ CantSacrifice | ValidCard$ Card.YouCtrl | ValidCause$ SpellAbility.OppCtrl | ForCost$ False | Secondary$ True | Description$ Spells and abilities your opponents control can't cause you to discard cards or sacrifice permanents. A:AB$ NameCard | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | Defined$ You | ValidCards$ Card.nonLand | SubAbility$ DBDig | StackDescription$ SpellDescription | SpellDescription$ Choose a nonland card name, then reveal the top four cards of your library. Put all cards with the chosen name from among them into your hand and the rest into your graveyard. -SVar:DBDig:DB$ Dig | DigNum$ 4 | Reveal$ True | ChangeNum$ All | ChangeValid$ Card.NamedCard | DestinationZone2$ Graveyard +SVar:DBDig:DB$ Dig | DigNum$ 4 | Reveal$ True | ChangeNum$ All | ChangeValid$ Card.NamedCard | DestinationZone2$ Graveyard | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearNamedCard$ True A:AB$ ChangeZone | Cost$ SubCounter<3/LOYALTY> | Planeswalker$ True | TgtPrompt$ Choose target card in your graveyard | ValidTgts$ Card.YouCtrl | Origin$ Graveyard | Destination$ Hand | SpellDescription$ Return target card from your graveyard to your hand. AI:RemoveDeck:All DeckHas:Ability$Graveyard diff --git a/forge-gui/res/cardsfolder/t/the_stone_brain.txt b/forge-gui/res/cardsfolder/t/the_stone_brain.txt index 44ef0cf09bd..12d50031108 100644 --- a/forge-gui/res/cardsfolder/t/the_stone_brain.txt +++ b/forge-gui/res/cardsfolder/t/the_stone_brain.txt @@ -5,8 +5,8 @@ A:AB$ NameCard | Cost$ 2 T Exile<1/CARDNAME> | Defined$ You | SubAbility$ ExileY SVar:ExileYard:DB$ ChangeZone | ValidTgts$ Opponent | ChangeType$ Card.NamedCard | Origin$ Graveyard | DefinedPlayer$ Targeted | Chooser$ You | Destination$ Exile | ChangeNum$ Y | Hidden$ True | RememberChanged$ True | SubAbility$ ExileHand | StackDescription$ Search {p:Targeted}'s graveyard, hand, and library for up to four cards with that name and exile them. SVar:ExileHand:DB$ ChangeZone | Origin$ Hand | Destination$ Exile | DefinedPlayer$ Targeted | ChangeType$ Card.NamedCard | ChangeNum$ Y | Chooser$ You | SubAbility$ ExileLib | StackDescription$ None | RememberChanged$ True | Imprint$ True SVar:ExileLib:DB$ ChangeZone | Origin$ Library | Destination$ Exile | DefinedPlayer$ Targeted | ChangeType$ Card.NamedCard | ChangeNum$ Y | Chooser$ You | Shuffle$ True | StackDescription$ None | RememberChanged$ True | SubAbility$ DBDraw -SVar:DBDraw:DB$ Draw | NumCards$ Z | Defined$ Targeted | SubAbility$ DBCleanup | StackDescription$ {p:Targeted} draw a card for each card exiled from their hand this way -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True +SVar:DBDraw:DB$ Draw | NumCards$ Z | Defined$ Targeted | SubAbility$ DBCleanup | StackDescription$ {p:Targeted} shuffles, then draws a card for each card exiled from their hand this way. +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True | ClearNamedCard$ True SVar:X:Remembered$Amount SVar:Y:SVar$X/NMinus.4 SVar:Z:Imprinted$Amount diff --git a/forge-gui/res/cardsfolder/t/thought_hemorrhage.txt b/forge-gui/res/cardsfolder/t/thought_hemorrhage.txt index 4e5cbb8d288..aeaf1f045fa 100644 --- a/forge-gui/res/cardsfolder/t/thought_hemorrhage.txt +++ b/forge-gui/res/cardsfolder/t/thought_hemorrhage.txt @@ -1,7 +1,7 @@ Name:Thought Hemorrhage ManaCost:2 B R Types:Sorcery -A:SP$ NameCard | Cost$ 2 B R | ValidCards$ Card.nonLand | SubAbility$ DBReveal | ValidDesc$ nonland | SpellDescription$ Choose a nonland card name. Target player reveals their hand. Thought Hemorrhage deals 3 damage to that player for each card with the chosen name revealed this way. Search that player's graveyard, hand, and library for all cards with that name and exile them. Then that player shuffles their library. +A:SP$ NameCard | Cost$ 2 B R | ValidCards$ Card.nonLand | SubAbility$ DBReveal | ValidDesc$ nonland | SpellDescription$ Choose a nonland card name. Target player reveals their hand. CARDNAME deals 3 damage to that player for each card with the chosen name revealed this way. Search that player's graveyard, hand, and library for all cards with that name and exile them. Then that player shuffles their library. SVar:DBReveal:DB$ RevealHand | RememberRevealed$ True | ValidTgts$ Player | TgtPrompt$ Select target player | SubAbility$ DBDamage SVar:DBDamage:DB$ DealDamage | Defined$ Targeted | NumDmg$ X | SubAbility$ ExileYard SVar:ExileYard:DB$ ChangeZoneAll | Origin$ Graveyard | Destination$ Exile | Defined$ Targeted | ChangeType$ Card.NamedCard | SubAbility$ ExileHand | StackDescription$ None @@ -9,7 +9,7 @@ SVar:ExileHand:DB$ ChangeZone | Origin$ Hand | Destination$ Exile | DefinedPlaye SVar:ExileLib:DB$ ChangeZone | Origin$ Library | Destination$ Exile | DefinedPlayer$ Targeted | ChangeType$ Card.NamedCard | ChangeNum$ NumInLib | Chooser$ You | Search$ True | Shuffle$ True | SubAbility$ DBCleanup | StackDescription$ None SVar:NumInLib:TargetedPlayer$CardsInLibrary SVar:NumInHand:TargetedPlayer$CardsInHand -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearNamedCard$ True SVar:X:Remembered$Valid Card.NamedCard/Times.3 AI:RemoveDeck:All Oracle:Choose a nonland card name. Target player reveals their hand. Thought Hemorrhage deals 3 damage to that player for each card with the chosen name revealed this way. Search that player's graveyard, hand, and library for all cards with that name and exile them. Then that player shuffles. diff --git a/forge-gui/res/cardsfolder/upcoming/day_of_the_moon.txt b/forge-gui/res/cardsfolder/upcoming/day_of_the_moon.txt new file mode 100644 index 00000000000..c2b47d4318f --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/day_of_the_moon.txt @@ -0,0 +1,7 @@ +Name:Day of the Moon +ManaCost:2 R +Types:Enchantment Saga +K:Saga:3:DBChoose,DBChoose,DBChoose +SVar:DBChoose:DB$ NameCard | ValidCards$ Creature | ValidDesc$ creature | SubAbility$ DBGoad | SpellDescription$ Choose a creature card name, then goad all creatures with a name chosen for CARDNAME. (Until your next turn, they attack each combat if able and attack a player other than you if able.) +SVar:DBGoad:DB$ Goad | Defined$ Valid Creature.NamedCard +Oracle:(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)\nI, II, III — Choose a creature card name, then goad all creatures with a name chosen for Day of the Moon. (Until your next turn, they attack each combat if able and attack a player other than you if able.) diff --git a/forge-gui/res/cardsfolder/v/vexing_arcanix.txt b/forge-gui/res/cardsfolder/v/vexing_arcanix.txt index a7aa6890bf7..0702364f78a 100644 --- a/forge-gui/res/cardsfolder/v/vexing_arcanix.txt +++ b/forge-gui/res/cardsfolder/v/vexing_arcanix.txt @@ -4,6 +4,6 @@ Types:Artifact A:AB$ NameCard | Cost$ 3 T | ValidTgts$ Player | TgtPrompt$ Select target player | SubAbility$ DBDig | AILogic$ MostProminentInComputerDeckNonToken | SpellDescription$ Target player chooses a card name, then reveals the top card of their library. If that card has the chosen name, the player puts it into their hand. Otherwise, the player puts it into their graveyard and CARDNAME deals 2 damage to them. SVar:DBDig:DB$ Dig | DigNum$ 1 | Defined$ Targeted | ChangeNum$ All | ChangeValid$ Card.NamedCard | DestinationZone2$ Graveyard | Reveal$ True | RememberChanged$ True | SubAbility$ DBDamage SVar:DBDamage:DB$ DealDamage | NumDmg$ 2 | Defined$ Targeted | ConditionDefined$ Remembered | ConditionPresent$ Card.NamedCard | ConditionCompare$ EQ0 | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearNamedCard$ True AI:RemoveDeck:All Oracle:{3}, {T}: Target player chooses a card name, then reveals the top card of their library. If that card has the chosen name, that player puts it into their hand. Otherwise, they put it into their graveyard and Vexing Arcanix deals 2 damage to them. diff --git a/forge-gui/res/cardsfolder/w/wood_sage.txt b/forge-gui/res/cardsfolder/w/wood_sage.txt index 71de3aeb1da..80ee4193c85 100644 --- a/forge-gui/res/cardsfolder/w/wood_sage.txt +++ b/forge-gui/res/cardsfolder/w/wood_sage.txt @@ -3,6 +3,7 @@ ManaCost:G U Types:Creature Human Druid PT:1/1 A:AB$ NameCard | Cost$ T | Defined$ You | ValidCards$ Card.Creature | ValidDesc$ creature | SubAbility$ DBDig | SpellDescription$ Choose a creature card name. Reveal the top four cards of your library and put all of them with that name into your hand. Put the rest into your graveyard. -SVar:DBDig:DB$ Dig | DigNum$ 4 | Reveal$ True | ChangeNum$ All | ChangeValid$ Card.NamedCard | DestinationZone2$ Graveyard +SVar:DBDig:DB$ Dig | DigNum$ 4 | Reveal$ True | ChangeNum$ All | ChangeValid$ Card.NamedCard | DestinationZone2$ Graveyard | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearNamedCard$ True AI:RemoveDeck:All Oracle:{T}: Choose a creature card name. Reveal the top four cards of your library and put all of them with that name into your hand. Put the rest into your graveyard. diff --git a/forge-gui/src/main/java/forge/gui/card/CardDetailUtil.java b/forge-gui/src/main/java/forge/gui/card/CardDetailUtil.java index 35638a2c13e..d59afb7868c 100644 --- a/forge-gui/src/main/java/forge/gui/card/CardDetailUtil.java +++ b/forge-gui/src/main/java/forge/gui/card/CardDetailUtil.java @@ -501,18 +501,15 @@ public class CardDetailUtil { } // named card - if (!card.getNamedCard().isEmpty()) { + if (card.getNamedCard() != null && !card.getNamedCard().isEmpty()) { if (area.length() != 0) { area.append("\n"); } - area.append("(named card: "); + area.append("(named card").append(card.getNamedCard().size() > 1 ? "s" : "").append(": "); if (card.isFaceDown() && state.getState() == CardStateName.FaceDown) { area.append("Hidden"); } else { - area.append(card.getNamedCard()); - if (!card.getNamedCard2().isEmpty()) { - area.append(", ").append(card.getNamedCard2()); - } + area.append(StringUtils.join(card.getNamedCard(), ", ")); } area.append(")"); }