added Kor Sanctifiers and Nekrataal
parent
70e69e6737
commit
c775a2d1b9
|
@ -918,6 +918,19 @@ toughness=3
|
||||||
ability=flying
|
ability=flying
|
||||||
timing=fmain
|
timing=fmain
|
||||||
|
|
||||||
|
>Kor Sanctifiers
|
||||||
|
image=http://magiccards.info/scans/en/zen/22.jpg
|
||||||
|
value=2
|
||||||
|
rarity=C
|
||||||
|
type=Creature
|
||||||
|
subtype=Kor,Cleric
|
||||||
|
color=w
|
||||||
|
converted=3
|
||||||
|
cost={2}{W}
|
||||||
|
power=2
|
||||||
|
toughness=3
|
||||||
|
timing=main
|
||||||
|
|
||||||
>Lhurgoyf
|
>Lhurgoyf
|
||||||
image=http://magiccards.info/scans/en/cmd/165.jpg
|
image=http://magiccards.info/scans/en/cmd/165.jpg
|
||||||
value=3
|
value=3
|
||||||
|
@ -1006,6 +1019,20 @@ power=2
|
||||||
toughness=2
|
toughness=2
|
||||||
timing=main
|
timing=main
|
||||||
|
|
||||||
|
>Nekrataal
|
||||||
|
image=http://magiccards.info/scans/en/10e/163.jpg
|
||||||
|
value=3
|
||||||
|
rarity=U
|
||||||
|
type=Creature
|
||||||
|
subtype=Human,Assassin
|
||||||
|
color=b
|
||||||
|
converted=4
|
||||||
|
cost={2}{B}{B}
|
||||||
|
power=2
|
||||||
|
toughness=1
|
||||||
|
ability=first strike
|
||||||
|
timing=fmain
|
||||||
|
|
||||||
>Peregrine Griffin
|
>Peregrine Griffin
|
||||||
image=http://magiccards.info/scans/en/m12/29.jpg
|
image=http://magiccards.info/scans/en/m12/29.jpg
|
||||||
value=3
|
value=3
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
package magic.card;
|
||||||
|
|
||||||
|
import magic.model.MagicCard;
|
||||||
|
import magic.model.MagicGame;
|
||||||
|
import magic.model.MagicManaCost;
|
||||||
|
import magic.model.MagicPayedCost;
|
||||||
|
import magic.model.MagicPermanent;
|
||||||
|
import magic.model.MagicPlayer;
|
||||||
|
import magic.model.action.MagicDestroyAction;
|
||||||
|
import magic.model.action.MagicPermanentAction;
|
||||||
|
import magic.model.action.MagicPlayCardFromStackAction;
|
||||||
|
import magic.model.action.MagicPutItemOnStackAction;
|
||||||
|
import magic.model.choice.MagicKickerChoice;
|
||||||
|
import magic.model.choice.MagicTargetChoice;
|
||||||
|
import magic.model.event.MagicEvent;
|
||||||
|
import magic.model.event.MagicEventAction;
|
||||||
|
import magic.model.event.MagicSpellCardEvent;
|
||||||
|
import magic.model.stack.MagicCardOnStack;
|
||||||
|
import magic.model.stack.MagicTriggerOnStack;
|
||||||
|
import magic.model.target.MagicDestroyTargetPicker;
|
||||||
|
|
||||||
|
public class Kor_Sanctifiers {
|
||||||
|
public static final MagicSpellCardEvent S = new MagicSpellCardEvent() {
|
||||||
|
@Override
|
||||||
|
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||||
|
final MagicPlayer player = cardOnStack.getController();
|
||||||
|
final MagicCard card = cardOnStack.getCard();
|
||||||
|
return new MagicEvent(
|
||||||
|
card,
|
||||||
|
player,
|
||||||
|
new MagicKickerChoice(MagicManaCost.WHITE,false),
|
||||||
|
new Object[]{cardOnStack,player},
|
||||||
|
this,
|
||||||
|
"$Play " + card + ". When " + card + " enters the battlefield, " +
|
||||||
|
"if it is was kicked$, destroy target artifact or enchantment.");
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void executeEvent(
|
||||||
|
final MagicGame game,
|
||||||
|
final MagicEvent event,
|
||||||
|
final Object[] data,
|
||||||
|
final Object[] choiceResults) {
|
||||||
|
final int kickerCount = (Integer)choiceResults[1];
|
||||||
|
final MagicCardOnStack cardOnStack = (MagicCardOnStack)data[0];
|
||||||
|
final MagicPlayCardFromStackAction action = new MagicPlayCardFromStackAction(cardOnStack);
|
||||||
|
game.doAction(action);
|
||||||
|
if (kickerCount > 0) {
|
||||||
|
final MagicPermanent permanent = action.getPermanent();
|
||||||
|
final MagicPlayer player = permanent.getController();
|
||||||
|
final MagicEvent triggerEvent = new MagicEvent(
|
||||||
|
permanent,
|
||||||
|
player,
|
||||||
|
MagicTargetChoice.NEG_TARGET_ARTIFACT_OR_ENCHANTMENT,
|
||||||
|
new MagicDestroyTargetPicker(false),
|
||||||
|
MagicEvent.NO_DATA,
|
||||||
|
new MagicEventAction() {
|
||||||
|
@Override
|
||||||
|
public void executeEvent(
|
||||||
|
final MagicGame game,
|
||||||
|
final MagicEvent event,
|
||||||
|
final Object[] data,
|
||||||
|
final Object[] choiceResults) {
|
||||||
|
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
|
||||||
|
public void doAction(final MagicPermanent target) {
|
||||||
|
game.doAction(new MagicDestroyAction(target));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Destroy target artifact or enchantment$."
|
||||||
|
);
|
||||||
|
game.doAction(new MagicPutItemOnStackAction(new MagicTriggerOnStack(permanent,triggerEvent)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package magic.card;
|
||||||
|
|
||||||
|
import magic.model.MagicGame;
|
||||||
|
import magic.model.MagicPermanent;
|
||||||
|
import magic.model.MagicPermanentState;
|
||||||
|
import magic.model.MagicPlayer;
|
||||||
|
import magic.model.action.MagicChangeStateAction;
|
||||||
|
import magic.model.action.MagicDestroyAction;
|
||||||
|
import magic.model.action.MagicPermanentAction;
|
||||||
|
import magic.model.choice.MagicTargetChoice;
|
||||||
|
import magic.model.event.MagicEvent;
|
||||||
|
import magic.model.target.MagicDestroyTargetPicker;
|
||||||
|
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
|
||||||
|
|
||||||
|
public class Nekrataal {
|
||||||
|
public static final MagicWhenComesIntoPlayTrigger T = new MagicWhenComesIntoPlayTrigger() {
|
||||||
|
@Override
|
||||||
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
|
||||||
|
return new MagicEvent(
|
||||||
|
permanent,
|
||||||
|
player,
|
||||||
|
MagicTargetChoice.NEG_TARGET_NONARTIFACT_NONBLACK_CREATURE,
|
||||||
|
new MagicDestroyTargetPicker(true),
|
||||||
|
MagicEvent.NO_DATA,
|
||||||
|
this,
|
||||||
|
"Destroy target nonartifact, nonblack creature$. That creature can't be regenerated.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void executeEvent(final MagicGame game,final MagicEvent event,final Object data[],final Object[] choiceResults) {
|
||||||
|
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
|
||||||
|
public void doAction(final MagicPermanent creature) {
|
||||||
|
game.doAction(new MagicChangeStateAction(creature,MagicPermanentState.CannotBeRegenerated,true));
|
||||||
|
game.doAction(new MagicDestroyAction(creature));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
|
@ -102,6 +102,8 @@ public class MagicTargetChoice extends MagicChoice {
|
||||||
new MagicTargetChoice(MagicTargetFilter.TARGET_NONBLACK_CREATURE,true,MagicTargetHint.Negative,"target nonblack creature");
|
new MagicTargetChoice(MagicTargetFilter.TARGET_NONBLACK_CREATURE,true,MagicTargetHint.Negative,"target nonblack creature");
|
||||||
public static final MagicTargetChoice NEG_TARGET_NONARTIFACT_CREATURE=
|
public static final MagicTargetChoice NEG_TARGET_NONARTIFACT_CREATURE=
|
||||||
new MagicTargetChoice(MagicTargetFilter.TARGET_NONARTIFACT_CREATURE,true,MagicTargetHint.Negative,"target nonartifact creature");
|
new MagicTargetChoice(MagicTargetFilter.TARGET_NONARTIFACT_CREATURE,true,MagicTargetHint.Negative,"target nonartifact creature");
|
||||||
|
public static final MagicTargetChoice NEG_TARGET_NONARTIFACT_NONBLACK_CREATURE =
|
||||||
|
new MagicTargetChoice(MagicTargetFilter.TARGET_NONARTIFACT_NONBLACK_CREATURE,true,MagicTargetHint.Negative,"target nonartifact creature");
|
||||||
public static final MagicTargetChoice NEG_TARGET_TAPPED_CREATURE=
|
public static final MagicTargetChoice NEG_TARGET_TAPPED_CREATURE=
|
||||||
new MagicTargetChoice(MagicTargetFilter.TARGET_TAPPED_CREATURE,true,MagicTargetHint.Negative,"target tapped creature");
|
new MagicTargetChoice(MagicTargetFilter.TARGET_TAPPED_CREATURE,true,MagicTargetHint.Negative,"target tapped creature");
|
||||||
public static final MagicTargetChoice NEG_TARGET_UNTAPPED_CREATURE=
|
public static final MagicTargetChoice NEG_TARGET_UNTAPPED_CREATURE=
|
||||||
|
|
|
@ -626,6 +626,19 @@ public interface MagicTargetFilter {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static final MagicTargetFilter TARGET_NONARTIFACT_NONBLACK_CREATURE = new MagicTargetFilter() {
|
||||||
|
|
||||||
|
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
|
||||||
|
final MagicPermanent permanent=(MagicPermanent)target;
|
||||||
|
return permanent.isCreature() &&
|
||||||
|
!permanent.isArtifact() &&
|
||||||
|
!MagicColor.Black.hasColor(permanent.getColorFlags());
|
||||||
|
}
|
||||||
|
public boolean acceptType(final MagicTargetType targetType) {
|
||||||
|
return targetType == MagicTargetType.Permanent;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
public static final MagicTargetFilter TARGET_CREATURE_WITHOUT_FLYING=new MagicTargetFilter() {
|
public static final MagicTargetFilter TARGET_CREATURE_WITHOUT_FLYING=new MagicTargetFilter() {
|
||||||
|
|
||||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
|
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
|
||||||
|
|
Loading…
Reference in New Issue