57 lines
2.0 KiB
Groovy
57 lines
2.0 KiB
Groovy
[
|
|
new MagicPermanentActivation(
|
|
new MagicActivationHints(MagicTiming.Pump),
|
|
"Add") {
|
|
|
|
@Override
|
|
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
|
return [new MagicTapEvent(source)];
|
|
}
|
|
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
this,
|
|
"Put a +1/+1 counter on SN."
|
|
);
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicChangeCountersAction(event.getPermanent(),MagicCounterType.PlusOne,1,true));
|
|
}
|
|
},
|
|
new MagicPermanentActivation(
|
|
new MagicActivationHints(MagicTiming.Pump),
|
|
"Remove"
|
|
) {
|
|
@Override
|
|
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
|
return [
|
|
new MagicTapEvent(source),
|
|
new MagicRemoveCounterEvent(source,MagicCounterType.PlusOne,1)
|
|
];
|
|
}
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
this,
|
|
"Put a +1/+1 counter on each other creature you control."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
final MagicPermanent creature = event.getPermanent();
|
|
final Collection<MagicPermanent> targets =
|
|
game.filterPermanents(creature.getController(),MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
|
|
for (final MagicPermanent target : targets) {
|
|
if (target != creature) {
|
|
game.doAction(new MagicChangeCountersAction(target,MagicCounterType.PlusOne,1,true));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|