magarena/release/Magarena/scripts/Memnarch.groovy

69 lines
2.2 KiB
Groovy

[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Removal),
"Artifact"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(source, "{1}{U}{U}")
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_PERMANENT,
MagicExileTargetPicker.create(),
this,
"Target permanent\$ becomes an artifact in addition to its other types."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicAddStaticAction(creature, MagicStatic.Artifact));
}
});
}
},
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Removal),
"Control"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(source, "{3}{U}")
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_ARTIFACT,
MagicExileTargetPicker.create(),
this,
"Gain control of target artifact\$."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game, {
final MagicPermanent perm ->
game.doAction(new MagicGainControlAction(
event.getPlayer(),
perm
));
} as MagicPermanentAction);
}
}
]