Name:Kaya the Inexorable
ManaCost:3 W B
Types:Legendary Planeswalker Kaya
Loyalty:5
A:AB$ PutCounter | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | ValidTgts$ Creature.nonToken | AITgts$ Creature.nonToken+YouCtrl | TgtPrompt$ Select target nontoken creature | TargetMin$ 0 | TargetMax$ 1 | CounterType$ GHOSTFORM | CounterNum$ 1 | SubAbility$ DBAnimate | SpellDescription$ Put a ghostform counter on up to one target nontoken creature. It gains "When this creature dies or is put into exile, return it to its owner's hand and create a 1/1 white Spirit creature token with flying."
SVar:DBAnimate:DB$ Animate | Defined$ Targeted | Duration$ Permanent | Triggers$ TrigDieExile | StackDescription$ {c:Targeted} gains "When this creature dies or is put into exile, return it to its owner's hand and create a 1/1 white Spirit creature token with flying."
SVar:TrigDieExile:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard,Exile | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerDescription$ When this creature dies or is put into exile, return it to its owner's hand and create a 1/1 white Spirit creature token with flying.
SVar:TrigReturn:DB$ ChangeZone | Defined$ TriggeredNewCardLKICopy | Origin$ Graveyard,Exile | Destination$ Hand | SubAbility$ DBToken
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ w_1_1_spirit_flying | TokenOwner$ TriggeredCardController
A:AB$ ChangeZone | Cost$ SubCounter<3/LOYALTY> | Planeswalker$ True | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Permanent.nonLand | TgtPrompt$ Select target nonland permanent | SpellDescription$ Exile target nonland permanent.
A:AB$ Effect | Cost$ SubCounter<7/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Emblem — Kaya the Inexorable | Image$ emblem_kaya_the_inexorable | Duration$ Permanent | Triggers$ Upkeep | SpellDescription$ You get an emblem with "At the beginning of your upkeep, you may cast a legendary spell from your hand, from your graveyard, or from among cards you own in exile without paying its mana cost."
SVar:Upkeep:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Command | OptionalDecider$ You | Execute$ TrigCast | TriggerDescription$ At the beginning of your upkeep, you may cast a legendary spell from your hand, from your graveyard, or from among cards you own in exile without paying its mana cost.
SVar:TrigCast:DB$ Play | Valid$ Card.Legendary+YouOwn | ValidSA$ Spell | ValidZone$ Hand,Graveyard,Exile | WithoutManaCost$ True
DeckHas:Ability$Token|Counters
DeckHints:Type$Legendary
Oracle:[+1]: Put a ghostform counter on up to one target nontoken creature. It gains "When this creature dies or is put into exile, return it to its owner's hand and create a 1/1 white Spirit creature token with flying."\n[-3]: Exile target nonland permanent.\n[-7]: You get an emblem with "At the beginning of your upkeep, you may cast a legendary spell from your hand, from your graveyard, or from among cards you own in exile without paying its mana cost."
