added Leonin Relic-Warder and Nova Chaser
parent
6da724dd73
commit
561cf11c04
|
@ -15686,3 +15686,31 @@ color=u
|
|||
converted=7
|
||||
cost={4}{U}{U}{U}
|
||||
timing=enchantment
|
||||
|
||||
>Leonin Relic-Warder
|
||||
url=http://magiccards.info/mbs/en/10.html
|
||||
image=http://magiccards.info/scans/en/mbs/10.jpg
|
||||
value=2
|
||||
rarity=U
|
||||
type=Creature
|
||||
subtype=Cat,Cleric
|
||||
color=w
|
||||
converted=2
|
||||
cost={W}{W}
|
||||
pt=2/2
|
||||
timing=main
|
||||
|
||||
>Nova Chaser
|
||||
url=http://magiccards.info/lw/en/187.html
|
||||
image=http://magiccards.info/scans/en/lw/187.jpg
|
||||
value=5
|
||||
removal=2
|
||||
rarity=R
|
||||
type=Creature
|
||||
subtype=Elemental,Warrior
|
||||
color=r
|
||||
converted=4
|
||||
cost={3}{R}
|
||||
pt=10/2
|
||||
ability=trample
|
||||
timing=main
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicCard;
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.MagicLocationType;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.action.MagicExileUntilThisLeavesPlayAction;
|
||||
import magic.model.action.MagicPermanentAction;
|
||||
import magic.model.action.MagicPlayCardAction;
|
||||
import magic.model.action.MagicRemoveCardAction;
|
||||
import magic.model.choice.MagicChoice;
|
||||
import magic.model.choice.MagicMayChoice;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.target.MagicExileTargetPicker;
|
||||
import magic.model.target.MagicTargetFilter;
|
||||
import magic.model.target.MagicTargetHint;
|
||||
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
|
||||
import magic.model.trigger.MagicWhenLeavesPlayTrigger;
|
||||
|
||||
public class Leonin_Relic_Warder {
|
||||
public static final MagicWhenComesIntoPlayTrigger T1 = new MagicWhenComesIntoPlayTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
|
||||
final MagicTargetFilter targetFilter = new MagicTargetFilter.MagicOtherPermanentTargetFilter(
|
||||
MagicTargetFilter.TARGET_ARTIFACT_OR_ENCHANTMENT,permanent);
|
||||
final MagicTargetChoice targetChoice = new MagicTargetChoice(
|
||||
targetFilter,false,MagicTargetHint.Negative,"another artifact or enchantment to exile");
|
||||
final MagicChoice mayChoice = new MagicMayChoice("You may exile another artifact or enchantment.",targetChoice);
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
player,
|
||||
mayChoice,
|
||||
MagicExileTargetPicker.getInstance(),
|
||||
new Object[]{permanent},
|
||||
this,
|
||||
"You may$ exile another artifact or enchantment$.");
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
final MagicPermanent permanent = (MagicPermanent)data[0];
|
||||
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
|
||||
event.processTargetPermanent(game,choiceResults,1,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent target) {
|
||||
game.doAction(new MagicExileUntilThisLeavesPlayAction(permanent,target));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static final MagicWhenLeavesPlayTrigger T2 = new MagicWhenLeavesPlayTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPermanent data) {
|
||||
if (permanent == data &&
|
||||
!permanent.getExiledCards().isEmpty()) {
|
||||
final MagicCard exiledCard = permanent.getExiledCards().get(0);
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
permanent.getController(),
|
||||
new Object[]{exiledCard},
|
||||
this,
|
||||
"Return " + exiledCard + " to the battlefield");
|
||||
}
|
||||
return MagicEvent.NONE;
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
final MagicCard exiledCard = (MagicCard)data[0];
|
||||
game.doAction(new MagicRemoveCardAction(exiledCard,MagicLocationType.Exile));
|
||||
game.doAction(new MagicPlayCardAction(exiledCard,exiledCard.getOwner(),MagicPlayCardAction.NONE));
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicCard;
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.MagicLocationType;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.action.MagicExileUntilThisLeavesPlayAction;
|
||||
import magic.model.action.MagicPermanentAction;
|
||||
import magic.model.action.MagicPlayCardAction;
|
||||
import magic.model.action.MagicRemoveCardAction;
|
||||
import magic.model.action.MagicSacrificeAction;
|
||||
import magic.model.choice.MagicChoice;
|
||||
import magic.model.choice.MagicMayChoice;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.target.MagicExileTargetPicker;
|
||||
import magic.model.target.MagicTargetFilter;
|
||||
import magic.model.target.MagicTargetHint;
|
||||
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
|
||||
import magic.model.trigger.MagicWhenLeavesPlayTrigger;
|
||||
|
||||
public class Nova_Chaser {
|
||||
public static final MagicWhenComesIntoPlayTrigger T1 = new MagicWhenComesIntoPlayTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
|
||||
final MagicTargetFilter targetFilter =
|
||||
new MagicTargetFilter.MagicOtherPermanentTargetFilter(
|
||||
MagicTargetFilter.TARGET_ELEMENTAL_YOU_CONTROL,permanent);
|
||||
final MagicTargetChoice targetChoice =
|
||||
new MagicTargetChoice(
|
||||
targetFilter,false,MagicTargetHint.None,"another Elemental to exile");
|
||||
final MagicChoice championChoice =
|
||||
new MagicMayChoice(
|
||||
"You may exile another Elemental you control. " +
|
||||
"If you don't, sacrifice " + permanent + ".",
|
||||
targetChoice);
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
player,
|
||||
championChoice,
|
||||
MagicExileTargetPicker.getInstance(),
|
||||
new Object[]{permanent},
|
||||
this,
|
||||
"You may$ exile another Elemental you control$. " +
|
||||
"If you don't, sacrifice " + permanent + ".");
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
final MagicPermanent permanent = (MagicPermanent)data[0];
|
||||
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
|
||||
event.processTargetPermanent(game,choiceResults,1,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent creature) {
|
||||
game.doAction(new MagicExileUntilThisLeavesPlayAction(permanent,creature));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
game.doAction(new MagicSacrificeAction(permanent));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static final MagicWhenLeavesPlayTrigger T2 = new MagicWhenLeavesPlayTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPermanent data) {
|
||||
if (permanent == data &&
|
||||
!permanent.getExiledCards().isEmpty()) {
|
||||
final MagicCard exiledCard = permanent.getExiledCards().get(0);;
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
permanent.getController(),
|
||||
new Object[]{exiledCard,permanent.getController()},
|
||||
this,
|
||||
"Return " + exiledCard + " to the battlefield");
|
||||
}
|
||||
return MagicEvent.NONE;
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
final MagicCard exiledCard = (MagicCard)data[0];
|
||||
game.doAction(new MagicRemoveCardAction(exiledCard,MagicLocationType.Exile));
|
||||
game.doAction(new MagicPlayCardAction(exiledCard,exiledCard.getOwner(),MagicPlayCardAction.NONE));
|
||||
}
|
||||
};
|
||||
}
|
|
@ -731,6 +731,17 @@ public interface MagicTargetFilter {
|
|||
}
|
||||
};
|
||||
|
||||
MagicTargetFilter TARGET_ELEMENTAL_YOU_CONTROL = new MagicTargetFilter() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
|
||||
return target.getController() == player &&
|
||||
((MagicPermanent)target).isCreature(game) &&
|
||||
((MagicPermanent)target).hasSubType(MagicSubType.Elemental,game);
|
||||
}
|
||||
public boolean acceptType(final MagicTargetType targetType) {
|
||||
return targetType == MagicTargetType.Permanent;
|
||||
}
|
||||
};
|
||||
|
||||
MagicTargetFilter TARGET_GOBLIN_YOU_CONTROL=new MagicTargetFilter() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
|
||||
return target.getController()==player &&
|
||||
|
|
Loading…
Reference in New Issue