replace card code for Remove Soul with effect property in card script

master
melvin 2012-08-26 23:09:38 +08:00
parent 0679bf553e
commit f42cc187ef
3 changed files with 2 additions and 40 deletions

View File

@ -6,4 +6,4 @@ rarity=C
type=Instant
cost={1}{U}
timing=counter
requires_card_code
effect=Counter target creature spell

View File

@ -1,39 +0,0 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPayedCost;
import magic.model.action.MagicCardOnStackAction;
import magic.model.action.MagicCounterItemOnStackAction;
import magic.model.action.MagicMoveCardAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicEvent;
import magic.model.event.MagicSpellCardEvent;
import magic.model.stack.MagicCardOnStack;
public class Remove_Soul {
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_CREATURE_SPELL,
new Object[]{cardOnStack},
this,
"Counter target creature spell$.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
game.doAction(new MagicMoveCardAction((MagicCardOnStack)data[0]));
event.processTargetCardOnStack(game,choiceResults,0,new MagicCardOnStackAction() {
public void doAction(final MagicCardOnStack targetSpell) {
game.doAction(new MagicCounterItemOnStackAction(targetSpell));
}
});
}
};
}

View File

@ -517,6 +517,7 @@ public class MagicTargetChoice extends MagicChoice {
factory.put("neg target spell", NEG_TARGET_SPELL);
factory.put("neg target red or green spell", NEG_TARGET_RED_GREEN_SPELL);
factory.put("neg target noncreature spell", NEG_TARGET_NONCREATURE_SPELL);
factory.put("neg target creature spell", NEG_TARGET_CREATURE_SPELL);
}
public static MagicTargetChoice build(String arg) {