magarena/release/Magarena/scripts/New_Prahv_Guildmage.groovy

62 lines
2.2 KiB
Groovy

[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Pump,true),
"Flying"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [new MagicPayManaCostEvent(source,"{W}{U}")];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.POS_TARGET_CREATURE,
MagicFlyingTargetPicker.create(),
this,
"Target creature\$ gains flying 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 MagicGainAbilityAction(creature,MagicAbility.Flying));
}
});
}
},
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.FirstMain,true),
"Detain"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [new MagicPayManaCostEvent(source,"{3}{W}{U}")];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.TARGET_NONLAND_PERMANENT_YOUR_OPPONENT_CONTROLS,
new MagicNoCombatTargetPicker(true,true,false),
this,
"Detain target nonland permanent\$ an opponent controls."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicDetainAction(event.getPlayer(), creature));
}
});
}
}
]