added Frightful Delusion
parent
4f674717a7
commit
052fa1c671
|
@ -4288,6 +4288,16 @@ cost={3}{U}
|
|||
pt=1/6
|
||||
timing=main
|
||||
|
||||
>Frightful Delusion
|
||||
image=http://magiccards.info/scans/en/isd/57.jpg
|
||||
value=3
|
||||
rarity=C
|
||||
type=Instant
|
||||
color=u
|
||||
converted=3
|
||||
cost={2}{U}
|
||||
timing=counter
|
||||
|
||||
>Morkrut Banshee
|
||||
image=http://magiccards.info/scans/en/isd/110.jpg
|
||||
value=4
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicManaCost;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.action.MagicCardOnStackAction;
|
||||
import magic.model.action.MagicMoveCardAction;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.event.MagicCounterUnlessEvent;
|
||||
import magic.model.event.MagicDiscardEvent;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicSpellCardEvent;
|
||||
import magic.model.stack.MagicCardOnStack;
|
||||
|
||||
public class Frightful_Delusion {
|
||||
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_SPELL,
|
||||
new Object[]{cardOnStack},
|
||||
this,
|
||||
"Counter target spell$ unless its controller pays {1}. " +
|
||||
"That player discards a card.");
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] data,
|
||||
final Object[] choiceResults) {
|
||||
final MagicCardOnStack cardOnStack = (MagicCardOnStack)data[0];
|
||||
game.doAction(new MagicMoveCardAction(cardOnStack));
|
||||
event.processTargetCardOnStack(game,choiceResults,0,new MagicCardOnStackAction() {
|
||||
public void doAction(final MagicCardOnStack targetSpell) {
|
||||
game.addEvent(new MagicCounterUnlessEvent(cardOnStack.getCard(),targetSpell,MagicManaCost.ONE));
|
||||
game.addEvent(new MagicDiscardEvent(cardOnStack.getCard(),targetSpell.getController(),1,false));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue