mirror of
https://github.com/Relintai/mtg-forge-ios.git
synced 2024-12-21 07:16:52 +01:00
23 lines
2.6 KiB
Plaintext
23 lines
2.6 KiB
Plaintext
|
Name:Grinning Totem
|
||
|
ManaCost:4
|
||
|
Types:Artifact
|
||
|
A:AB$ ChangeZone | Cost$ 2 T Sac<1/CARDNAME> | ValidTgts$ Player.Opponent | IsCurse$ True | Chooser$ You | Origin$ Library | Destination$ Exile | ChangeType$ Card | ChangeNum$ 1 | IsCurse$ True | RememberChanged$ True | SubAbility$ TotemEffect | SpellDescription$ Search target opponent's library for a card and exile it. Then that player shuffles his or her library. Until the beginning of your next upkeep, you may play that card. At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard. | StackDescription$ SpellDescription
|
||
|
SVar:TotemEffect:DB$ Effect | StaticAbilities$ STGrinning | Duration$ Permanent | RememberObjects$ Remembered | Triggers$ TrigDuration,TrigReturn,TrigLandPlayed,TrigCast | SVars$ DBDuration,ActiveTotem,RemoveEffect,DBReturn | SubAbility$ DBResetSVar
|
||
|
# Even though the Effect is "Permanent", it's not really permanent
|
||
|
SVar:DBResetSVar:DB$ StoreSvar | SVar$ ActiveTotem | Type$ Number | Expression$ 1 | SubAbility$ DBCleanup
|
||
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||
|
SVar:ActiveTotem:Number$1
|
||
|
SVar:STGrinning:Mode$ Continuous | Affected$ Card.IsRemembered+OppOwn | MayPlay$ True | EffectZone$ Command | AffectedZone$ Exile | CheckSVar$ ActiveTotem | Description$ Until the beginning of your next upkeep, you may play that card.
|
||
|
# Turn off the duration at the beginning of the upkeep statically
|
||
|
SVar:TrigDuration:Mode$ Phase | Phase$ Upkeep | Player$ You | Static$ True | TriggerZones$ Command | Execute$ DBDuration
|
||
|
SVar:DBDuration:DB$ StoreSvar | SVar$ ActiveTotem | Type$ Number | Expression$ 0
|
||
|
# Return the card as a normal trigger
|
||
|
SVar:TrigReturn:Mode$ Phase | Phase$ Upkeep | Player$ You | Static$ True | TriggerZones$ Command | Execute$ DBReturn
|
||
|
SVar:DBReturn:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Graveyard | SubAbility$ RemoveEffect
|
||
|
SVar:RemoveEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
|
||
|
# Remove Totem Effect when the card is played
|
||
|
SVar:TrigLandPlayed:Mode$ LandPlayed | ValidCard$ Land.IsRemembered | Static$ True | TriggerZones$ Command | Execute$ RemoveEffect
|
||
|
SVar:TrigCast:Mode$ SpellCast | ValidCard$ Card.IsRemembered | Static$ True | TriggerZones$ Command | Execute$ RemoveEffect
|
||
|
SVar:RemAIDeck:True
|
||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/grinning_totem.jpg
|
||
|
Oracle:{2}, {T}, Sacrifice Grinning Totem: Search target opponent's library for a card and exile it. Then that player shuffles his or her library. Until the beginning of your next upkeep, you may play that card. At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard.
|