Martyrdom
Name:Martyrdom
ManaCost:1 W W
Types:Instant
A:SP$ Pump | Cost$ 1 W W | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | SubAbility$ DBAnimate | SpellDescription$ Until end of turn, target creature you control gains "0: The next 1 damage that would be dealt to target creature or player this turn is dealt to this creature instead." Only you may activate this ability.
SVar:DBAnimate:DB$Animate | Abilities$ ABRedirect | Defined$ Targeted | sVars$ SelflessCombat,SelflessNonCombat,CombatDmg,NonCombatDmg,RestDmgCombat,RestDmg,OutOfSight,ExileEffect,X,Y
SVar:ABRedirect:AB$ Effect | Name$ Martyrdom's Effect | Cost$ 0 | ValidTgts$ Creature.YouCtrl,Player | TgtPrompt$ Select target creature or player to redirect damage from | ReplacementEffects$ SelflessCombat,SelflessNonCombat | Triggers$ OutOfSight | SVars$ CombatDmg,NonCombatDmg,RestDmgCombat,RestDmg,ExileEffect,X,Y | References$ SelflessCombat,SelflessNonCombat,OutOfSight,CombatDmg,NonCombatDmg,RestDmgCombat,RestDmg,ExileEffect,X,Y | RememberObjects$ Targeted | SpellDescription$ The next 1 damage that would be dealt to target creature or player this turn is dealt to this creature instead.
SVar:SelflessCombat:Event$ DamageDone | ValidTarget$ Card.IsRemembered,Player.IsRemembered | IsCombat$ True | ReplaceWith$ CombatDmg | Description$ The next 1 damage that would be dealt to target creature or player this turn is dealt to this creature instead.
SVar:SelflessNonCombat:Event$ DamageDone | ValidTarget$ Card.IsRemembered,Player.IsRemembered | IsCombat$ False | ReplaceWith$ NonCombatDmg | Secondary$ True | Description$ The next 1 damage that would be dealt to target creature or player this turn is dealt to this creature instead.
SVar:CombatDmg:AB$ DealDamage | Cost$ 0 | Defined$ EffectSource | DamageSource$ ReplacedSource | CombatDamage$ True | NumDmg$ 1 | SubAbility$ RestDmgCombat | ConditionCheckSVar$ Y | ConditionSVarCompare$ GE1
SVar:NonCombatDmg:AB$ DealDamage | Cost$ 0 | Defined$ EffectSource | DamageSource$ ReplacedSource | NumDmg$ 1 | SubAbility$ RestDmg | ConditionCheckSVar$ Y | ConditionSVarCompare$ GE1
SVar:RestDmgCombat:DB$ DealDamage | Defined$ Remembered | DamageSource$ ReplacedSource | CombatDamage$ True | NumDmg$ X | SubAbility$ ExileEffect
SVar:RestDmg:DB$ DealDamage | Defined$ Remembered | DamageSource$ ReplacedSource | NumDmg$ X | SubAbility$ ExileEffect
SVar:OutOfSight:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Creature.IsRemembered | Execute$ ExileEffect | Static$ True
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile | Static$ True
SVar:X:ReplaceCount$DamageAmount/Minus.1
SVar:Y:ReplaceCount$DamageAmount
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/martyrdom.jpg
Oracle:Until end of turn, target creature you control gains "{0}: The next 1 damage that would be dealt to target creature or player this turn is dealt to this creature instead." Only you may activate this ability.
SetInfo:ALL Common
