Sloth wrote:moomarc wrote:I'm trying to script
Mist of Stagnation. Is it possible to make the triggered ability work? Here's what I've got but it's just not working
- Code: Select all
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | TriggerZones$ Battlefield | Execute$ TrigUntap | TriggerDescription$ At the beginning of each player's upkeep, that player chooses a permanent for each card in his or her graveyard, then untaps those permanents.
SVar:TrigUntap:AB$ Untap | Cost$ 0 | UntapType$ Card.PlayerCtrl | Amount$ X | Defined$ TriggeredPlayer
SVar:X:Count$InYourYard
Looks like we'd need a Choose AF then UntapAll | UntapType$ Chosen
Card.PlayerCtrl does not exist, but I can't find the restriction in the oracle text anyway. So Permanent should be enough.
I tried that as well, but no luck. I think it's because Amount is actually for use with UntapUpTo. And the .PlayerCtrl was a remnant from when I tried a different method and was limiting it to only the player's upkeep for testing. But I just saw another problem so it would have to be split anyway. At the moment both players count cards in your graveyard instead of their own.

So I still think we'd need a Choose AF then UntapAll | UntapType$ Chosen or ValidChoice$ which could be used interchangeably with ValidTgts$.
So I've gone onto another one now.
- Coffin Queen | Open
- Name:Coffin Queen
ManaCost:2 B
Types:Creature Zombie Wizard
Text:no text
PT:1/1
K:You may choose not to untap CARDNAME during your untap step.
A:AB$ ChangeZone | Cost$ 2 B T | Origin$ Graveyard | Destination$ Battlefield | RememberChanged$ True | GainControl$ True | TgtPrompt$ Select target creature card in a graveyard | ValidTgts$ Creature | ChangeNum$ 1 | SpellDescription$ Put target creature card from a graveyard onto the battlefield under your control. When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ Untaps | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
T:Mode$ Always | IsPresent$ Card.Self+OwnerDoesntControl | TriggerZones$ Battlefield | Execute$ TrigExile | CheckSVar$ X | SVarCompare$ EQ1 | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
SVar:TrigExile:DB$ChangeZone | Cost$ 0 | Defined$ Remembered | Origin$ Battlefield | Destination$ Exile | Static$ True | Execute$ DBCleanup | Trigger Description$ When CARDNAME becomes untapped or you lose control of CARDNAME, exile that creature.
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/coffin_queen.jpg
End
The only problem is the change owner trigger. With this script, if the AI casts
Act of Treason on my
Coffin Queen which has brought a creature back from the grave, the queen stays on my side and nothing triggers. I'm also getting empty stack descriptions when one of the triggers go off.