replace groovy code with card script
parent
c5d0ad70bc
commit
b01279223c
|
@ -1,34 +0,0 @@
|
|||
def NON_ELF_CREATURE = new MagicPermanentFilterImpl() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
|
||||
return target.isCreature() &&
|
||||
!target.hasSubType(MagicSubType.Elf);
|
||||
}
|
||||
};
|
||||
|
||||
def TARGET_NON_ELF_CREATURE = new MagicTargetChoice(
|
||||
NON_ELF_CREATURE,
|
||||
MagicTargetHint.Negative,
|
||||
"target non-Elf creature"
|
||||
);
|
||||
|
||||
[
|
||||
new MagicSpellCardEvent() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
cardOnStack,
|
||||
TARGET_NON_ELF_CREATURE,
|
||||
MagicDestroyTargetPicker.Destroy,
|
||||
this,
|
||||
"Destroy target non-Elf creature\$."
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game, {
|
||||
final MagicPermanent creature ->
|
||||
game.doAction(new MagicDestroyAction(creature));
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
|
@ -6,5 +6,5 @@ rarity=C
|
|||
type=Tribal,Instant
|
||||
subtype=Elf
|
||||
cost={2}{B}
|
||||
effect=Destroy target non-Elf creature.
|
||||
timing=removal
|
||||
requires_groovy_code
|
||||
|
|
|
@ -610,6 +610,13 @@ public class MagicTargetFilterFactory {
|
|||
}
|
||||
};
|
||||
|
||||
public static final MagicPermanentFilterImpl NONELF_CREATURE = new MagicPermanentFilterImpl() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
|
||||
return target.isCreature() &&
|
||||
!target.hasSubType(MagicSubType.Elf);
|
||||
}
|
||||
};
|
||||
|
||||
public static final MagicPermanentFilterImpl NONENCHANTMENT_CREATURE = new MagicPermanentFilterImpl() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
|
||||
return target.isCreature() &&
|
||||
|
@ -1588,6 +1595,7 @@ public class MagicTargetFilterFactory {
|
|||
single.put("non-Demon creature", NON_DEMON_CREATURE);
|
||||
single.put("non-Zombie creature", NONZOMBIE_CREATURE);
|
||||
single.put("non-Human creature", NONHUMAN_CREATURE);
|
||||
single.put("non-Elf creature", NONELF_CREATURE);
|
||||
single.put("non-Vampire, non-Werewolf, non-Zombie creature", NONVAMPIRE_NONWEREWOLF_NONZOMBIE_CREATURE);
|
||||
single.put("Skeleton, Vampire, or Zombie", SKELETON_VAMPIRE_OR_ZOMBIE);
|
||||
single.put("noncreature", NONCREATURE);
|
||||
|
|
Loading…
Reference in New Issue