2013-05-30 19:59:31 -07:00
|
|
|
[
|
|
|
|
new MagicPermanentActivation(
|
|
|
|
new MagicActivationHints(MagicTiming.Removal),
|
|
|
|
"Damage"
|
|
|
|
) {
|
|
|
|
@Override
|
|
|
|
public MagicEvent[] getCostEvent(final MagicPermanent source) {
|
|
|
|
return [new MagicTapEvent(source)];
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
|
|
return new MagicEvent(
|
|
|
|
source,
|
|
|
|
this,
|
|
|
|
"SN deals 1 damage to itself."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
final MagicPermanent permanent=event.getPermanent();
|
|
|
|
final MagicDamage damage=new MagicDamage(permanent,permanent,1);
|
|
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
|
|
}
|
|
|
|
},
|
|
|
|
new MagicWhenDamageIsDealtTrigger() {
|
|
|
|
@Override
|
2013-06-23 18:29:26 -07:00
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
2013-07-08 19:52:50 -07:00
|
|
|
return damage.getTarget() == permanent ?
|
|
|
|
new MagicEvent(
|
2013-05-30 19:59:31 -07:00
|
|
|
permanent,
|
2013-07-08 19:52:50 -07:00
|
|
|
damage.getDealtAmount(),
|
2013-05-30 19:59:31 -07:00
|
|
|
this,
|
2013-07-08 19:52:50 -07:00
|
|
|
"SN deals RN damage to ${permanent.getChosenPlayer()}."
|
|
|
|
) :
|
|
|
|
MagicEvent.NONE;
|
2013-05-30 19:59:31 -07:00
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
final MagicDamage damage = new MagicDamage(
|
|
|
|
event.getPermanent(),
|
2013-07-08 19:52:50 -07:00
|
|
|
event.getPermanent().getChosenPlayer(),
|
2013-05-30 19:59:31 -07:00
|
|
|
event.getRefInt()
|
|
|
|
);
|
|
|
|
game.doAction(new MagicDealDamageAction(damage));
|
|
|
|
}
|
|
|
|
}
|
2013-05-30 20:26:35 -07:00
|
|
|
]
|