magarena/release/Magarena/scripts/Rakdos_Guildmage.groovy

60 lines
2.2 KiB
Groovy

[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Removal,true),
"-2/-2"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(source,"{3}{B}"),
new MagicDiscardEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_CREATURE,
new MagicWeakenTargetPicker(2,2),
this,
"Target creature\$ gets -2/-2 until end of turn."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicChangeTurnPTAction(creature,-2,-2));
}
});
}
},
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Token,true),
"Token"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [new MagicPayManaCostEvent(source,"{3}{R}")];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"PN puts a 2/1 red Goblin creature token with haste onto the battlefield. Exile it at the beginning of the next end step."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player=event.getPlayer();
final MagicCard card = MagicCard.createTokenCard(TokenCardDefinitions.get("Goblin2"),player);
game.doAction(new MagicPlayCardAction(
card,
player,
[MagicPlayMod.EXILE_AT_END_OF_TURN]
));
}
}
]