107 lines
3.6 KiB
Groovy
107 lines
3.6 KiB
Groovy
[
|
|
// equipped creature gets +2/+2 until end of turn
|
|
new MagicPermanentActivation(
|
|
new MagicActivationHints(MagicTiming.Pump),
|
|
"+2/+2"
|
|
) {
|
|
@Override
|
|
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
|
return [
|
|
new MagicRemoveCounterEvent(source,MagicCounterType.Charge,1)
|
|
];
|
|
}
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
source.getEquippedCreature(),
|
|
this,
|
|
"RN gets +2/+2 until end of turn."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicChangeTurnPTAction(event.getRefPermanent(),2,2));
|
|
}
|
|
},
|
|
// target creature gets -1/-1 until end of turn
|
|
new MagicPermanentActivation(
|
|
new MagicActivationHints(MagicTiming.Removal),
|
|
"-1/-1"
|
|
) {
|
|
@Override
|
|
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
|
return [
|
|
new MagicRemoveCounterEvent(source,MagicCounterType.Charge,1)
|
|
];
|
|
}
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
MagicTargetChoice.NEG_TARGET_CREATURE,
|
|
new MagicWeakenTargetPicker(1,1),
|
|
this,
|
|
"Target creature\$ gets -1/-1 until end of turn."
|
|
);
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetPermanent(game,new MagicPermanentAction() {
|
|
public void doAction(final MagicPermanent creature) {
|
|
game.doAction(new MagicChangeTurnPTAction(creature,-1,-1));
|
|
}
|
|
});
|
|
}
|
|
},
|
|
|
|
// you gain 2 life
|
|
new MagicPermanentActivation(
|
|
new MagicActivationHints(MagicTiming.Pump),
|
|
"Life+2"
|
|
) {
|
|
@Override
|
|
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
|
return [
|
|
new MagicRemoveCounterEvent(source,MagicCounterType.Charge,1)
|
|
];
|
|
}
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
this,
|
|
"PN gains 2 life."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicChangeLifeAction(event.getPlayer(),2));
|
|
}
|
|
},
|
|
|
|
new MagicWhenDamageIsDealtTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
|
return (damage.getSource() == permanent.getEquippedCreature() &&
|
|
damage.isCombat()) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
this,
|
|
"Put two charge counters on SN."
|
|
) :
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicChangeCountersAction(
|
|
event.getPermanent(),
|
|
MagicCounterType.Charge,
|
|
2,
|
|
true
|
|
));
|
|
}
|
|
}
|
|
]
|