From dfec2dc3082cdc967b0cc4c1a318e39d3e720202 Mon Sep 17 00:00:00 2001
From: Adam Pantel <>
Date: Thu, 1 Apr 2021 15:36:15 -0400
Subject: [PATCH] Add SpellCastOrCopy trigger
---
.../game/trigger/TriggerSpellCastOrCopy.java | 105 ++++++++++++++++++
.../java/forge/game/trigger/TriggerType.java | 1 +
.../main/java/forge/game/zone/MagicStack.java | 4 +
.../res/cardsfolder/r/ral_storm_conduit.txt | 3 +-
.../upcoming/archmage_emeritus.txt | 3 +-
.../upcoming/clever_lumimancer.txt | 3 +-
.../upcoming/dragonsguard_elite.txt | 3 +-
.../cardsfolder/upcoming/eager_first_year.txt | 3 +-
..._oriq_overlord_awaken_the_blood_avatar.txt | 3 +-
.../upcoming/lorehold_apprentice.txt | 3 +-
.../upcoming/lorehold_pledgemage.txt | 3 +-
.../upcoming/prismari_apprentice.txt | 3 +-
.../cardsfolder/upcoming/professor_onyx.txt | 3 +-
.../upcoming/quandrix_apprentice.txt | 3 +-
.../upcoming/silverquill_apprentice.txt | 3 +-
.../upcoming/storm_kiln_artist.txt | 3 +-
.../upcoming/witherbloom_apprentice.txt | 3 +-
17 files changed, 124 insertions(+), 28 deletions(-)
create mode 100644 forge-game/src/main/java/forge/game/trigger/TriggerSpellCastOrCopy.java
diff --git a/forge-game/src/main/java/forge/game/trigger/TriggerSpellCastOrCopy.java b/forge-game/src/main/java/forge/game/trigger/TriggerSpellCastOrCopy.java
new file mode 100644
index 00000000000..aefad833d5a
--- /dev/null
+++ b/forge-game/src/main/java/forge/game/trigger/TriggerSpellCastOrCopy.java
@@ -0,0 +1,105 @@
+/*
+ * Forge: Play Magic: the Gathering.
+ * Copyright (C) 2011 Forge Team
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package forge.game.trigger;
+
+import forge.game.Game;
+import forge.game.ability.AbilityKey;
+import forge.game.card.Card;
+import forge.game.spellability.SpellAbility;
+import forge.game.spellability.SpellAbilityStackInstance;
+import forge.util.Localizer;
+
+import java.util.Map;
+
+/**
+ *
+ * Trigger_SpellAbilityCopy class.
+ *
+ *
+ * @author Forge
+ * @version $Id$
+ */
+public class TriggerSpellCastOrCopy extends Trigger {
+
+ /**
+ *
+ * Constructor for Trigger_SpellCastOrCopy.
+ *
+ *
+ * @param params
+ * a {@link java.util.HashMap} object.
+ * @param host
+ * a {@link Card} object.
+ * @param intrinsic
+ * the intrinsic
+ */
+ public TriggerSpellCastOrCopy(final Map params, final Card host, final boolean intrinsic) {
+ super(params, host, intrinsic);
+ }
+
+ /** {@inheritDoc}
+ * @param runParams*/
+ @Override
+ public final boolean performTest(final Map runParams) {
+ final SpellAbility spellAbility = (SpellAbility) runParams.get(AbilityKey.CastSA);
+ if (spellAbility == null) {
+ System.out.println("TriggerSpellCastOrCopy performTest encountered spellAbility == null. runParams2 = " + runParams);
+ return false;
+ }
+ final Card cast = spellAbility.getHostCard();
+ final Game game = cast.getGame();
+ final SpellAbilityStackInstance si = game.getStack().getInstanceFromSpellAbility(spellAbility);
+
+ if (!matchesValidParam("ValidCard", cast)) {
+ return false;
+ }
+ if (!matchesValidParam("ValidSA", spellAbility)) {
+ return false;
+ }
+ if (!matchesValidParam("ValidPlayer", runParams.get(AbilityKey.Player))) {
+ return false;
+ }
+
+ if (hasParam("ValidActivatingPlayer")) {
+ if (si == null || !matchesValid(si.getSpellAbility(true).getActivatingPlayer(), getParam("ValidActivatingPlayer").split(","))) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+
+ /** {@inheritDoc} */
+ @Override
+ public final void setTriggeringObjects(final SpellAbility sa, Map runParams) {
+ final SpellAbility castSA = (SpellAbility) runParams.get(AbilityKey.CastSA);
+ final SpellAbilityStackInstance si = sa.getHostCard().getGame().getStack().getInstanceFromSpellAbility(castSA);
+ sa.setTriggeringObject(AbilityKey.Card, castSA.getHostCard());
+ sa.setTriggeringObject(AbilityKey.SpellAbility, castSA);
+ sa.setTriggeringObject(AbilityKey.StackInstance, si);
+ }
+
+ @Override
+ public String getImportantStackObjects(SpellAbility sa) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(Localizer.getInstance().getMessage("lblCard")).append(": ").append(sa.getTriggeringObject(AbilityKey.Card)).append(", ");
+ sb.append(Localizer.getInstance().getMessage("lblActivator")).append(": ").append(sa.getTriggeringObject(AbilityKey.Activator)).append(", ");
+ sb.append(Localizer.getInstance().getMessage("lblSpellAbility")).append(": ").append(sa.getTriggeringObject(AbilityKey.SpellAbility));
+ return sb.toString();
+ }
+}
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 cafac587c08..c1f9148207a 100644
--- a/forge-game/src/main/java/forge/game/trigger/TriggerType.java
+++ b/forge-game/src/main/java/forge/game/trigger/TriggerType.java
@@ -93,6 +93,7 @@ public enum TriggerType {
SpellAbilityCast(TriggerSpellAbilityCast.class),
SpellAbilityCopy(TriggerSpellAbilityCopy.class),
SpellCast(TriggerSpellAbilityCast.class),
+ SpellCastOrCopy(TriggerSpellCastOrCopy.class),
SpellCopy(TriggerSpellAbilityCopy.class),
Surveil(TriggerSurveil.class),
Taps(TriggerTaps.class),
diff --git a/forge-game/src/main/java/forge/game/zone/MagicStack.java b/forge-game/src/main/java/forge/game/zone/MagicStack.java
index c5dc7e71a3b..ceb8b3054e4 100644
--- a/forge-game/src/main/java/forge/game/zone/MagicStack.java
+++ b/forge-game/src/main/java/forge/game/zone/MagicStack.java
@@ -336,12 +336,16 @@ public class MagicStack /* extends MyObservable */ implements Iterable | Planeswalker$ True | ScryNum$ 1 | SpellDescription$ Scry 1.
A:AB$ DelayedTrigger | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | AILogic$ SpellCopy | Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | ThisTurn$ True | Execute$ EffTrigCopy | SpellDescription$ When you cast your next instant or sorcery spell this turn, copy that spell. You may choose new targets for the copy.
diff --git a/forge-gui/res/cardsfolder/upcoming/archmage_emeritus.txt b/forge-gui/res/cardsfolder/upcoming/archmage_emeritus.txt
index 32627bf3c1d..4047497e997 100644
--- a/forge-gui/res/cardsfolder/upcoming/archmage_emeritus.txt
+++ b/forge-gui/res/cardsfolder/upcoming/archmage_emeritus.txt
@@ -2,8 +2,7 @@ Name:Archmage Emeritus
ManaCost:2 U U
Types:Creature Human Wizard
PT:2/2
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, draw a card.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | Secondary$ True | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, draw a card.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, draw a card.
SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ 1
DeckNeeds:Type$Instant|Sorcery
Oracle:Magecraft — Whenever you cast or copy an instant or sorcery spell, draw a card.
diff --git a/forge-gui/res/cardsfolder/upcoming/clever_lumimancer.txt b/forge-gui/res/cardsfolder/upcoming/clever_lumimancer.txt
index 6e07db2b5ee..a0a83c9c7a2 100644
--- a/forge-gui/res/cardsfolder/upcoming/clever_lumimancer.txt
+++ b/forge-gui/res/cardsfolder/upcoming/clever_lumimancer.txt
@@ -2,8 +2,7 @@ Name:Clever Lumimancer
ManaCost:W
Types:Creature Human Wizard
PT:0/1
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Magecraft - Whenever you cast or copy an instant or sorcery spell, CARDNAME gets +2/+2 until end of turn.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | Secondary$ True | TriggerDescription$ Magecraft - Whenever you cast or copy an instant or sorcery spell, CARDNAME gets +2/+2 until end of turn.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Magecraft - Whenever you cast or copy an instant or sorcery spell, CARDNAME gets +2/+2 until end of turn.
SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ 2 | NumDef$ +2
SVar:BuffedBy:Instant,Sorcery
DeckNeeds:Type$Instant|Sorcery
diff --git a/forge-gui/res/cardsfolder/upcoming/dragonsguard_elite.txt b/forge-gui/res/cardsfolder/upcoming/dragonsguard_elite.txt
index d636748df0c..0f0e24fe7b5 100644
--- a/forge-gui/res/cardsfolder/upcoming/dragonsguard_elite.txt
+++ b/forge-gui/res/cardsfolder/upcoming/dragonsguard_elite.txt
@@ -2,8 +2,7 @@ Name:Dragonsguard Elite
ManaCost:1 G
Types:Creature Human Druid
PT:2/2
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, put a +1/+1 counter on CARDNAME.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | Secondary$ True | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, put a +1/+1 counter on CARDNAME.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, put a +1/+1 counter on CARDNAME.
SVar:TrigPutCounter:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ 1
A:AB$ MultiplyCounter | Cost$ 4 G G | Defined$ Self | CounterType$ P1P1 | SpellDescription$ Double the number of +1/+1 counters on CARDNAME.
DeckHas:Ability$Counters
diff --git a/forge-gui/res/cardsfolder/upcoming/eager_first_year.txt b/forge-gui/res/cardsfolder/upcoming/eager_first_year.txt
index 3e11289efea..da870fd31e1 100644
--- a/forge-gui/res/cardsfolder/upcoming/eager_first_year.txt
+++ b/forge-gui/res/cardsfolder/upcoming/eager_first_year.txt
@@ -2,8 +2,7 @@ Name:Eager First-Year
ManaCost:2 U R
Types:Creature Human Wizard
PT:2/2
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Magecraft - Whenever you cast or copy an instant or sorcery spell, CARDNAME gets +1/+0 until end of turn.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | Secondary$ True | TriggerDescription$ Magecraft - Whenever you cast or copy an instant or sorcery spell, CARDNAME gets +1/+0 until end of turn.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Magecraft - Whenever you cast or copy an instant or sorcery spell, CARDNAME gets +1/+0 until end of turn.
SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ 1
SVar:BuffedBy:Instant,Sorcery
DeckNeeds:Type$Instant|Sorcery
diff --git a/forge-gui/res/cardsfolder/upcoming/extus_oriq_overlord_awaken_the_blood_avatar.txt b/forge-gui/res/cardsfolder/upcoming/extus_oriq_overlord_awaken_the_blood_avatar.txt
index a98d5963480..a105d81f0db 100644
--- a/forge-gui/res/cardsfolder/upcoming/extus_oriq_overlord_awaken_the_blood_avatar.txt
+++ b/forge-gui/res/cardsfolder/upcoming/extus_oriq_overlord_awaken_the_blood_avatar.txt
@@ -3,8 +3,7 @@ ManaCost:1 W B B
Types:Legendary Creature Human Warlock
PT:2/4
K:Double Strike
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigReturn | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, return target nonlegendary creature card from your graveyard to your hand.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigReturn | Secondary$ True | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, return target nonlegendary creature card from your graveyard to your hand.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigReturn | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, return target nonlegendary creature card from your graveyard to your hand.
SVar:TrigReturn:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target nonlegendary creature in your graveyard | ValidTgts$ Creature.YouOwn+nonLegendary
DeckNeeds:Type$Instant|Sorcery
DeckHas:Ability$Graveyard
diff --git a/forge-gui/res/cardsfolder/upcoming/lorehold_apprentice.txt b/forge-gui/res/cardsfolder/upcoming/lorehold_apprentice.txt
index cad3a863267..1e6842e8552 100644
--- a/forge-gui/res/cardsfolder/upcoming/lorehold_apprentice.txt
+++ b/forge-gui/res/cardsfolder/upcoming/lorehold_apprentice.txt
@@ -2,8 +2,7 @@ Name:Lorehold Apprentice
ManaCost:R W
Types:Creature Human Cleric
PT:2/2
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPumpAll | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, until end of turn, Spirit creatures you control gain "{T}: This creature deals 1 damage to each opponent."
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPumpAll | Secondary$ True | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, until end of turn, Spirit creatures you control gain "{T}: This creature deals 1 damage to each opponent."
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPumpAll | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, until end of turn, Spirit creatures you control gain "{T}: This creature deals 1 damage to each opponent."
SVar:TrigPumpAll:DB$ AnimateAll | ValidCards$ Creature.Spirit+YouCtrl | Abilities$ Sizzle
SVar:Sizzle:AB$ DealDamage | Cost$ T | Defined$ Opponent | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to each opponent.
DeckHints:Type$Instant|Sorcery
diff --git a/forge-gui/res/cardsfolder/upcoming/lorehold_pledgemage.txt b/forge-gui/res/cardsfolder/upcoming/lorehold_pledgemage.txt
index 1b4a56f3e35..efa02958278 100644
--- a/forge-gui/res/cardsfolder/upcoming/lorehold_pledgemage.txt
+++ b/forge-gui/res/cardsfolder/upcoming/lorehold_pledgemage.txt
@@ -2,8 +2,7 @@ Name:Lorehold Pledgemage
ManaCost:1 RW RW
Types:Creature Kor Shaman
PT:2/2
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Magecraft - Whenever you cast or copy an instant or sorcery spell, CARDNAME gets +1/+0 until end of turn.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | Secondary$ True | TriggerDescription$ Magecraft - Whenever you cast or copy an instant or sorcery spell, CARDNAME gets +1/+0 until end of turn.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Magecraft - Whenever you cast or copy an instant or sorcery spell, CARDNAME gets +1/+0 until end of turn.
SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ 1
SVar:BuffedBy:Instant,Sorcery
DeckNeeds:Type$Instant|Sorcery
diff --git a/forge-gui/res/cardsfolder/upcoming/prismari_apprentice.txt b/forge-gui/res/cardsfolder/upcoming/prismari_apprentice.txt
index 696fae375a8..c88bff92868 100644
--- a/forge-gui/res/cardsfolder/upcoming/prismari_apprentice.txt
+++ b/forge-gui/res/cardsfolder/upcoming/prismari_apprentice.txt
@@ -2,8 +2,7 @@ Name:Prismari Apprentice
ManaCost:U R
Types:Creature Human Shaman
PT:2/2
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, CARDNAME can't be blocked this turn. If that spell has mana value 5 or greater, put a +1/+1 counter on CARDNAME.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | Secondary$ True | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, CARDNAME can't be blocked this turn. If that spell has mana value 5 or greater, put a +1/+1 counter on CARDNAME.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, CARDNAME can't be blocked this turn. If that spell has mana value 5 or greater, put a +1/+1 counter on CARDNAME.
SVar:TrigPump:DB$ Pump | Defined$ Self | KW$ HIDDEN Unblockable | SubAbility$ DBPutCounter
SVar:DBPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | ConditionCheckSVar$ X | ConditionSVarCompare$ GE5
DeckNeeds:Type$Instant|Sorcery
diff --git a/forge-gui/res/cardsfolder/upcoming/professor_onyx.txt b/forge-gui/res/cardsfolder/upcoming/professor_onyx.txt
index 1f7d62c9d29..f5c21a0ea0c 100644
--- a/forge-gui/res/cardsfolder/upcoming/professor_onyx.txt
+++ b/forge-gui/res/cardsfolder/upcoming/professor_onyx.txt
@@ -2,8 +2,7 @@ Name:Professor Onyx
ManaCost:4 B B
Types:Legendary Planeswalker Liliana
Loyalty:5
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | Execute$ TrigDrain | TriggerZones$ Battlefield | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, each opponent loses 2 life and you gain 2 life.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDrain | Secondary$ True | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, each opponent loses 2 life and you gain 2 life.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | Execute$ TrigDrain | TriggerZones$ Battlefield | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, each opponent loses 2 life and you gain 2 life.
SVar:TrigDrain:DB$ LoseLife | Defined$ Player.Opponent | LifeAmount$ 2 | SubAbility$ DBGainLife
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ 2
A:AB$ LoseLife | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | Defined$ You | LifeAmount$ 1 | SubAbility$ DBDig | SpellDescription$ You lose 1 life. Look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard.
diff --git a/forge-gui/res/cardsfolder/upcoming/quandrix_apprentice.txt b/forge-gui/res/cardsfolder/upcoming/quandrix_apprentice.txt
index 8a9791f28a9..b483a88bb7f 100644
--- a/forge-gui/res/cardsfolder/upcoming/quandrix_apprentice.txt
+++ b/forge-gui/res/cardsfolder/upcoming/quandrix_apprentice.txt
@@ -2,8 +2,7 @@ Name:Quandrix Apprentice
ManaCost:G U
Types:Creature Human Wizard
PT:2/2
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDig | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, look at the top three cards of your library. You may reveal a land card from among them and put that card into your hand. Put the rest on the bottom of your library in any order.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDig | Secondary$ True | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, look at the top three cards of your library. You may reveal a land card from among them and put that card into your hand. Put the rest on the bottom of your library in any order.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDig | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, look at the top three cards of your library. You may reveal a land card from among them and put that card into your hand. Put the rest on the bottom of your library in any order.
SVar:TrigDig:DB$ Dig | DigNum$ 3 | ChangeNum$ 1 | Optional$ True | ForceRevealToController$ True | ChangeValid$ Land
DeckNeeds:Type$Instant|Sorcery
Oracle:Magecraft — Whenever you cast or copy an instant or sorcery spell, look at the top three cards of your library. You may reveal a land card from among them and put that card into your hand. Put the rest on the bottom of your library in any order.
diff --git a/forge-gui/res/cardsfolder/upcoming/silverquill_apprentice.txt b/forge-gui/res/cardsfolder/upcoming/silverquill_apprentice.txt
index 6efc1989dad..773d84e9d1d 100644
--- a/forge-gui/res/cardsfolder/upcoming/silverquill_apprentice.txt
+++ b/forge-gui/res/cardsfolder/upcoming/silverquill_apprentice.txt
@@ -2,8 +2,7 @@ Name:Silverquill Apprentice
ManaCost:W B
Types:Creature Human Warlock
PT:2/2
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Magecraft — Whenever you cast or copy and instant or sorcery spell, target creature gets +1/+0 until end of turn.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | Secondary$ True | TriggerDescription$ Magecraft — Whenever you cast or copy and instant or sorcery spell, target creature gets +1/+0 until end of turn.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Magecraft — Whenever you cast or copy and instant or sorcery spell, target creature gets +1/+0 until end of turn.
SVar:TrigPump:DB$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ 1
DeckNeeds:Type$Instant|Sorcery
Oracle:Magecraft — Whenever you cast or copy and instant or sorcery spell, target creature gets +1/+0 until end of turn
diff --git a/forge-gui/res/cardsfolder/upcoming/storm_kiln_artist.txt b/forge-gui/res/cardsfolder/upcoming/storm_kiln_artist.txt
index 99157cce7c5..a5cc1bd0073 100644
--- a/forge-gui/res/cardsfolder/upcoming/storm_kiln_artist.txt
+++ b/forge-gui/res/cardsfolder/upcoming/storm_kiln_artist.txt
@@ -4,8 +4,7 @@ Types:Creature Dwarf Shaman
PT:2/2
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ X | Description$ CARDNAME gets +1/+0 for each artifact you control.
SVar:X:Count$Valid Artifact.YouCtrl
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, create a Treasure token.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | Secondary$ True | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, create a Treasure token.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, create a Treasure token.
SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_a_treasure_sac | TokenOwner$ You
SVar:BuffedBy:Artifact,Instant,Sorcery
DeckHas:Ability$Token
diff --git a/forge-gui/res/cardsfolder/upcoming/witherbloom_apprentice.txt b/forge-gui/res/cardsfolder/upcoming/witherbloom_apprentice.txt
index b188e448031..d3f20709595 100644
--- a/forge-gui/res/cardsfolder/upcoming/witherbloom_apprentice.txt
+++ b/forge-gui/res/cardsfolder/upcoming/witherbloom_apprentice.txt
@@ -2,8 +2,7 @@ Name:Witherbloom Apprentice
ManaCost:B G
Types:Creature Human Druid
PT:2/2
-T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDrain | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, each opponent loses 1 life and you gain 1 life.
-T:Mode$ SpellCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDrain | Secondary$ True | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, each opponent loses 1 life and you gain 1 life.
+T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDrain | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, each opponent loses 1 life and you gain 1 life.
SVar:TrigDrain:DB$ LoseLife | Defined$ Player.Opponent | LifeAmount$ 1 | SubAbility$ DBGainOneLife
SVar:DBGainOneLife:DB$ GainLife | Defined$ You | LifeAmount$ 1
DeckNeeds:Type$Instant|Sorcery