Add script for Elvish Healer
parent
5481e64c68
commit
0cbd8d64b0
|
@ -0,0 +1,34 @@
|
|||
[
|
||||
new MagicPermanentActivation(
|
||||
new MagicActivationHints(MagicTiming.Pump),
|
||||
"Prevent"
|
||||
) {
|
||||
|
||||
@Override
|
||||
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
||||
return [new MagicTapEvent(source)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
MagicTargetChoice.POS_TARGET_CREATURE_OR_PLAYER,
|
||||
MagicPreventTargetPicker.getInstance(),
|
||||
this,
|
||||
"Prevent the next 1 damage that would be dealt to target creature or player\$ this turn. " +
|
||||
"If that creature is green, prevent 2 damage instead."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTarget(game,new MagicTargetAction() {
|
||||
public void doAction(final MagicTarget target) {
|
||||
final int amount = (target.isCreature() && target.hasColor(MagicColor.Green))? 2 : 1;
|
||||
game.doAction(new MagicPreventDamageAction(target,amount));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
|
@ -0,0 +1,11 @@
|
|||
name=Elvish Healer
|
||||
url=http://magiccards.info/ia/en/246.html
|
||||
image=http://magiccards.info/scans/en/ia/246.jpg
|
||||
value=2.406
|
||||
rarity=C
|
||||
cost={2}{W}
|
||||
type=Creature
|
||||
subtype=Elf,Cleric
|
||||
timing=main
|
||||
pt=1/2
|
||||
requires_groovy_code
|
Loading…
Reference in New Issue