replace groovy code with ability in card script
parent
91ee2bf890
commit
cd75c5acb9
|
@ -29,41 +29,5 @@
|
|||
public int getTypeFlags(final MagicPermanent permanent,final int flags) {
|
||||
return flags|MagicType.Creature.getMask();
|
||||
}
|
||||
},
|
||||
new MagicPermanentActivation(
|
||||
new MagicActivationHints(MagicTiming.Pump),
|
||||
"Pump"
|
||||
) {
|
||||
|
||||
@Override
|
||||
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
||||
return [
|
||||
new MagicPayManaCostEvent(source,"{1}{G}"),
|
||||
new MagicSacrificePermanentEvent(
|
||||
source,
|
||||
new MagicTargetChoice("an Elf you control")
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
MagicTargetChoice.POS_TARGET_CREATURE,
|
||||
MagicPumpTargetPicker.create(),
|
||||
this,
|
||||
"Target creature\$ gets +3/+3 until end of turn."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent creature) {
|
||||
game.doAction(new MagicChangeTurnPTAction(creature,3,3));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -7,5 +7,6 @@ type=Creature
|
|||
subtype=Elf
|
||||
cost={3}{G}{G}
|
||||
pt=2/2
|
||||
ability=pay {1}{G}, Sacrifice an Elf: Target creature gets +3/+3 until end of turn.
|
||||
timing=main
|
||||
requires_groovy_code
|
||||
|
|
|
@ -444,6 +444,9 @@ public class MagicTargetChoice extends MagicChoice {
|
|||
public static final MagicTargetChoice SACRIFICE_BAT =
|
||||
new MagicTargetChoice("a Bat to sacrifice");
|
||||
|
||||
public static final MagicTargetChoice SACRIFICE_ELF =
|
||||
new MagicTargetChoice("an Elf to sacrifice");
|
||||
|
||||
public static final MagicTargetChoice SACRIFICE_BEAST =
|
||||
new MagicTargetChoice("a Beast to sacrifice");
|
||||
|
||||
|
|
|
@ -140,6 +140,8 @@ public abstract class MagicPermanentActivation extends MagicActivation<MagicPerm
|
|||
events.add(new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_BEAST));
|
||||
} else if (cost.equals("Sacrifice a land")) {
|
||||
events.add(new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_LAND));
|
||||
} else if (cost.equals("Sacrifice an Elf")) {
|
||||
events.add(new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_ELF));
|
||||
} else if (cost.equals("Discard a card")) {
|
||||
events.add(new MagicDiscardEvent(source));
|
||||
} else if (cost.equals("{E}")) {
|
||||
|
|
Loading…
Reference in New Issue