51 lines
1.6 KiB
Groovy
51 lines
1.6 KiB
Groovy
[
|
|
new MagicWhenOtherComesIntoPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(
|
|
final MagicGame game,
|
|
final MagicPermanent permanent,
|
|
final MagicPermanent otherPermanent) {
|
|
return (otherPermanent == permanent || otherPermanent.isArtifact()) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
this,
|
|
"PN puts a charge counter on SN."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicChangeCountersAction(event.getPermanent(),MagicCounterType.Charge,1,true));
|
|
}
|
|
},
|
|
new MagicPermanentActivation(
|
|
new MagicActivationHints(MagicTiming.Draw),
|
|
"Draw"
|
|
) {
|
|
@Override
|
|
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
|
return [
|
|
new MagicPayManaCostTapEvent(source,"{3}"),
|
|
new MagicRemoveCounterEvent(
|
|
source,
|
|
MagicCounterType.Charge,
|
|
1
|
|
)
|
|
];
|
|
}
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
this,
|
|
"PN draws a card"
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicDrawAction(event.getPlayer()));
|
|
}
|
|
}
|
|
]
|