added Oxidize
parent
51b3a45b17
commit
03233da0df
|
@ -17388,3 +17388,15 @@ converted=4
|
|||
cost={3}{R}
|
||||
pt=3/3
|
||||
timing=fmain
|
||||
|
||||
>Oxidize
|
||||
url=http://magiccards.info/ds/en/79.html
|
||||
image=http://magiccards.info/scans/en/ds/79.jpg
|
||||
value=2
|
||||
removal=1
|
||||
rarity=U
|
||||
type=Instant
|
||||
color=g
|
||||
converted=1
|
||||
cost={G}
|
||||
timing=removal
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPermanentState;
|
||||
import magic.model.action.MagicChangeStateAction;
|
||||
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 Oxidize {
|
||||
public static final MagicSpellCardEvent E = new MagicSpellCardEvent() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
cardOnStack.getCard(),
|
||||
cardOnStack.getController(),
|
||||
MagicTargetChoice.NEG_TARGET_ARTIFACT,
|
||||
new MagicDestroyTargetPicker(true),
|
||||
new Object[]{cardOnStack},
|
||||
this,
|
||||
"Destroy target artifact$. It can't be regenerated.");
|
||||
}
|
||||
@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.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent permanent) {
|
||||
game.doAction(new MagicChangeStateAction(permanent,MagicPermanentState.CannotBeRegenerated,true));
|
||||
game.doAction(new MagicDestroyAction(permanent));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue