diff --git a/forge-ai/src/main/java/forge/ai/SpellApiToAi.java b/forge-ai/src/main/java/forge/ai/SpellApiToAi.java index abb619a974c..6c56786b187 100644 --- a/forge-ai/src/main/java/forge/ai/SpellApiToAi.java +++ b/forge-ai/src/main/java/forge/ai/SpellApiToAi.java @@ -115,6 +115,7 @@ public enum SpellApiToAi { .put(ApiType.Mana, ManaAi.class) .put(ApiType.ManaReflected, CannotPlayAi.class) .put(ApiType.Manifest, ManifestAi.class) + .put(ApiType.ManifestDread, ManifestAi.class) .put(ApiType.Meld, MeldAi.class) .put(ApiType.Mill, MillAi.class) .put(ApiType.MoveCounter, CountersMoveAi.class) diff --git a/forge-game/src/main/java/forge/game/ability/ApiType.java b/forge-game/src/main/java/forge/game/ability/ApiType.java index 11bc98b5d96..0ba67421827 100644 --- a/forge-game/src/main/java/forge/game/ability/ApiType.java +++ b/forge-game/src/main/java/forge/game/ability/ApiType.java @@ -116,6 +116,7 @@ public enum ApiType { Mana (ManaEffect.class), ManaReflected (ManaReflectedEffect.class), Manifest (ManifestEffect.class), + ManifestDread (ManifestDreadEffect.class), Meld (MeldEffect.class), Mill (MillEffect.class), MoveCounter (CountersMoveEffect.class), diff --git a/forge-game/src/main/java/forge/game/ability/effects/ManifestBaseEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ManifestBaseEffect.java index 088ac6babb8..ec9eb7bbd5c 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ManifestBaseEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ManifestBaseEffect.java @@ -22,79 +22,69 @@ public abstract class ManifestBaseEffect extends SpellAbilityEffect { @Override public void resolve(SpellAbility sa) { final Card source = sa.getHostCard(); - final Player activator = sa.getActivatingPlayer(); - final Game game = source.getGame(); // Usually a number leaving possibility for X, Sacrifice X land: Manifest X creatures. final int amount = sa.hasParam("Amount") ? AbilityUtils.calculateAmount(source, sa.getParam("Amount"), sa) : 1; - final int times = sa.hasParam("Times") ? AbilityUtils.calculateAmount(source, sa.getParam("Times"), sa) : 1; - for (int i = 0; i < times; i++) { - for (final Player p : getTargetPlayers(sa, "DefinedPlayer")) { - CardCollection tgtCards; - Card toGrave = null; - boolean fromLibrary = false; - if (sa.hasParam("Choices") || sa.hasParam("ChoiceZone")) { - ZoneType choiceZone = ZoneType.Hand; - if (sa.hasParam("ChoiceZone")) { - choiceZone = ZoneType.smartValueOf(sa.getParam("ChoiceZone")); - fromLibrary = choiceZone.equals(ZoneType.Library); - } - CardCollectionView choices = p.getCardsIn(choiceZone); - if (sa.hasParam("Choices")) { - choices = CardLists.getValidCards(choices, sa.getParam("Choices"), activator, source, sa); - } - if (choices.isEmpty()) { - continue; - } + for (final Player p : getTargetPlayers(sa, "DefinedPlayer")) { + manifestLoop(sa, p, amount); + } + } - String title = sa.hasParam("ChoiceTitle") ? sa.getParam("ChoiceTitle") : getDefaultMessage() + " "; + protected void manifestLoop(SpellAbility sa, Player p, final int amount) { - tgtCards = new CardCollection(p.getController().chooseCardsForEffect(choices, sa, title, amount, amount, false, null)); - } else if (sa.hasParam("Dread")) { - tgtCards = p.getTopXCardsFromLibrary(2); - if (!tgtCards.isEmpty()) { - Card manifest = p.getController().chooseSingleEntityForEffect(tgtCards, sa, getDefaultMessage(), null); - tgtCards.remove(manifest); - toGrave = tgtCards.isEmpty() ? null : tgtCards.getFirst(); - tgtCards = new CardCollection(manifest); - } - fromLibrary = true; - } else if ("TopOfLibrary".equals(sa.getParamOrDefault("Defined", "TopOfLibrary"))) { - tgtCards = p.getTopXCardsFromLibrary(amount); - fromLibrary = true; - } else { - tgtCards = getTargetCards(sa); - if (Iterables.all(tgtCards, CardPredicates.inZone(ZoneType.Library))) { - fromLibrary = true; - } - } + final Card source = sa.getHostCard(); + final Player activator = sa.getActivatingPlayer(); + final Game game = source.getGame(); - if (sa.hasParam("Shuffle")) { - CardLists.shuffle(tgtCards); - } - - if (fromLibrary) { - for (Card c : tgtCards) { - // CR 701.34d If an effect instructs a player to manifest multiple cards from their library, those cards are manifested one at a time. - Map moveParams = AbilityKey.newMap(); - CardZoneTable triggerList = AbilityKey.addCardZoneTableParams(moveParams, sa); - internalEffect(c, p, sa, moveParams); - if (sa.hasParam("Dread") && toGrave != null) { - game.getAction().moveToGraveyard(toGrave, sa, moveParams); - toGrave = null; - } - triggerList.triggerChangesZoneAll(game, sa); - } - } else { - // manifest from other zones should be done at the same time - Map moveParams = AbilityKey.newMap(); - CardZoneTable triggerList = AbilityKey.addCardZoneTableParams(moveParams, sa); - for (Card c : tgtCards) { - internalEffect(c, p, sa, moveParams); - } - triggerList.triggerChangesZoneAll(game, sa); - } + CardCollection tgtCards; + boolean fromLibrary = false; + if (sa.hasParam("Choices") || sa.hasParam("ChoiceZone")) { + ZoneType choiceZone = ZoneType.Hand; + if (sa.hasParam("ChoiceZone")) { + choiceZone = ZoneType.smartValueOf(sa.getParam("ChoiceZone")); + fromLibrary = choiceZone.equals(ZoneType.Library); } + CardCollectionView choices = p.getCardsIn(choiceZone); + if (sa.hasParam("Choices")) { + choices = CardLists.getValidCards(choices, sa.getParam("Choices"), activator, source, sa); + } + if (choices.isEmpty()) { + return; + } + + String title = sa.hasParam("ChoiceTitle") ? sa.getParam("ChoiceTitle") : getDefaultMessage() + " "; + + tgtCards = new CardCollection(p.getController().chooseCardsForEffect(choices, sa, title, amount, amount, false, null)); + } else if ("TopOfLibrary".equals(sa.getParamOrDefault("Defined", "TopOfLibrary"))) { + tgtCards = p.getTopXCardsFromLibrary(amount); + fromLibrary = true; + } else { + tgtCards = getTargetCards(sa); + if (Iterables.all(tgtCards, CardPredicates.inZone(ZoneType.Library))) { + fromLibrary = true; + } + } + + if (sa.hasParam("Shuffle")) { + CardLists.shuffle(tgtCards); + } + + if (fromLibrary) { + for (Card c : tgtCards) { + // CR 701.34d If an effect instructs a player to manifest multiple cards from their library, those cards are manifested one at a time. + Map moveParams = AbilityKey.newMap(); + CardZoneTable triggerList = AbilityKey.addCardZoneTableParams(moveParams, sa); + internalEffect(c, p, sa, moveParams); + triggerList.triggerChangesZoneAll(game, sa); + } + } else { + // manifest from other zones should be done at the same time + Map moveParams = AbilityKey.newMap(); + CardZoneTable triggerList = AbilityKey.addCardZoneTableParams(moveParams, sa); + for (Card c : tgtCards) { + internalEffect(c, p, sa, moveParams); + } + triggerList.triggerChangesZoneAll(game, sa); } } diff --git a/forge-game/src/main/java/forge/game/ability/effects/ManifestDreadEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ManifestDreadEffect.java new file mode 100644 index 00000000000..9ab355188b4 --- /dev/null +++ b/forge-game/src/main/java/forge/game/ability/effects/ManifestDreadEffect.java @@ -0,0 +1,41 @@ +package forge.game.ability.effects; + +import java.util.Map; + +import forge.game.Game; +import forge.game.ability.AbilityKey; +import forge.game.card.Card; +import forge.game.card.CardCollection; +import forge.game.card.CardZoneTable; +import forge.game.player.Player; +import forge.game.spellability.SpellAbility; +import forge.game.trigger.TriggerType; + +public class ManifestDreadEffect extends ManifestEffect { + @Override + protected void manifestLoop(SpellAbility sa, Player p, final int amount) { + final Game game = p.getGame(); + for (int i = 0; i < amount; i++) { + CardCollection tgtCards = p.getTopXCardsFromLibrary(2); + Card manifest = null; + Card toGrave = null; + if (!tgtCards.isEmpty()) { + manifest = p.getController().chooseSingleEntityForEffect(tgtCards, sa, getDefaultMessage(), null); + tgtCards.remove(manifest); + toGrave = tgtCards.isEmpty() ? null : tgtCards.getFirst(); + + // CR 701.34d If an effect instructs a player to manifest multiple cards from their library, those cards are manifested one at a time. + Map moveParams = AbilityKey.newMap(); + CardZoneTable triggerList = AbilityKey.addCardZoneTableParams(moveParams, sa); + internalEffect(manifest, p, sa, moveParams); + if (toGrave != null) { + toGrave = game.getAction().moveToGraveyard(toGrave, sa, moveParams); + } + triggerList.triggerChangesZoneAll(game, sa); + } + Map runParams = AbilityKey.mapFromPlayer(p); + runParams.put(AbilityKey.Card, toGrave); + game.getTriggerHandler().runTrigger(TriggerType.ManifestDread, runParams, true); + } + } +} diff --git a/forge-game/src/main/java/forge/game/ability/effects/ManifestEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ManifestEffect.java index b24ef311bc8..209d97e8b73 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ManifestEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ManifestEffect.java @@ -9,10 +9,11 @@ import forge.game.spellability.SpellAbility; import forge.util.Localizer; public class ManifestEffect extends ManifestBaseEffect { - + @Override protected String getDefaultMessage() { return Localizer.getInstance().getMessage("lblChooseCardToManifest"); } + @Override protected Card internalEffect(Card c, Player p, SpellAbility sa, Map moveParams) { final Card source = sa.getHostCard(); Card rem = c.manifest(p, sa, moveParams); diff --git a/forge-game/src/main/java/forge/game/trigger/TriggerManifestDread.java b/forge-game/src/main/java/forge/game/trigger/TriggerManifestDread.java new file mode 100644 index 00000000000..da4598c254c --- /dev/null +++ b/forge-game/src/main/java/forge/game/trigger/TriggerManifestDread.java @@ -0,0 +1,35 @@ +package forge.game.trigger; + +import java.util.Map; + +import forge.game.ability.AbilityKey; +import forge.game.card.Card; +import forge.game.spellability.SpellAbility; + +public class TriggerManifestDread extends Trigger { + + public TriggerManifestDread(Map params, Card host, boolean intrinsic) { + super(params, host, intrinsic); + } + + @Override + public boolean performTest(Map runParams) { + if (!matchesValidParam("ValidPlayer", runParams.get(AbilityKey.Player))) { + return false; + } + return true; + } + + @Override + public void setTriggeringObjects(SpellAbility sa, Map runParams) { + sa.setTriggeringObject(AbilityKey.NewCard, runParams.get(AbilityKey.Card)); + + } + + @Override + public String getImportantStackObjects(SpellAbility sa) { + // TODO Auto-generated method stub + return ""; + } + +} diff --git a/forge-game/src/main/java/forge/game/trigger/TriggerType.java b/forge-game/src/main/java/forge/game/trigger/TriggerType.java index f97dd52fef8..2db1f4c9d77 100644 --- a/forge-game/src/main/java/forge/game/trigger/TriggerType.java +++ b/forge-game/src/main/java/forge/game/trigger/TriggerType.java @@ -97,6 +97,7 @@ public enum TriggerType { LosesGame(TriggerLosesGame.class), ManaAdded(TriggerManaAdded.class), ManaExpend(TriggerManaExpend.class), + ManifestDread(TriggerManifestDread.class), Mentored(TriggerMentored.class), Milled(TriggerMilled.class), MilledOnce(TriggerMilledOnce.class), diff --git a/forge-gui/res/cardsfolder/upcoming/abhorrent_oculus.txt b/forge-gui/res/cardsfolder/upcoming/abhorrent_oculus.txt index 474b57d5fb3..10f056fcba6 100644 --- a/forge-gui/res/cardsfolder/upcoming/abhorrent_oculus.txt +++ b/forge-gui/res/cardsfolder/upcoming/abhorrent_oculus.txt @@ -5,5 +5,5 @@ PT:5/5 A:SP$ PermanentCreature | Cost$ 2 U ExileFromGrave<6/Card> K:Flying T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Opponent | TriggerZones$ Battlefield | Execute$ TrigDread | TriggerDescription$ At the beginning of each opponent's upkeep, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature, and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True +SVar:TrigDread:DB$ ManifestDread Oracle:As an additional cost to cast this spell, exile six cards from your graveyard.\nFlying\nAt the beginning of each opponent's upkeep, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature, and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/upcoming/bashful_beastie.txt b/forge-gui/res/cardsfolder/upcoming/bashful_beastie.txt index 6eaa13fbcff..2d7a0dd59c0 100644 --- a/forge-gui/res/cardsfolder/upcoming/bashful_beastie.txt +++ b/forge-gui/res/cardsfolder/upcoming/bashful_beastie.txt @@ -3,5 +3,5 @@ ManaCost:4 G Types:Creature Beast PT:5/4 T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigDread | TriggerDescription$ When CARDNAME dies, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True | Defined$ You +SVar:TrigDread:DB$ ManifestDread Oracle:When Bashful Beastie dies, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) diff --git a/forge-gui/res/cardsfolder/upcoming/break_down_the_door.txt b/forge-gui/res/cardsfolder/upcoming/break_down_the_door.txt index 922b4cad445..cd264639e0f 100644 --- a/forge-gui/res/cardsfolder/upcoming/break_down_the_door.txt +++ b/forge-gui/res/cardsfolder/upcoming/break_down_the_door.txt @@ -4,5 +4,5 @@ Types:Instant A:SP$ Charm | CharmNum$ 1 | Choices$ DBExileArtifact,DBExileEnchantment,DBDread SVar:DBExileArtifact:DB$ ChangeZone | ValidTgts$ Artifact | TgtPrompt$ Select target artifact | Origin$ Battlefield | Destination$ Exile | SpellDescription$ Exile target artifact. SVar:DBExileEnchantment:DB$ ChangeZone | ValidTgts$ Enchantment | TgtPrompt$ Select target enchantment | Origin$ Battlefield | Destination$ Exile | SpellDescription$ Exile target enchantment. -SVar:DBDread:DB$ Manifest | Dread$ True | SpellDescription$ Manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) +SVar:DBDread:DB$ ManifestDread | SpellDescription$ Manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) Oracle:Choose one —\n• Exile target artifact.\n• Exile target enchantment.\n• Manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) diff --git a/forge-gui/res/cardsfolder/upcoming/conductive_machete.txt b/forge-gui/res/cardsfolder/upcoming/conductive_machete.txt index 936683553dd..71c8490cb96 100644 --- a/forge-gui/res/cardsfolder/upcoming/conductive_machete.txt +++ b/forge-gui/res/cardsfolder/upcoming/conductive_machete.txt @@ -2,7 +2,7 @@ Name:Conductive Machete ManaCost:4 Types:Artifact Equipment T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDread | TriggerDescription$ When CARDNAME enters, manifest dread, then attach CARDNAME to that creature. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True | Defined$ You | RememberManifested$ True | SubAbility$ DBAttach +SVar:TrigDread:DB$ ManifestDread | RememberManifested$ True | SubAbility$ DBAttach SVar:DBAttach:DB$ Attach | Defined$ Remembered | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 2 | AddToughness$ 1 | Description$ Equipped creature gets +2/+1. diff --git a/forge-gui/res/cardsfolder/upcoming/curator_beastie.txt b/forge-gui/res/cardsfolder/upcoming/curator_beastie.txt index 75f37ca7466..fc6e12ab5a4 100644 --- a/forge-gui/res/cardsfolder/upcoming/curator_beastie.txt +++ b/forge-gui/res/cardsfolder/upcoming/curator_beastie.txt @@ -7,6 +7,6 @@ K:ETBReplacement:Other:AddExtraCounter:Mandatory:Battlefield:Creature.Colorless+ SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 2 | SpellDescription$ Colorless creatures you control enter with two additional +1/+1 counters on them. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDread | TriggerDescription$ Whenever CARDNAME enters or attacks, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) T:Mode$ Attacks | ValidCard$ Card.Self | Secondary$ True | Execute$ TrigDread | TriggerDescription$ Whenever CARDNAME enters or attacks, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True +SVar:TrigDread:DB$ ManifestDread DeckHas:Ability$Counters Oracle:Reach\nColorless creatures you control enter with two additional +1/+1 counters on them.\nWhenever Curator Beastie enters or attacks, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) diff --git a/forge-gui/res/cardsfolder/upcoming/cursed_windbreaker.txt b/forge-gui/res/cardsfolder/upcoming/cursed_windbreaker.txt index f28e4926cb8..bc03d481b09 100644 --- a/forge-gui/res/cardsfolder/upcoming/cursed_windbreaker.txt +++ b/forge-gui/res/cardsfolder/upcoming/cursed_windbreaker.txt @@ -2,7 +2,7 @@ Name:Cursed Windbreaker ManaCost:2 U Types:Artifact Equipment T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDread | TriggerDescription$ When CARDNAME enters, manifest dread, then attach CARDNAME to that creature. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True | Defined$ You | RememberManifested$ True | SubAbility$ DBAttach +SVar:TrigDread:DB$ ManifestDread | RememberManifested$ True | SubAbility$ DBAttach SVar:DBAttach:DB$ Attach | Defined$ Remembered | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddKeyword$ Flying | Description$ Equipped creature has flying. diff --git a/forge-gui/res/cardsfolder/upcoming/defiant_survivor.txt b/forge-gui/res/cardsfolder/upcoming/defiant_survivor.txt index cbb94052ca4..4e7f6e90c25 100644 --- a/forge-gui/res/cardsfolder/upcoming/defiant_survivor.txt +++ b/forge-gui/res/cardsfolder/upcoming/defiant_survivor.txt @@ -3,5 +3,5 @@ Types:Creature Human Survivor ManaCost:2 G PT:3/2 T:Mode$ Phase | Phase$ Main2 | ValidPlayer$ You | PresentDefined$ Self | IsPresent$ Card.tapped | TriggerZones$ Battlefield | Execute$ TrigDread | TriggerDescription$ Survival — At the beginning of your second main phase, if CARDNAME is tapped, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True +SVar:TrigDread:DB$ ManifestDread Oracle:Survival — At the beginning of your second main phase, if Defiant Survivor is tapped, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/upcoming/disturbing_mirth.txt b/forge-gui/res/cardsfolder/upcoming/disturbing_mirth.txt index 6a0256da67a..3a90a43caf5 100644 --- a/forge-gui/res/cardsfolder/upcoming/disturbing_mirth.txt +++ b/forge-gui/res/cardsfolder/upcoming/disturbing_mirth.txt @@ -4,6 +4,6 @@ Types:Enchantment T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME enters, you may sacrifice another enchantment or creature. If you do, draw two cards. SVar:TrigDraw:AB$ Draw | Cost$ Sac<1/Enchantment.Other,Creature.Other/another enchantment or creature> | NumCards$ 2 T:Mode$ Sacrificed | ValidPlayer$ You | ValidCard$ Card.Self | Execute$ TrigDread | TriggerZones$ Battlefield | TriggerDescription$ When you sacrifice CARDNAME, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True | Defined$ You +SVar:TrigDread:DB$ ManifestDread DeckHas:Ability$Sacrifice Oracle:When Disturbing Mirth enters, you may sacrifice another enchantment or creature. If you do, draw two cards.\nWhen you sacrifice Disturbing Mirth, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) diff --git a/forge-gui/res/cardsfolder/upcoming/fear_of_impostors.txt b/forge-gui/res/cardsfolder/upcoming/fear_of_impostors.txt index 3a00c86c909..2c83a907c33 100644 --- a/forge-gui/res/cardsfolder/upcoming/fear_of_impostors.txt +++ b/forge-gui/res/cardsfolder/upcoming/fear_of_impostors.txt @@ -5,5 +5,5 @@ PT:3/2 K:Flash T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigCounter | TriggerDescription$ When CARDNAME enters, counter target spell. Its controller manifests dread. (That player looks at the top two cards of their library, then puts one onto the battlefield face down as a 2/2 creature and the other into their graveyard. If it's a creature card, it can be turned face up any time for its mana cost.) SVar:TrigCounter:DB$ Counter | TargetType$ Spell | ValidTgts$ Card | SubAbility$ DBDread | TgtPrompt$ Select target spell -SVar:DBDread:DB$ Manifest | Dread$ True | Defined$ TargetedController +SVar:DBDread:DB$ ManifestDread | DefinedPlayer$ TargetedController Oracle:Flash\nWhen Fear of Impostors enters, counter target spell. Its controller manifests dread. (That player looks at the top two cards of their library, then puts one onto the battlefield face down as a 2/2 creature and the other into their graveyard. If it's a creature card, it can be turned face up any time for its mana cost.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/upcoming/glitch_interpreter.txt b/forge-gui/res/cardsfolder/upcoming/glitch_interpreter.txt index 3c37f1b1a4b..a6c48738b0d 100644 --- a/forge-gui/res/cardsfolder/upcoming/glitch_interpreter.txt +++ b/forge-gui/res/cardsfolder/upcoming/glitch_interpreter.txt @@ -4,7 +4,7 @@ Types:Creature Human Wizard PT:2/3 T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | IsPresent$ Permanent.faceDown+YouCtrl | PresentCompare$ EQ0 | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME enters, if you control no face-down permanents, return CARDNAME to its owner's hand and manifest dread. SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Battlefield | Destination$ Hand | SubAbility$ DBDread -SVar:DBDread:DB$ Manifest | Dread$ True +SVar:DBDread:DB$ ManifestDread T:Mode$ DamageDoneOnce | CombatDamage$ True | ValidSource$ Creature.Colorless+YouCtrl | TriggerZones$ Battlefield | ValidTarget$ Player | Execute$ TrigDraw | TriggerDescription$ Whenever one or more colorless creatures you control deal combat damage to a player, draw a card. SVar:TrigDraw:DB$ Draw SVar:PlayMain1:TRUE diff --git a/forge-gui/res/cardsfolder/upcoming/growing_dread.txt b/forge-gui/res/cardsfolder/upcoming/growing_dread.txt index 70491a847a0..316bab998d3 100644 --- a/forge-gui/res/cardsfolder/upcoming/growing_dread.txt +++ b/forge-gui/res/cardsfolder/upcoming/growing_dread.txt @@ -3,7 +3,7 @@ ManaCost:G U Types:Enchantment K:Flash T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDread | TriggerDescription$ When CARDNAME enters, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True | Defined$ You +SVar:TrigDread:DB$ ManifestDread T:Mode$ TurnFaceUp | ValidCard$ Permanent | ValidCause$ SpellAbility.YouCtrl | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever you turn a permanent face up, put a +1/+1 counter on it. SVar:TrigPutCounter:DB$ PutCounter | Defined$ TriggeredCardLKICopy | CounterType$ P1P1 | CounterNum$ 1 Oracle:Flash\nWhen Growing Dread enters, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.)\nWhenever you turn a permanent face up, put a +1/+1 counter on it. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/upcoming/hauntwoods_shrieker.txt b/forge-gui/res/cardsfolder/upcoming/hauntwoods_shrieker.txt index 1cd5fb8ed13..f4d4fbcc1c1 100644 --- a/forge-gui/res/cardsfolder/upcoming/hauntwoods_shrieker.txt +++ b/forge-gui/res/cardsfolder/upcoming/hauntwoods_shrieker.txt @@ -3,6 +3,6 @@ ManaCost:1 G G Types:Creature Beast Mutant PT:3/3 T:Mode$ Attacks | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigDread | TriggerDescription$ Whenever CARDNAME attacks, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True +SVar:TrigDread:DB$ ManifestDread A:AB$ SetState | ValidTgts$ Card.faceDown | Cost$ 1 G | Mode$ TurnFaceUp | Optional$ True | RevealFirst$ True | ValidNewFace$ Creature | StackDescription$ SpellDescription | SpellDescription$ Reveal target face-down permanent. If it's a creature card, you may turn it face up. Oracle:Whenever Hauntwoods Shrieker attacks, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.)\n{1}{G}: Reveal target face-down permanent. If it's a creature card, you may turn it face up. diff --git a/forge-gui/res/cardsfolder/upcoming/innocuous_rat.txt b/forge-gui/res/cardsfolder/upcoming/innocuous_rat.txt index 79b7e1665e9..32c378de3fe 100644 --- a/forge-gui/res/cardsfolder/upcoming/innocuous_rat.txt +++ b/forge-gui/res/cardsfolder/upcoming/innocuous_rat.txt @@ -3,5 +3,5 @@ ManaCost:1 B Types:Creature Rat PT:1/1 T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigDread | TriggerDescription$ When CARDNAME dies, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True +SVar:TrigDread:DB$ ManifestDread Oracle:When Innocuous Rat dies, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/upcoming/killers_mask.txt b/forge-gui/res/cardsfolder/upcoming/killers_mask.txt index fa707d3b1b9..29af1ed44cb 100644 --- a/forge-gui/res/cardsfolder/upcoming/killers_mask.txt +++ b/forge-gui/res/cardsfolder/upcoming/killers_mask.txt @@ -2,7 +2,7 @@ Name:Killer's Mask ManaCost:2 B Types:Artifact Equipment T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDread | TriggerDescription$ When CARDNAME enters, manifest dread, then attach CARDNAME to that creature. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True | Defined$ You | RememberManifested$ True | SubAbility$ DBAttach +SVar:TrigDread:DB$ ManifestDread | RememberManifested$ True | SubAbility$ DBAttach SVar:DBAttach:DB$ Attach | Defined$ Remembered | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddKeyword$ Menace | Description$ Equipped creature has menace. diff --git a/forge-gui/res/cardsfolder/upcoming/stay_hidden_stay_silent.txt b/forge-gui/res/cardsfolder/upcoming/stay_hidden_stay_silent.txt index 7ba8bc712a4..6119653662a 100644 --- a/forge-gui/res/cardsfolder/upcoming/stay_hidden_stay_silent.txt +++ b/forge-gui/res/cardsfolder/upcoming/stay_hidden_stay_silent.txt @@ -6,5 +6,5 @@ T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefi SVar:TrigTap:DB$ Tap | Defined$ Enchanted S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddHiddenKeyword$ CARDNAME doesn't untap during your untap step. | Description$ Enchanted creature doesn't untap during its controller's untap step. A:AB$ ChangeZone | Cost$ 4 U U | Origin$ Battlefield | Destination$ Library | Shuffle$ True | Defined$ Enchanted | SorcerySpeed$ True | SubAbility$ DBDread | SpellDescription$ Shuffle enchanted creature into its owner's library, then manifest dread. Activate only as a sorcery. -SVar:DBDread:DB$ Manifest | Dread$ True | Defined$ You +SVar:DBDread:DB$ ManifestDread Oracle:Enchant creature\nWhen Stay Hidden, Stay Silent enters, tap enchanted creature.\nEnchanted creature doesn't untap during its controller's untap step.\n{4}{U}{U}: Shuffle enchanted creature into its owner's library, then manifest dread. Activate only as a sorcery. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/upcoming/they_came_from_the_pipes.txt b/forge-gui/res/cardsfolder/upcoming/they_came_from_the_pipes.txt index 0fc59a0c3bb..0ae12d6313b 100644 --- a/forge-gui/res/cardsfolder/upcoming/they_came_from_the_pipes.txt +++ b/forge-gui/res/cardsfolder/upcoming/they_came_from_the_pipes.txt @@ -2,7 +2,7 @@ Name:They Came from the Pipes ManaCost:4 U Types:Enchantment T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDread | TriggerDescription$ When CARDNAME enters, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True | Times$ 2 +SVar:TrigDread:DB$ ManifestDread | Amount$ 2 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.faceDown+YouCtrl | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ Whenever a face-down creature you control enters, draw a card. SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ 1 Oracle:When They Came from the Pipes enters, manifest dread twice. (To manifest dread, look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.)\nWhenever a face-down creature you control enters, draw a card. diff --git a/forge-gui/res/cardsfolder/upcoming/threats_around_every_corner.txt b/forge-gui/res/cardsfolder/upcoming/threats_around_every_corner.txt index 0a0ee865f9c..dafa83df17e 100644 --- a/forge-gui/res/cardsfolder/upcoming/threats_around_every_corner.txt +++ b/forge-gui/res/cardsfolder/upcoming/threats_around_every_corner.txt @@ -2,7 +2,7 @@ Name:Threats Around Every Corner ManaCost:3 G Types:Enchantment T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDread | TriggerDescription$ When CARDNAME enters, manifest dread. -SVar:TrigDread:DB$ Manifest | Dread$ True | Defined$ You +SVar:TrigDread:DB$ ManifestDread T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Permanent.faceDown+YouCtrl | Execute$ TrigChange | TriggerZones$ Battlefield | TriggerDescription$ Whenever a face-down permanent you control enters, search your library for a basic land card, put it onto the battlefield tapped, then shuffle. SVar:TrigChange:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | Tapped$ True | ChangeType$ Land.Basic | ChangeNum$ 1 Oracle:When Threats Around Every Corner enters, manifest dread.\nWhenever a face-down permanent you control enters, search your library for a basic land card, put it onto the battlefield tapped, then shuffle. diff --git a/forge-gui/res/cardsfolder/upcoming/turn_inside_out.txt b/forge-gui/res/cardsfolder/upcoming/turn_inside_out.txt index 55470ca38d6..f008508581d 100644 --- a/forge-gui/res/cardsfolder/upcoming/turn_inside_out.txt +++ b/forge-gui/res/cardsfolder/upcoming/turn_inside_out.txt @@ -3,5 +3,5 @@ ManaCost:R Types:Instant A:SP$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +3 | SubAbility$ DBDelayedTrigger | SpellDescription$ Target creature gets +3/+0 until end of turn. SVar:DBDelayedTrigger:DB$ DelayedTrigger | Mode$ ChangesZone | RememberObjects$ Targeted | ValidCard$ Card.IsTriggerRemembered | Origin$ Battlefield | Destination$ Graveyard | ThisTurn$ True | Execute$ DBDread | SpellDescription$ When it dies this turn, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:DBDread:DB$ Manifest | Dread$ True | Defined$ You +SVar:DBDread:DB$ ManifestDread Oracle:Target creature gets +3/+0 until end of turn. When it dies this turn, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) diff --git a/forge-gui/res/cardsfolder/upcoming/twist_reality.txt b/forge-gui/res/cardsfolder/upcoming/twist_reality.txt index 30d0d766faa..c8d2a9539c3 100644 --- a/forge-gui/res/cardsfolder/upcoming/twist_reality.txt +++ b/forge-gui/res/cardsfolder/upcoming/twist_reality.txt @@ -3,5 +3,5 @@ ManaCost:1 U U Types:Instant A:SP$ Charm | Choices$ DBCounter,DBDread SVar:DBCounter:DB$ Counter | TargetType$ Spell | ValidTgts$ Card | TgtPrompt$ Counter target spell | SpellDescription$ Counter target spell. -SVar:DBDread:DB$ Manifest | Dread$ True | Defined$ You | SpellDescription$ Manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) +SVar:DBDread:DB$ ManifestDread | SpellDescription$ Manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) Oracle:Choose one —\n• Counter target spell.\n• Manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) diff --git a/forge-gui/res/cardsfolder/upcoming/under_the_skin.txt b/forge-gui/res/cardsfolder/upcoming/under_the_skin.txt index bb7c50a05b7..f8f5e402615 100644 --- a/forge-gui/res/cardsfolder/upcoming/under_the_skin.txt +++ b/forge-gui/res/cardsfolder/upcoming/under_the_skin.txt @@ -1,6 +1,6 @@ Name:Under the Skin ManaCost:2 G Types:Sorcery -A:SP$ Manifest | Dread$ True | SubAbility$ DBChangeZone | SpellDescription$ Manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) You may return a permanent card from your graveyard to your hand. +A:SP$ ManifestDread | SubAbility$ DBChangeZone | SpellDescription$ Manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) You may return a permanent card from your graveyard to your hand. SVar:DBChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | ChangeType$ Permanent.YouOwn | Hidden$ True | Optional$ True Oracle:Manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.)\nYou may return a permanent card from your graveyard to your hand. diff --git a/forge-gui/res/cardsfolder/upcoming/unsettling_twins.txt b/forge-gui/res/cardsfolder/upcoming/unsettling_twins.txt index 83c09545234..97e0167c946 100644 --- a/forge-gui/res/cardsfolder/upcoming/unsettling_twins.txt +++ b/forge-gui/res/cardsfolder/upcoming/unsettling_twins.txt @@ -3,5 +3,5 @@ ManaCost:3 W Types:Creature Human PT:2/2 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDread | TriggerDescription$ When CARDNAME enters, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True | Defined$ You +SVar:TrigDread:DB$ ManifestDread Oracle:When Unsettling Twins enters, manifest dread. (Look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/upcoming/unwanted_remake.txt b/forge-gui/res/cardsfolder/upcoming/unwanted_remake.txt index 7f56c5681bc..98d6b46360f 100644 --- a/forge-gui/res/cardsfolder/upcoming/unwanted_remake.txt +++ b/forge-gui/res/cardsfolder/upcoming/unwanted_remake.txt @@ -2,5 +2,5 @@ Name:Unwanted Remake ManaCost:W Types:Instant A:SP$ Destroy | ValidTgts$ Creature | SubAbility$ DBDread | SpellDescription$ Destroy target creature. -SVar:DBDread:DB$ Manifest | Dread$ True | DefinedPlayer$ TargetedController | SpellDescription$ Its controller manifests dread. (That player looks at the top two cards of their library, then puts one onto the battlefield face down as a 2/2 creature and the other into their graveyard. If it's a creature card, it can be turned face up any time for its mana cost.) +SVar:DBDread:DB$ ManifestDread | DefinedPlayer$ TargetedController | SpellDescription$ Its controller manifests dread. (That player looks at the top two cards of their library, then puts one onto the battlefield face down as a 2/2 creature and the other into their graveyard. If it's a creature card, it can be turned face up any time for its mana cost.) Oracle:Destroy target creature. Its controller manifests dread. (That player looks at the top two cards of their library, then puts one onto the battlefield face down as a 2/2 creature and the other into their graveyard. If it's a creature card, it can be turned face up any time for its mana cost.) diff --git a/forge-gui/res/cardsfolder/upcoming/valgavoths_onslaught.txt b/forge-gui/res/cardsfolder/upcoming/valgavoths_onslaught.txt index c7fa1502c0a..5a0bfa33281 100644 --- a/forge-gui/res/cardsfolder/upcoming/valgavoths_onslaught.txt +++ b/forge-gui/res/cardsfolder/upcoming/valgavoths_onslaught.txt @@ -1,7 +1,7 @@ Name:Valgavoth's Onslaught ManaCost:X X G Types:Instant -A:SP$ Manifest | Dread$ True | Times$ X | RememberManifested$ True | SubAbility$ DBPutCounterAll +A:SP$ ManifestDread | Amount$ X | RememberManifested$ True | SubAbility$ DBPutCounterAll SVar:DBPutCounterAll:DB$ PutCounterAll | ValidCards$ Card.IsRemembered | CounterType$ P1P1 | CounterNum$ X | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:X:Count$xPaid diff --git a/forge-gui/res/cardsfolder/upcoming/zimone_mystery_unraveler.txt b/forge-gui/res/cardsfolder/upcoming/zimone_mystery_unraveler.txt index aac64b09068..76b004c004e 100644 --- a/forge-gui/res/cardsfolder/upcoming/zimone_mystery_unraveler.txt +++ b/forge-gui/res/cardsfolder/upcoming/zimone_mystery_unraveler.txt @@ -3,7 +3,7 @@ ManaCost:2 G U Types:Legendary Creature Human Wizard PT:3/3 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigDread | TriggerDescription$ Landfall — Whenever a land you control enters, manifest dread if this is the first time this ability has resolved this turn. Otherwise, you may turn a permanent you control face up. (To manifest dread, look at the top two cards of your library. Put one onto the battlefield face down as a 2/2 creature and the other into your graveyard. Turn it face up any time for its mana cost if it's a creature card.) -SVar:TrigDread:DB$ Manifest | Dread$ True | Defined$ You | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ1 | SubAbility$ DBTurnFaceUp +SVar:TrigDread:DB$ ManifestDread | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ1 | SubAbility$ DBTurnFaceUp SVar:DBTurnFaceUp:DB$ SetState | Optional$ True | Choices$ Permanent.faceDown+YouCtrl | ChoiceTitle$ Select a face-down permanent you control | ConditionCheckSVar$ X | ConditionSVarCompare$ GT1 | Mode$ TurnFaceUp SVar:X:Count$ResolvedThisTurn SVar:BuffedBy:Land