33 lines
1.2 KiB
Groovy
33 lines
1.2 KiB
Groovy
[
|
|
new MagicStatic(
|
|
MagicLayer.Ability,
|
|
MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL
|
|
) {
|
|
@Override
|
|
public void modAbilityFlags(final MagicPermanent source, final MagicPermanent permanent, final Set<MagicAbility> flags) {
|
|
flags.add(MagicAbility.Trample);
|
|
}
|
|
@Override
|
|
public boolean condition(final MagicGame game, final MagicPermanent source, final MagicPermanent target) {
|
|
return target.getCounters(MagicCounterType.PlusOne) > 0;
|
|
}
|
|
},
|
|
new MagicWhenOtherComesIntoPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicPermanent otherPermanent) {
|
|
if (otherPermanent != permanent &&
|
|
otherPermanent.isCreature() &&
|
|
otherPermanent.isFriend(permanent) &&
|
|
otherPermanent.hasSubType(MagicSubType.Warrior)) {
|
|
game.doAction(new MagicChangeCountersAction(
|
|
otherPermanent,
|
|
MagicCounterType.PlusOne,
|
|
1,
|
|
true
|
|
));
|
|
}
|
|
return MagicEvent.NONE;
|
|
}
|
|
}
|
|
]
|