diff --git a/forge-ai/src/main/java/forge/ai/ability/PlayAi.java b/forge-ai/src/main/java/forge/ai/ability/PlayAi.java index 4dd32581358..6ef2c03140f 100644 --- a/forge-ai/src/main/java/forge/ai/ability/PlayAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/PlayAi.java @@ -153,11 +153,14 @@ public class PlayAi extends SpellAbilityAi { // TODO needs to be aligned for MDFC along with getAbilityToPlay so the knowledge // of which spell was the reason for the choice can be used there for (SpellAbility s : AbilityUtils.getBasicSpellsFromPlayEffect(c, ai, state)) { - if (!(s instanceof Spell)) { + if (!sa.matchesValidParam("ValidSA", s)) { continue; } + if (s instanceof LandAbility) { + // might want to run some checks here but it's rare anyway + return true; + } Spell spell = (Spell) s; - s.setActivatingPlayer(ai, true); if (params != null && params.containsKey("CMCLimit")) { Integer cmcLimit = (Integer) params.get("CMCLimit"); if (spell.getPayCosts().getTotalMana().getCMC() > cmcLimit) diff --git a/forge-gui/res/cardsfolder/a/aetherworks_marvel.txt b/forge-gui/res/cardsfolder/a/aetherworks_marvel.txt index df1dc65c717..5124a335a3c 100644 --- a/forge-gui/res/cardsfolder/a/aetherworks_marvel.txt +++ b/forge-gui/res/cardsfolder/a/aetherworks_marvel.txt @@ -4,7 +4,7 @@ Types:Legendary Artifact T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Permanent.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigEnergy | TriggerDescription$ Whenever a permanent you control is put into a graveyard, you get {E} (an energy counter). SVar:TrigEnergy:DB$ PutCounter | Defined$ You | CounterType$ ENERGY | CounterNum$ 1 A:AB$ PeekAndReveal | Cost$ T PayEnergy<6> | Defined$ You | PeekAmount$ 6 | NoReveal$ True | RememberPeeked$ True | SubAbility$ DBPlay | SpellDescription$ Look at the top six cards of your library. You may cast a spell from among them without paying its mana cost. Put the rest on the bottom of your library in a random order. -SVar:DBPlay:DB$ Play | ValidZone$ Library | Valid$ Card.IsRemembered+nonLand | Controller$ You | WithoutManaCost$ True | Optional$ True | Amount$ 1 | ForgetPlayed$ True | SubAbility$ DBRestRandomOrder +SVar:DBPlay:DB$ Play | ValidZone$ Library | Valid$ Card.IsRemembered | ValidSA$ Spell | Controller$ You | WithoutManaCost$ True | Optional$ True | Amount$ 1 | ForgetPlayed$ True | SubAbility$ DBRestRandomOrder SVar:DBRestRandomOrder:DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered | Origin$ Library | Destination$ Library | LibraryPosition$ -1 | RandomOrder$ True | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True Oracle:Whenever a permanent you control is put into a graveyard, you get {E} (an energy counter).\n{T}, Pay {E}{E}{E}{E}{E}{E}: Look at the top six cards of your library. You may cast a spell from among them without paying its mana cost. Put the rest on the bottom of your library in a random order. diff --git a/forge-gui/res/cardsfolder/z/zask_skittering_swarmlord.txt b/forge-gui/res/cardsfolder/z/zask_skittering_swarmlord.txt index 26d688f8a5a..f169435e8a5 100644 --- a/forge-gui/res/cardsfolder/z/zask_skittering_swarmlord.txt +++ b/forge-gui/res/cardsfolder/z/zask_skittering_swarmlord.txt @@ -2,7 +2,7 @@ Name:Zask, Skittering Swarmlord ManaCost:3 G G Types:Legendary Creature Insect PT:5/5 -S:Mode$ Continuous | Affected$ Land.YouOwn,Insect.YouOwn | MayPlay$ True | AffectedZone$ Graveyard | Description$ You may play lands and cast Insect spells from your graveyard. +S:Mode$ Continuous | Affected$ Land.YouOwn,Insect.YouOwn | ValidAfterStack$ Spell.Insect | MayPlay$ True | AffectedZone$ Graveyard | Description$ You may play lands and cast Insect spells from your graveyard. T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Insect.YouCtrl+Other | Execute$ TrigChange | TriggerDescription$ Whenever another Insect you control dies, put it on the bottom of its owner's library, then mill two cards. (Put the top two cards of your library into your graveyard.) SVar:TrigChange:DB$ ChangeZone | Defined$ TriggeredNewCardLKICopy | Origin$ Graveyard | Destination$ Library | LibraryPosition$ -1 | SubAbility$ DBMill SVar:DBMill:DB$ Mill | NumCards$ 2 diff --git a/forge-gui/res/cardsfolder/z/ziatoras_envoy.txt b/forge-gui/res/cardsfolder/z/ziatoras_envoy.txt index 697c4842bd6..af7ad5344b7 100644 --- a/forge-gui/res/cardsfolder/z/ziatoras_envoy.txt +++ b/forge-gui/res/cardsfolder/z/ziatoras_envoy.txt @@ -5,7 +5,7 @@ PT:5/4 K:Trample T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigPeek | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, look at the top card of your library. You may play a land from the top of your library or cast a spell with mana value less than or equal to the damage dealt from the top of your library without paying its mana cost. If you don't, put that card into your hand. SVar:TrigPeek:DB$ PeekAndReveal | PeekAmount$ 1 | NoReveal$ True | RememberPeeked$ True | SubAbility$ DBPlay -SVar:DBPlay:DB$ Play | Optional$ True | ValidZone$ Library | Defined$ Remembered | ValidSA$ SpellAbility.Land,Spell.cmcLEX | WithoutManaCost$ True | ForgetPlayed$ True | SubAbility$ DBChangeZone +SVar:DBPlay:DB$ Play | Optional$ True | Defined$ Remembered | ValidSA$ SpellAbility.Land,Spell.cmcLEX | WithoutManaCost$ True | ForgetPlayed$ True | SubAbility$ DBChangeZone SVar:DBChangeZone:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Hand | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:X:TriggerCount$DamageAmount