Menu

Submission for Rhys the Exiled

135

Config

name=Rhys the Exiled
image=http://mtgimage.com/card/rhys%20the%20exiled.jpg
value=2.500
rarity=R
type=Legendary,Creature
subtype=Elf,Warrior
cost={2}{G}
pt=3/2
ability={B}, Sacrifice an Elf: Regenerate SN.
timing=main
requires_groovy_code
oracle=Whenever Rhys the Exiled attacks, you gain 1 life for each Elf you control. {B}, Sacrifice an Elf: Regenerate Rhys the Exiled.

Script

[
    new MagicWhenSelfAttacksTrigger() {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent attacker) {
            return new MagicEvent(
                permanent,
                this,
                "PN gains 1 life for each Elf PN controls."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final int amount = event.getPlayer().getNrOfPermanents(MagicSubType.Elf);
            game.doAction(new MagicChangeLifeAction(event.getPlayer(),amount));
        }
    }
]
Pushed