diff --git a/forge-game/src/main/java/forge/game/ability/effects/InvestigateEffect.java b/forge-game/src/main/java/forge/game/ability/effects/InvestigateEffect.java index d0c3f694eb3..34041e3eeec 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/InvestigateEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/InvestigateEffect.java @@ -38,18 +38,17 @@ public class InvestigateEffect extends TokenEffectBase { // Investigate in Sequence for (int i = 0; i < amount; i++) { + CardZoneTable triggerList = new CardZoneTable(); + MutableBoolean combatChanged = new MutableBoolean(false); + for (final Player p : getTargetPlayers(sa)) { if (sa.hasParam("Optional") && !p.getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblWouldYouLikeInvestigate"), null)) { continue; } - CardZoneTable triggerList = new CardZoneTable(); - MutableBoolean combatChanged = new MutableBoolean(false); - makeTokenTable(makeTokenTableInternal(p, "c_a_clue_draw", 1, sa), false, triggerList, combatChanged, sa); - triggerList.triggerChangesZoneAll(game, sa); p.addInvestigatedThisTurn(); if (sa.hasParam("RememberInvestigatingPlayers")) { @@ -57,11 +56,12 @@ public class InvestigateEffect extends TokenEffectBase { } game.fireEvent(new GameEventTokenCreated()); + } - if (combatChanged.isTrue()) { - game.updateCombatForView(); - game.fireEvent(new GameEventCombatChanged()); - } + triggerList.triggerChangesZoneAll(game, sa); + if (combatChanged.isTrue()) { + game.updateCombatForView(); + game.fireEvent(new GameEventCombatChanged()); } } } diff --git a/forge-gui/res/cardsfolder/a/arahbo_roar_of_the_world.txt b/forge-gui/res/cardsfolder/a/arahbo_roar_of_the_world.txt index 70636b3a15d..b52096e25b0 100644 --- a/forge-gui/res/cardsfolder/a/arahbo_roar_of_the_world.txt +++ b/forge-gui/res/cardsfolder/a/arahbo_roar_of_the_world.txt @@ -2,8 +2,8 @@ Name:Arahbo, Roar of the World ManaCost:3 G W Types:Legendary Creature Cat Avatar PT:5/5 -T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Card.Self | PresentZone$ Battlefield | Execute$ TrigPump1 | TriggerDescription$ Eminence — At the beginning of combat on your turn, if CARDNAME is in the command zone or on the battlefield, another target Cat you control gets +3/+3 until end of turn. -T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | TriggerZones$ Command | IsPresent$ Card.Self | PresentZone$ Command | Execute$ TrigPump1 | Secondary$ True +T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Card.StrictlySelf | PresentZone$ Battlefield | Execute$ TrigPump1 | TriggerDescription$ Eminence — At the beginning of combat on your turn, if CARDNAME is in the command zone or on the battlefield, another target Cat you control gets +3/+3 until end of turn. +T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | TriggerZones$ Command | IsPresent$ Card.StrictlySelf | PresentZone$ Command | Execute$ TrigPump1 | Secondary$ True SVar:TrigPump1:DB$ Pump | ValidTgts$ Creature.Cat+YouCtrl+Other | TgtPrompt$ Select another target Cat you control | NumAtt$ 3 | NumDef$ 3 T:Mode$ Attacks | ValidCard$ Creature.Cat+Other+YouCtrl | TriggerZones$ Battlefield | Execute$ TrigPump2 | TriggerDescription$ Whenever another Cat you control attacks, you may pay {1}{G}{W}. If you do, it gains trample and gets +X/+X until end of turn, where X is its power. SVar:TrigPump2:AB$ Pump | Cost$ 1 G W | Defined$ TriggeredAttackerLKICopy | KW$ Trample | NumAtt$ X | NumDef$ X diff --git a/forge-gui/res/cardsfolder/e/edgar_markov.txt b/forge-gui/res/cardsfolder/e/edgar_markov.txt index 134a4cc0d4d..5d305744dcb 100644 --- a/forge-gui/res/cardsfolder/e/edgar_markov.txt +++ b/forge-gui/res/cardsfolder/e/edgar_markov.txt @@ -2,8 +2,8 @@ Name:Edgar Markov ManaCost:3 R W B Types:Legendary Creature Vampire Knight PT:4/4 -T:Mode$ SpellCast | ValidCard$ Card.Vampire+Other | ValidActivatingPlayer$ You | TriggerZones$ Command | PresentZone$ Command | Execute$ TrigToken | TriggerDescription$ Eminence — Whenever you cast another Vampire spell, if Edgar Markov is in the command zone or on the battlefield, create a 1/1 black Vampire creature token. -T:Mode$ SpellCast | ValidCard$ Card.Vampire+Other | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | PresentZone$ Battlefield | Execute$ TrigToken | Secondary$ True | TriggerDescription$ Eminence — Whenever you cast another Vampire spell, if Edgar Markov is in the command zone or on the battlefield, create a 1/1 black Vampire creature token. +T:Mode$ SpellCast | ValidCard$ Card.Vampire+Other | ValidActivatingPlayer$ You | TriggerZones$ Command | PresentZone$ Command | IsPresent$ Card.StrictlySelf | Execute$ TrigToken | TriggerDescription$ Eminence — Whenever you cast another Vampire spell, if Edgar Markov is in the command zone or on the battlefield, create a 1/1 black Vampire creature token. +T:Mode$ SpellCast | ValidCard$ Card.Vampire+Other | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | PresentZone$ Battlefield | IsPresent$ Card.StrictlySelf | Execute$ TrigToken | Secondary$ True | TriggerDescription$ Eminence — Whenever you cast another Vampire spell, if Edgar Markov is in the command zone or on the battlefield, create a 1/1 black Vampire creature token. SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ b_1_1_vampire | TokenOwner$ You K:First Strike K:Haste diff --git a/forge-gui/res/cardsfolder/i/inalla_archmage_ritualist.txt b/forge-gui/res/cardsfolder/i/inalla_archmage_ritualist.txt index ed4d1992411..0191e7f0aa1 100644 --- a/forge-gui/res/cardsfolder/i/inalla_archmage_ritualist.txt +++ b/forge-gui/res/cardsfolder/i/inalla_archmage_ritualist.txt @@ -2,8 +2,8 @@ Name:Inalla, Archmage Ritualist ManaCost:2 U B R Types:Legendary Creature Human Wizard PT:4/5 -T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Wizard.YouCtrl+nonToken+Other | TriggerZones$ Command | PresentZone$ Command | Execute$ TrigCopyPermanent | TriggerDescription$ Eminence — Whenever another nontoken Wizard enters the battlefield under your control, if CARDNAME is in the command zone or on the battlefield, you may pay {1}. If you do, create a token that's a copy of that Wizard. The token gains haste. Exile it at the beginning of the next end step. -T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Wizard.YouCtrl+nonToken+Other | TriggerZones$ Battlefield | PresentZone$ Battlefield | Execute$ TrigCopyPermanent | Secondary$ True | TriggerDescription$ Eminence — Whenever another nontoken Wizard enters the battlefield under your control, if CARDNAME is in the command zone or on the battlefield, you may pay {1}. If you do, create a token that's a copy of that Wizard. The token gains haste. Exile it at the beginning of the next end step. +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Wizard.YouCtrl+nonToken+Other | TriggerZones$ Command | PresentZone$ Command | IsPresent$ Card.StrictlySelf | Execute$ TrigCopyPermanent | TriggerDescription$ Eminence — Whenever another nontoken Wizard enters the battlefield under your control, if CARDNAME is in the command zone or on the battlefield, you may pay {1}. If you do, create a token that's a copy of that Wizard. The token gains haste. Exile it at the beginning of the next end step. +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Wizard.YouCtrl+nonToken+Other | TriggerZones$ Battlefield | PresentZone$ Battlefield | IsPresent$ Card.StrictlySelf | Execute$ TrigCopyPermanent | Secondary$ True | TriggerDescription$ Eminence — Whenever another nontoken Wizard enters the battlefield under your control, if CARDNAME is in the command zone or on the battlefield, you may pay {1}. If you do, create a token that's a copy of that Wizard. The token gains haste. Exile it at the beginning of the next end step. SVar:TrigCopyPermanent:AB$ CopyPermanent | Cost$ 1 | Defined$ TriggeredCardLKICopy | NumCopies$ 1 | PumpKeywords$ Haste | AtEOT$ Exile A:AB$ LoseLife | Cost$ tapXType<5/Wizard> | ValidTgts$ Player | TgtPrompt$ Select a player to lose 7 life | LifeAmount$ 7 | SpellDescription$ Target player loses 7 life. SVar:BuffedBy:Wizard