48 lines
1.6 KiB
Groovy
48 lines
1.6 KiB
Groovy
[
|
|
new MagicStatic(
|
|
MagicLayer.ModPT,
|
|
MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL
|
|
) {
|
|
@Override
|
|
public void modPowerToughness(
|
|
final MagicPermanent source,
|
|
final MagicPermanent permanent,
|
|
final MagicPowerToughness pt) {
|
|
pt.add(5,5);
|
|
}
|
|
@Override
|
|
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
|
|
return source != target && source.getCounters(MagicCounterType.Charge) >= 7;
|
|
}
|
|
},
|
|
new MagicWhenAttacksTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
|
|
return creature.isFriend(permanent) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
new MagicSimpleMayChoice(
|
|
MagicSimpleMayChoice.ADD_CHARGE_COUNTER,
|
|
1,
|
|
MagicSimpleMayChoice.DEFAULT_YES
|
|
),
|
|
this,
|
|
"PN may\$ put a quest counter on SN."
|
|
) :
|
|
MagicEvent.NONE;
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
if (event.isYes()) {
|
|
game.doAction(new MagicChangeCountersAction(
|
|
event.getPermanent(),
|
|
MagicCounterType.Charge,
|
|
1,
|
|
true
|
|
));
|
|
}
|
|
}
|
|
}
|
|
]
|