Name:Chandra, Legacy of Fire
ManaCost:4 R
Types:Legendary Planeswalker Chandra
Loyalty:3
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ At the beginning of your end step, CARDNAME deals X damage to each opponent, where X is the number of planeswalkers you control.
SVar:TrigDealDamage:DB$ DealDamage | Defined$ Opponent | NumDmg$ X
SVar:X:Count$Valid Planeswalker.YouCtrl
A:AB$ Mana | Cost$ AddCounter<1/LOYALTY> | Produced$ R | Amount$ X | Planeswalker$ True | SpellDescription$ Add {R} for each planeswalker you control.
A:AB$ RemoveCounter | Cost$ AddCounter<0/LOYALTY> | Choices$ Permanent.YouCtrl | CounterType$ LOYALTY | CounterNum$ 1 | ChoiceOptional$ True | Planeswalker$ True | SubAbility$ DBExile | RememberAmount$ True | SpellDescription$ Remove a loyalty counter from each of any number of permanents you control. Exile that many cards from the top of your library. You may play them this turn.
SVar:DBExile:DB$ Dig | Defined$ You | DigNum$ Z | ChangeNum$ All | DestinationZone$ Exile | Imprint$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | ForgetOnMoved$ Exile | RememberObjects$ Imprinted | SubAbility$ DBCleanup
SVar:STPlay:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | MayPlay$ True | AffectedZone$ Exile | Description$ You may play them this turn.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True
SVar:Z:Count$RememberedNumber
DeckHints:Type$Planeswalker
Oracle:At the beginning of your end step, Chandra, Legacy of Fire deals X damage to each opponent, where X is the number of planeswalkers you control.\n[+1]:Add {R} for each planeswalker you control.\n[0]: Remove a loyalty counter from each of any number of permanents you control. Exile that many cards from the top of your library. You may play them this turn.
