magarena/release/Magarena/scripts/Mindwrack_Liege.groovy

64 lines
2.4 KiB
Groovy

[
new MagicStatic(
MagicLayer.ModPT,
MagicTargetFilter.TARGET_BLUE_CREATURE_YOU_CONTROL) {
@Override
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
pt.add(1,1);
}
@Override
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
return source != target;
}
},
new MagicStatic(
MagicLayer.ModPT,
MagicTargetFilter.TARGET_RED_CREATURE_YOU_CONTROL) {
@Override
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
pt.add(1,1);
}
@Override
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
return source != target;
}
},
new MagicPermanentActivation(
[MagicConditionFactory.ManaCost("{U/R}{U/R}{U/R}{U/R}")],
new MagicActivationHints(MagicTiming.Token),
"Put"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(
source,
source.getController(),
MagicManaCost.create("{U/R}{U/R}{U/R}{U/R}")
)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.TARGET_BLUE_OR_RED_CREATURE_CARD_FROM_HAND,
new MagicGraveyardTargetPicker(true),
this,
"Put a blue or red creature card\$ from your hand onto the battlefield."
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
event.processTargetCard(game,new MagicCardAction() {
public void doAction(final MagicCard card) {
game.doAction(new MagicRemoveCardAction(card,MagicLocationType.OwnersHand));
game.doAction(new MagicPlayCardAction(card,event.getPlayer(),MagicPlayCardAction.NONE));
}
});
}
}
]