added Unruly Mob and Urgent Exorcism

master
beholder 2011-10-01 11:34:14 +02:00
parent 96698ba674
commit 7ed55387c6
5 changed files with 119 additions and 0 deletions

View File

@ -5147,3 +5147,26 @@ color=b
converted=3
cost={2}{B}
timing=main
>Unruly Mob
image=http://magiccards.info/scans/en/isd/39.jpg
value=2
rarity=C
type=Creature
subtype=Human
color=w
converted=2
cost={1}{W}
pt=1/1
timing=main
>Urgent Exorcism
image=http://magiccards.info/scans/en/isd/40.jpg
value=2
removal=1
rarity=C
type=Instant
color=w
converted=2
cost={1}{W}
timing=removal

View File

@ -0,0 +1,40 @@
package magic.card;
import magic.model.MagicCounterType;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.action.MagicChangeCountersAction;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicWhenOtherPutIntoGraveyardFromPlayTrigger;
public class Unruly_Mob {
public static final MagicWhenOtherPutIntoGraveyardFromPlayTrigger T = new MagicWhenOtherPutIntoGraveyardFromPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
final MagicPlayer player = permanent.getController();
return (permanent != otherPermanent &&
otherPermanent.isCreature(game) &&
otherPermanent.getController() == player) ?
new MagicEvent(
permanent,
player,
new Object[]{permanent},
this,
"Put a +1/+1 counter on " + permanent + "."):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
game.doAction(new MagicChangeCountersAction(
(MagicPermanent)data[0],
MagicCounterType.PlusOne,
1,
true));
}
};
}

View File

@ -0,0 +1,42 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPayedCost;
import magic.model.MagicPermanent;
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 Urgent_Exorcism {
public static final MagicSpellCardEvent S = new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack.getCard(),
cardOnStack.getController(),
MagicTargetChoice.NEG_TARGET_SPIRIT_OR_ENCHANTMENT,
new MagicDestroyTargetPicker(false),
new Object[]{cardOnStack},
this,
"Destroy target Spirit or enchantment$.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
game.doAction(new MagicMoveCardAction((MagicCardOnStack)data[0]));
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
public void doAction(final MagicPermanent target) {
game.doAction(new MagicDestroyAction(target));
}
});
}
};
}

View File

@ -113,6 +113,8 @@ public class MagicTargetChoice extends MagicChoice {
new MagicTargetChoice(MagicTargetFilter.TARGET_ENCHANTMENT,true,MagicTargetHint.None,"target enchantment");
public static final MagicTargetChoice NEG_TARGET_ENCHANTMENT =
new MagicTargetChoice(MagicTargetFilter.TARGET_ENCHANTMENT,true,MagicTargetHint.Negative,"target enchantment");
public static final MagicTargetChoice NEG_TARGET_SPIRIT_OR_ENCHANTMENT =
new MagicTargetChoice(MagicTargetFilter.TARGET_SPIRIT_OR_ENCHANTMENT,true,MagicTargetHint.Negative,"target Spirit or enchantment");
public static final MagicTargetChoice TARGET_CREATURE=
new MagicTargetChoice(MagicTargetFilter.TARGET_CREATURE,true,MagicTargetHint.None,"target creature");
public static final MagicTargetChoice NEG_TARGET_CREATURE=

View File

@ -394,6 +394,18 @@ public interface MagicTargetFilter {
return targetType==MagicTargetType.Permanent;
}
};
MagicTargetFilter TARGET_SPIRIT_OR_ENCHANTMENT = new MagicTargetFilter() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
final MagicPermanent targetPermanent = (MagicPermanent)target;
return targetPermanent.hasSubType(MagicSubType.Spirit,game) ||
targetPermanent.isEnchantment();
}
public boolean acceptType(final MagicTargetType targetType) {
return targetType == MagicTargetType.Permanent;
}
};
MagicTargetFilter TARGET_PERMANENT_YOU_CONTROL=new MagicTargetFilter() {