60 lines
2.3 KiB
Groovy
60 lines
2.3 KiB
Groovy
[
|
|
new MagicWhenOtherSpellIsCastTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
|
return (permanent.isFriend(cardOnStack) &&
|
|
cardOnStack.hasColor(MagicColor.Black)) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
new MagicMayChoice(
|
|
MagicTargetChoice.NEG_TARGET_CREATURE
|
|
),
|
|
MagicDestroyTargetPicker.Destroy,
|
|
this,
|
|
"PN may\$ destroy target creature\$ if it's tapped."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
if (event.isYes()) {
|
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
|
public void doAction(final MagicPermanent creature) {
|
|
if (creature.isTapped()) {
|
|
game.doAction(new MagicDestroyAction(creature));
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
},
|
|
new MagicWhenOtherSpellIsCastTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
|
return (permanent.isFriend(cardOnStack) &&
|
|
cardOnStack.hasColor(MagicColor.White)) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
new MagicMayChoice(
|
|
MagicTargetChoice.NEG_TARGET_CREATURE
|
|
),
|
|
MagicTapTargetPicker.Tap,
|
|
this,
|
|
"PN may\$ tap target creature\$."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
if (event.isYes()) {
|
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
|
public void doAction(final MagicPermanent creature) {
|
|
game.doAction(new MagicTapAction(creature,true));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
]
|