magarena/release/Magarena/scripts/New_Prahv_Guildmage.groovy

68 lines
2.4 KiB
Groovy
Raw Normal View History

2013-02-17 04:24:28 -08:00
[
new MagicPermanentActivation(
[MagicConditionFactory.ManaCost("{W}{U}")],
2013-02-17 04:24:28 -08:00
new MagicActivationHints(MagicTiming.Pump,true),
"Flying"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.create("{W}{U}"))];
2013-02-17 04:24:28 -08:00
}
@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,
2013-03-22 22:00:53 -07:00
final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
2013-02-17 04:24:28 -08:00
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicSetAbilityAction(creature,MagicAbility.Flying));
}
});
}
},
new MagicPermanentActivation(
[MagicConditionFactory.ManaCost("{3}{W}{U}")],
2013-02-17 04:24:28 -08:00
new MagicActivationHints(MagicTiming.FirstMain,true),
"Detain"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.create("{3}{W}{U}"))];
2013-02-17 04:24:28 -08:00
}
@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,
2013-03-22 22:00:53 -07:00
final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
2013-02-17 04:24:28 -08:00
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicDetainAction(creature));
}
});
}
}
]