replace card code for Essence Scatter with effect property in card script
parent
f42cc187ef
commit
6b7cffc7d2
|
@ -6,4 +6,4 @@ rarity=C
|
|||
type=Instant
|
||||
cost={1}{U}
|
||||
timing=counter
|
||||
requires_card_code
|
||||
effect=Counter target creature spell
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.MagicPlayer;
|
||||
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 Essence_Scatter {
|
||||
public static final MagicSpellCardEvent S = new MagicSpellCardEvent() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||
final MagicPlayer player=cardOnStack.getController();
|
||||
return new MagicEvent(
|
||||
cardOnStack.getCard(),
|
||||
player,
|
||||
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));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue