magarena/release/Magarena/scripts/Tibalt__the_Fiend_Blooded.g...

58 lines
2.4 KiB
Groovy

[
new MagicPlaneswalkerActivation(1) {
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"PN draws a card, then discards a card at random."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicDrawAction(event.getPlayer()));
game.addEvent(MagicDiscardEvent.Random(event.getSource(), event.getPlayer()));
}
},
new MagicPlaneswalkerActivation(-4) {
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_PLAYER,
this,
"SN deals damage equal to the number of cards in target player's\$ hand to that player."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
final MagicDamage damage = new MagicDamage(event.getSource(), player, player.getHandSize());
game.doAction(new MagicDealDamageAction(damage));
}
});
}
},
new MagicPlaneswalkerActivation(-6) {
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"PN gains control of all creatures until end of turn. Untap them. They gain haste until end of turn."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final Collection<MagicPermanent> targets=
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE);
for (final MagicPermanent perm : targets) {
game.doAction(new MagicGainControlAction(event.getPlayer(),perm,MagicStatic.UntilEOT));
game.doAction(new MagicUntapAction(perm));
game.doAction(new MagicGainAbilityAction(perm,MagicAbility.Haste));
}
}
}
]