50 lines
1.9 KiB
Groovy
50 lines
1.9 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(1,1);
|
|
}
|
|
};
|
|
def AB = new MagicStatic(MagicLayer.Ability, MagicStatic.UntilEOT) {
|
|
@Override
|
|
public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
|
|
flags.clear();
|
|
}
|
|
};
|
|
def ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) {
|
|
@Override
|
|
public void modSubTypeFlags(final MagicPermanent permanent,final Set<MagicSubType> flags) {
|
|
flags.removeAll(MagicSubType.ALL_CREATURES);
|
|
flags.add(MagicSubType.Frog);
|
|
}
|
|
};
|
|
def C = new MagicStatic(MagicLayer.Color, MagicStatic.UntilEOT) {
|
|
@Override
|
|
public int getColorFlags(final MagicPermanent permanent,final int flags) {
|
|
return MagicColor.Blue.getMask();
|
|
}
|
|
};
|
|
[
|
|
new MagicSpellCardEvent() {
|
|
@Override
|
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
cardOnStack,
|
|
MagicTargetChoice.TARGET_CREATURE,
|
|
new MagicBecomeTargetPicker(1,1,false),
|
|
this,
|
|
"Target creature\$ loses all abilities " +
|
|
"and becomes a 1/1 blue Frog until end of turn."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
event.processTargetPermanent(game, {
|
|
final MagicPermanent creature ->
|
|
//Does not lose static or triggers
|
|
game.doAction(new MagicGainAbilityAction(creature,MagicAbility.CantActivateAbilities));
|
|
game.doAction(new MagicBecomesCreatureAction(creature,PT,AB,ST,C));
|
|
} as MagicPermanentAction);
|
|
}
|
|
}
|
|
]
|