Menu

Submission for Samite Censer-Bearer

15

Config

name=Samite Censer-Bearer
image=http://mtgimage.com/card/samite%20censer-bearer.jpg
value=2.500
rarity=C
type=Creature
subtype=Human,Rebel,Cleric
cost={W}
pt=1/1
timing=main
requires_groovy_code
oracle={W}, Sacrifice Samite Censer-Bearer: Prevent the next 1 damage that would be dealt to each creature you control this turn.

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Pump),
        "Prevent"
    ) {
        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [
                new MagicPayManaCostSacrificeEvent(source, "{W}")
            ];
        }
        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                this,
                "Prevent the next 1 damage that would be dealt to each creature you control this turn."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final Collection<MagicPermanent> targets=
                game.filterPermanents(event.getPlayer(),MagicTargetFilterFactory.CREATURE_YOU_CONTROL);
            for (final MagicPermanent creature : targets) {
                game.doAction(new MagicPreventDamageAction(creature,1));
            }
        }
    }
]
Pushed