Name:Mourner's Shield
ManaCost:4
Types:Artifact
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | OptionalDecider$ You | TriggerDescription$ Imprint — When CARDNAME enters, you may exile target card from a graveyard.
SVar:TrigExile:DB$ ChangeZone | Origin$ Graveyard | Destination$ Exile | ValidTgts$ Card | Imprint$ True
A:AB$ ChooseSource | Cost$ 2 T | Choices$ Card.SharesColorWith Imprinted | ChoiceTitle$ Choose a source that shares a color with the exiled card | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ Prevent all damage that would be dealt this turn by a source of your choice that shares a color with the exiled card.
SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPrevent | RememberObjects$ Remembered | SubAbility$ DBCleanup
SVar:RPrevent:Event$ DamageDone | Prevent$ True | ActiveZones$ Command | ValidSource$ Card.IsRemembered | Description$ Prevent all damage that would be dealt by a source of your choice that shares a color with the exiled card.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
T:Mode$ ChangesZone | Origin$ Battlefield | ValidCard$ Card.Self | Destination$ Any | Execute$ DBCleanImprinted | Static$ True
SVar:DBCleanImprinted:DB$ Cleanup | ClearImprinted$ True
Oracle:Imprint — When Mourner's Shield enters, you may exile target card from a graveyard.\n{2}, {T}: Prevent all damage that would be dealt this turn by a source of your choice that shares a color with the exiled card.
