magarena/release/Magarena/scripts/Bloodshot_Cyclops.groovy

37 lines
1.3 KiB
Groovy
Raw Normal View History

2013-08-24 04:31:28 -07:00
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Removal),
"Damage"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
2013-08-24 04:31:28 -07:00
return [
2013-09-02 07:04:31 -07:00
new MagicTapEvent(source),
new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_CREATURE)
2013-08-24 04:31:28 -07:00
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
payedCost.getTarget(),
this,
"SN deals damage equal to the power of RN to target creature or player\$."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTarget(game,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
final MagicPermanent sacrificed=event.getRefPermanent();
final MagicDamage damage=new MagicDamage(event.getSource(),target,sacrificed.getPower());
game.doAction(new MagicDealDamageAction(damage));
}
});
}
}
]