replace card code for Victim of Night with effect property in card script
parent
7fe22821e9
commit
6035f493a1
|
@ -8,4 +8,4 @@ rarity=C
|
|||
type=Instant
|
||||
cost={B}{B}
|
||||
timing=removal
|
||||
requires_card_code
|
||||
effect=Destroy target non-Vampire, non-Werewolf, non-Zombie creature
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.action.MagicDestroyAction;
|
||||
import magic.model.action.MagicMoveCardAction;
|
||||
import magic.model.action.MagicPermanentAction;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicSpellCardEvent;
|
||||
import magic.model.stack.MagicCardOnStack;
|
||||
import magic.model.target.MagicDestroyTargetPicker;
|
||||
|
||||
public class Victim_of_Night {
|
||||
public static final MagicSpellCardEvent S = new MagicSpellCardEvent() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
cardOnStack.getCard(),
|
||||
cardOnStack.getController(),
|
||||
MagicTargetChoice.NEG_TARGET_NONVAMPIRE_NONWEREWOLF_NONZOMBIE,
|
||||
new MagicDestroyTargetPicker(false),
|
||||
new Object[]{cardOnStack},
|
||||
this,
|
||||
"Destroy target non-Vampire, non-Werewolf, non-Zombie creature$.");
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] data,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicMoveCardAction((MagicCardOnStack)data[0]));
|
||||
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent creature) {
|
||||
game.doAction(new MagicDestroyAction(creature));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
|
@ -511,6 +511,8 @@ public class MagicTargetChoice extends MagicChoice {
|
|||
factory.put("neg target enchantment ", NEG_TARGET_ENCHANTMENT);
|
||||
factory.put("neg target creature with power 4 or greater", NEG_TARGET_CREATURE_POWER_4_OR_MORE);
|
||||
factory.put("neg target creature with flying", NEG_TARGET_CREATURE_WITH_FLYING);
|
||||
factory.put("neg target non-vampire, non-werewolf, non-zombie creature", NEG_TARGET_NONVAMPIRE_NONWEREWOLF_NONZOMBIE);
|
||||
|
||||
}
|
||||
|
||||
public static MagicTargetChoice build(String arg) {
|
||||
|
|
Loading…
Reference in New Issue