88 lines
2.9 KiB
Groovy
88 lines
2.9 KiB
Groovy
[
|
|
new MagicWhenOtherComesIntoPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(
|
|
final MagicGame game,
|
|
final MagicPermanent permanent,
|
|
final MagicPermanent otherPermanent) {
|
|
return (otherPermanent != permanent &&
|
|
otherPermanent.isCreature() &&
|
|
otherPermanent.isFriend(permanent) &&
|
|
otherPermanent.hasSubType(MagicSubType.Human)) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
this,
|
|
"Untap SN."
|
|
) :
|
|
MagicEvent.NONE;
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicUntapAction(event.getPermanent()));
|
|
}
|
|
},
|
|
new MagicPermanentActivation(
|
|
new MagicActivationHints(MagicTiming.Tapping),
|
|
"Tap"
|
|
) {
|
|
@Override
|
|
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
|
return [
|
|
new MagicPayManaCostTapEvent(source,"{1}{U}")
|
|
];
|
|
}
|
|
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
MagicTargetChoice.NEG_TARGET_PERMANENT,
|
|
MagicTapTargetPicker.Tap,
|
|
this,
|
|
"Tap target permanent\$."
|
|
);
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
|
public void doAction(final MagicPermanent creature) {
|
|
game.doAction(new MagicTapAction(creature, true));
|
|
}
|
|
});
|
|
}
|
|
},
|
|
new MagicPermanentActivation(
|
|
new MagicActivationHints(MagicTiming.Tapping),
|
|
"Untap"
|
|
) {
|
|
@Override
|
|
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
|
return [
|
|
new MagicPayManaCostTapEvent(source,"{1}{U}")
|
|
];
|
|
}
|
|
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
MagicTargetChoice.POS_TARGET_PERMANENT,
|
|
MagicTapTargetPicker.Untap,
|
|
this,
|
|
"Untap target permanent\$."
|
|
);
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
|
public void doAction(final MagicPermanent creature) {
|
|
game.doAction(new MagicUntapAction(creature));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
]
|