magarena/release/Magarena/scripts/Kher_Keep.groovy

39 lines
1.2 KiB
Groovy
Raw Normal View History

[
new MagicPermanentActivation(
[
MagicCondition.CAN_TAP_CONDITION,
MagicConditionFactory.ManaCost("{1}{R}")
],
new MagicActivationHints(MagicTiming.Token),
"Token"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
[
new MagicTapEvent(source),
new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.create("{1}{R}"))
];
}
@Override
public MagicEvent getPermanentEvent(
final MagicPermanent source,
final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"Put a 0/1 red Kobold creature token named Kobolds of Kher Keep onto the battlefield."
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] choiceResults) {
game.doAction(new MagicPlayTokenAction(
event.getPlayer(),
TokenCardDefinitions.get("Kobolds")
));
}
}
]