62 lines
2.0 KiB
Groovy
62 lines
2.0 KiB
Groovy
|
[
|
||
|
new MagicPermanentActivation(
|
||
|
[
|
||
|
MagicCondition.CAN_TAP_CONDITION,
|
||
|
MagicConditionFactory.ChargeCountersAtLeast(4),
|
||
|
MagicConditionFactory.ManaCost("{2}")
|
||
|
],
|
||
|
new MagicActivationHints(MagicTiming.Draw),
|
||
|
"Draw"
|
||
|
) {
|
||
|
|
||
|
@Override
|
||
|
public MagicEvent[] getCostEvent(final MagicPermanent source) {
|
||
|
return [
|
||
|
new MagicPayManaCostTapEvent(source,"{2}"),
|
||
|
new MagicRemoveCounterEvent(
|
||
|
source,
|
||
|
MagicCounterType.Charge,
|
||
|
4
|
||
|
)
|
||
|
];
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
|
||
|
return new MagicEvent(
|
||
|
source,
|
||
|
this,
|
||
|
"PN gains 2 life and draws a card"
|
||
|
);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||
|
game.doAction(new MagicChangeLifeAction(event.getPlayer(),2));
|
||
|
game.doAction(new MagicDrawAction(event.getPlayer(),1));
|
||
|
}
|
||
|
},
|
||
|
new MagicWhenDamageIsDealtTrigger() {
|
||
|
@Override
|
||
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
||
|
return permanent.isController(damage.getTarget()) ?
|
||
|
new MagicEvent(
|
||
|
permanent,
|
||
|
damage.getDealtAmount(),
|
||
|
this,
|
||
|
"Put RN charge counters on SN."
|
||
|
):
|
||
|
MagicEvent.NONE;
|
||
|
}
|
||
|
@Override
|
||
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||
|
game.doAction(new MagicChangeCountersAction(
|
||
|
event.getPermanent(),
|
||
|
MagicCounterType.Charge,
|
||
|
event.getRefInt(),
|
||
|
false
|
||
|
));
|
||
|
}
|
||
|
}
|
||
|
]
|