2013-02-16 21:58:43 -08:00
|
|
|
[
|
|
|
|
new MagicBattalionTrigger() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(
|
|
|
|
final MagicGame game,
|
|
|
|
final MagicPermanent permanent,
|
|
|
|
final MagicPermanent attacker) {
|
|
|
|
return new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
this,
|
|
|
|
"Creatures PN controls are indestructible this turn."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(
|
|
|
|
final MagicGame game,
|
|
|
|
final MagicEvent event,
|
|
|
|
final Object[] choiceResults) {
|
|
|
|
final Collection<MagicPermanent> creatures=
|
|
|
|
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
|
|
|
|
for (final MagicPermanent creature : creatures) {
|
|
|
|
game.doAction(new MagicSetAbilityAction(creature,MagicAbility.Indestructible));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
new MagicPermanentActivation(
|
|
|
|
MagicActivation.NO_COND,
|
|
|
|
new MagicActivationHints(MagicTiming.Counter),
|
|
|
|
"Counter") {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public MagicEvent[] getCostEvent(final MagicPermanent source) {
|
|
|
|
return [new MagicSacrificeEvent(source)];
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
|
|
return new MagicEvent(
|
|
|
|
source,
|
|
|
|
MagicTargetChoice.NEG_TARGET_SPELL_WITH_X_COST,
|
|
|
|
this,
|
|
|
|
"Counter target spell\$ with {X} in its mana cost unless its controller pays {3}."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game,final MagicEvent event,final Object[] choiceResults) {
|
2013-03-20 06:30:04 -07:00
|
|
|
event.processTargetCardOnStack(game,choiceResults,new MagicCardOnStackAction() {
|
2013-02-16 21:58:43 -08:00
|
|
|
public void doAction(final MagicCardOnStack targetSpell) {
|
2013-02-26 21:18:13 -08:00
|
|
|
game.addEvent(new MagicCounterUnlessEvent(event.getSource(),targetSpell,MagicManaCost.create("{3}")));
|
2013-02-16 21:58:43 -08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|