magarena/release/Magarena/scripts/Captain_of_the_Watch.groovy

47 lines
1.6 KiB
Groovy
Raw Normal View History

2013-05-28 01:37:27 -07:00
[
new MagicStatic(
2013-06-23 18:29:26 -07:00
MagicLayer.ModPT,
2013-05-28 01:37:27 -07:00
MagicTargetFilter.TARGET_SOLDIER_YOU_CONTROL
) {
@Override
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
pt.add(1,1);
}
@Override
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
return source != target;
}
},
new MagicStatic(
2013-06-23 18:29:26 -07:00
MagicLayer.Ability,
2013-05-28 01:37:27 -07:00
MagicTargetFilter.TARGET_SOLDIER_YOU_CONTROL
) {
@Override
public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
flags.add(MagicAbility.Vigilance);
}
@Override
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
return source != target;
}
},
new MagicWhenComesIntoPlayTrigger() {
@Override
2013-06-19 07:23:35 -07:00
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
2013-05-28 01:37:27 -07:00
return new MagicEvent(
permanent,
this,
"PN puts three 1/1 white Soldier creature tokens onto the battlefield."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicPlayTokensAction(
event.getPlayer(),
TokenCardDefinitions.get("Soldier"),
3
));
2013-06-23 18:29:26 -07:00
}
2013-05-28 01:37:27 -07:00
}
]