added Aura Shards
parent
d752bbc9c9
commit
cbab3e07cb
|
@ -7424,6 +7424,16 @@ converted=3
|
|||
cost={2}{G}
|
||||
timing=enchantment
|
||||
|
||||
>Aura Shards
|
||||
image=http://magiccards.info/scans/en/cmd/182.jpg
|
||||
value=4
|
||||
rarity=U
|
||||
type=Enchantment
|
||||
color=gw
|
||||
converted=3
|
||||
cost={1}{G}{W}
|
||||
timing=enchantment
|
||||
|
||||
>Force Spike
|
||||
image=http://magiccards.info/scans/en/7e/76.jpg
|
||||
value=3
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicDestroyAction;
|
||||
import magic.model.action.MagicPermanentAction;
|
||||
import magic.model.choice.MagicMayChoice;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.target.MagicDestroyTargetPicker;
|
||||
import magic.model.trigger.MagicWhenOtherComesIntoPlayTrigger;
|
||||
|
||||
public class Aura_Shards {
|
||||
public static final MagicWhenOtherComesIntoPlayTrigger T = new MagicWhenOtherComesIntoPlayTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
|
||||
final MagicPlayer player = permanent.getController();
|
||||
return (otherPermanent.isCreature() &&
|
||||
otherPermanent.getController() == player) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
player,
|
||||
new MagicMayChoice(
|
||||
"You may destroy target artifact or enchantment.",
|
||||
MagicTargetChoice.NEG_TARGET_ARTIFACT_OR_ENCHANTMENT),
|
||||
new MagicDestroyTargetPicker(false),
|
||||
MagicEvent.NO_DATA,
|
||||
this,
|
||||
"You may$ destroy target artifact or enchantment$."):
|
||||
null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
|
||||
event.processTargetPermanent(game,choiceResults,1,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent permanent) {
|
||||
game.doAction(new MagicDestroyAction(permanent));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue