46 lines
1.6 KiB
Groovy
46 lines
1.6 KiB
Groovy
def PT = new MagicStatic(MagicLayer.SetPT, MagicStatic.UntilEOT) {
|
|
@Override
|
|
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
|
|
pt.set(4,4);
|
|
}
|
|
};
|
|
|
|
def AB = new MagicStatic(MagicLayer.Ability, MagicStatic.UntilEOT) {
|
|
@Override
|
|
public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
|
|
flags.add(MagicAbility.Flying);
|
|
}
|
|
};
|
|
|
|
def ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) {
|
|
@Override
|
|
public void modSubTypeFlags(final MagicPermanent permanent,final Set<MagicSubType> flags) {
|
|
flags.add(MagicSubType.Illusion);
|
|
}
|
|
@Override
|
|
public int getTypeFlags(final MagicPermanent permanent,final int flags) {
|
|
return flags|MagicType.Creature.getMask();
|
|
}
|
|
};
|
|
|
|
[
|
|
new MagicWhenOtherSpellIsCastTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack cardOnStack) {
|
|
return (permanent.isFriend(cardOnStack) &&
|
|
cardOnStack.hasType(MagicType.Creature)) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
this,
|
|
"SN becomes a 4/4 Illusion creature with flying until end of turn. " +
|
|
"It's still an enchantment."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicBecomesCreatureAction(event.getPermanent(),PT,AB,ST));
|
|
}
|
|
}
|
|
]
|