add Thundercloud Shaman

master
ShawnieBoy 2015-06-08 15:11:52 +01:00
parent 756372b9c1
commit 7e2c2c1003
2 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,27 @@
def NON_GIANT_CREATURE = new MagicPermanentFilterImpl() {
public boolean accept(final MagicSource source,final MagicPlayer player,final MagicPermanent target) {
return target.hasType(MagicType.Creature) && target.hasSubType(MagicSubType.Giant) == false;
}
};
[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
return new MagicEvent(
permanent,
this,
"SN deals damage equal to the number of Giants PN controls to each non-Giant creature."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final int amount = player.getNrOfPermanents(MagicSubType.Giant);
game.logAppendValue(player, amount);
NON_GIANT_CREATURE.filter(event) each {
game.doAction(new DealDamageAction(event.getPermanent(), it, amount));
}
}
}
]

View File

@ -6,6 +6,6 @@ type=Creature
subtype=Giant,Shaman
cost={3}{R}{R}
pt=4/4
ability=When SN enters the battlefield, it deals damage equal to the number of Giants you control to each non-Giant creature.
timing=main
requires_groovy_code
oracle=When Thundercloud Shaman enters the battlefield, it deals damage equal to the number of Giants you control to each non-Giant creature.