replace card code for Doom Blade with effect property in card script
parent
1d4c07e8de
commit
2f9325429e
|
@ -7,4 +7,4 @@ rarity=C
|
|||
type=Instant
|
||||
cost={1}{B}
|
||||
timing=removal
|
||||
requires_card_code
|
||||
effect=Destroy target nonblack 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 Doom_Blade {
|
||||
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_NONBLACK_CREATURE,
|
||||
new MagicDestroyTargetPicker(false),
|
||||
new Object[]{cardOnStack},
|
||||
this,
|
||||
"Destroy target nonblack 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));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
|
@ -499,6 +499,7 @@ public class MagicTargetChoice extends MagicChoice {
|
|||
factory.put("neg target creature or enchantment", NEG_TARGET_CREATURE_OR_ENCHANTMENT);
|
||||
factory.put("neg target nonartifact creature", NEG_TARGET_NONARTIFACT_CREATURE);
|
||||
factory.put("neg target human creature", NEG_TARGET_HUMAN_CREATURE);
|
||||
factory.put("neg target nonblack creature", NEG_TARGET_NONBLACK_CREATURE);
|
||||
factory.put("neg target noncreature permanent", NEG_TARGET_NONCREATURE);
|
||||
factory.put("neg target land", NEG_TARGET_LAND);
|
||||
factory.put("neg target artifact, enchantment, or land", NEG_TARGET_ARTIFACT_OR_ENCHANTMENT_OR_LAND);
|
||||
|
|
Loading…
Reference in New Issue