added Skirsdag Cultist and Slayer of the Wicked

master
beholder 2011-09-30 10:07:52 +02:00
parent 11d788f546
commit 9cca58477a
5 changed files with 152 additions and 2 deletions

View File

@ -4943,3 +4943,27 @@ cost={1}
equip={2}
given_pt=2/0
timing=equipment
>Skirsdag Cultist
image=http://magiccards.info/scans/en/isd/163.jpg
value=3
rarity=U
type=Creature
subtype=Human,Shaman
color=r
converted=4
cost={2}{R}{R}
pt=2/2
timing=main
>Slayer of the Wicked
image=http://magiccards.info/scans/en/isd/32.jpg
value=3
rarity=U
type=Creature
subtype=Human,Soldier
color=w
converted=4
cost={3}{W}
pt=3/2
timing=fmain

View File

@ -0,0 +1,67 @@
package magic.card;
import magic.model.MagicDamage;
import magic.model.MagicGame;
import magic.model.MagicManaCost;
import magic.model.MagicPayedCost;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.MagicSource;
import magic.model.action.MagicDealDamageAction;
import magic.model.action.MagicTargetAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPayManaCostEvent;
import magic.model.event.MagicPermanentActivation;
import magic.model.event.MagicSacrificePermanentEvent;
import magic.model.event.MagicTapEvent;
import magic.model.event.MagicTiming;
import magic.model.target.MagicDamageTargetPicker;
import magic.model.target.MagicTarget;
public class Skirsdag_Cultist {
public static final MagicPermanentActivation A =new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.CAN_TAP_CONDITION,
MagicCondition.ONE_CREATURE_CONDITION,
MagicManaCost.RED.getCondition()
},
new MagicActivationHints(MagicTiming.Removal,false,1),
"Exile") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
final MagicPlayer player = source.getController();
return new MagicEvent[]{
new MagicTapEvent((MagicPermanent)source),
new MagicPayManaCostEvent(source,player,MagicManaCost.RED),
new MagicSacrificePermanentEvent(source,player,MagicTargetChoice.SACRIFICE_CREATURE)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
source.getController(),
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
new MagicDamageTargetPicker(2),
new Object[]{source},
this,
source + " deals 2 damage to target creature or player$.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
event.processTarget(game,choiceResults,0,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
final MagicDamage damage = new MagicDamage((MagicSource)data[0],target,2,false);
game.doAction(new MagicDealDamageAction(damage));
}
});
}
};
}

View File

@ -0,0 +1,46 @@
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.MagicWhenComesIntoPlayTrigger;
public class Slayer_of_the_Wicked {
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,
new MagicMayChoice(
"You may destroy target Vampire, Werewolf, or Zombie.",
MagicTargetChoice.NEG_TARGET_VAMPIRE_WEREWOLF_OR_ZOMBIE),
new MagicDestroyTargetPicker(false),
MagicEvent.NO_DATA,
this,
"You may$ destroy target Vampire, Werewolf, or Zombie$.");
}
@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));
}
});
}
}
};
}

View File

@ -187,6 +187,9 @@ public class MagicTargetChoice extends MagicChoice {
new MagicTargetChoice(MagicTargetFilter.TARGET_CREATURE_OR_PLAYER,true,MagicTargetHint.Positive,"target creature or player");
public static final MagicTargetChoice POS_TARGET_MERFOLK_CREATURE =
new MagicTargetChoice(MagicTargetFilter.TARGET_MERFOLK_CREATURE,true,MagicTargetHint.Positive,"target Merfolk creature");
public static final MagicTargetChoice NEG_TARGET_VAMPIRE_WEREWOLF_OR_ZOMBIE =
new MagicTargetChoice(MagicTargetFilter.TARGET_VAMPIRE_WEREWOLF_OR_ZOMBIE,true,MagicTargetHint.Negative,
"target Vampire, Werewolf, or Zombie");
public static final MagicTargetChoice NEG_TARGET_NONHUMAN_CREATURE =
new MagicTargetChoice(MagicTargetFilter.TARGET_NONHUMAN_CREATURE,true,MagicTargetHint.Negative,"target non-Human creature");
private static final MagicTargetChoice SACRIFICE_PERMANENT=

View File

@ -709,11 +709,21 @@ public interface MagicTargetFilter {
};
MagicTargetFilter TARGET_MERFOLK_CREATURE = new MagicTargetFilter() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
return ((MagicPermanent)target).hasSubType(MagicSubType.Merfolk,game);
}
public boolean acceptType(final MagicTargetType targetType) {
return targetType == MagicTargetType.Permanent;
}
};
MagicTargetFilter TARGET_VAMPIRE_WEREWOLF_OR_ZOMBIE = new MagicTargetFilter() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
final MagicPermanent permanent = (MagicPermanent)target;
return permanent.hasSubType(MagicSubType.Vampire,game) ||
permanent.hasSubType(MagicSubType.Werewolf,game) ||
permanent.hasSubType(MagicSubType.Zombie,game);
}
public boolean acceptType(final MagicTargetType targetType) {
return targetType==MagicTargetType.Permanent;
}