added Scute Mob and Reprisal

master
beholder 2011-09-14 16:01:03 +02:00
parent 4f24d0d4de
commit 39ce46f25d
5 changed files with 125 additions and 0 deletions

View File

@ -1369,6 +1369,19 @@ power=1
toughness=1 toughness=1
timing=main timing=main
>Scute Mob
image=http://magiccards.info/scans/en/zen/182.jpg
value=2
rarity=R
type=Creature
subtype=Insect
color=g
converted=1
cost={G}
power=1
toughness=1
timing=main
>Safehold Elite >Safehold Elite
image=http://magiccards.info/scans/en/shm/239.jpg image=http://magiccards.info/scans/en/shm/239.jpg
value=2 value=2
@ -3468,6 +3481,17 @@ converted=3
cost={1}{B}{G} cost={1}{B}{G}
timing=removal timing=removal
>Reprisal
image=http://magiccards.info/scans/en/ddg/27.jpg
value=3
removal=3
rarity=U
type=Instant
color=w
converted=2
cost={1}{W}
timing=removal
>Raise Dead >Raise Dead
image=http://magiccards.info/scans/en/9e/156.jpg image=http://magiccards.info/scans/en/9e/156.jpg
value=2 value=2

View File

@ -0,0 +1,47 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPayedCost;
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.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 Reprisal {
public static final MagicSpellCardEvent S = new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
final MagicPlayer player = cardOnStack.getController();
return new MagicEvent(
cardOnStack.getCard(),
player,
MagicTargetChoice.NEG_TARGET_CREATURE_POWER_4_OR_MORE,
new MagicDestroyTargetPicker(true),
new Object[]{cardOnStack},
this,
"Destroy target creature$ with power 4 or greater. It can't be regenerated.");
}
@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 permanent) {
game.doAction(new MagicChangeStateAction(permanent,MagicPermanentState.CannotBeRegenerated,true));
game.doAction(new MagicDestroyAction(permanent));
}
});
}
};
}

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.MagicType;
import magic.model.action.MagicChangeCountersAction;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicAtUpkeepTrigger;
public class Scute_Mob {
public static final MagicAtUpkeepTrigger T = new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer data) {
final MagicPlayer player = permanent.getController();
return (player == data &&
player.getNrOfPermanentsWithType(MagicType.Land) >= 5) ?
new MagicEvent(
permanent,
player,
new Object[]{permanent},
this,
"Put four +1/+1 counters 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,
4,
true));
}
};
}

View File

@ -124,6 +124,9 @@ public class MagicTargetChoice extends MagicChoice {
public static final MagicTargetChoice TARGET_CREATURE_POWER_2_OR_LESS = public static final MagicTargetChoice TARGET_CREATURE_POWER_2_OR_LESS =
new MagicTargetChoice(MagicTargetFilter.TARGET_CREATURE_POWER_2_OR_LESS,true,MagicTargetHint.Positive, new MagicTargetChoice(MagicTargetFilter.TARGET_CREATURE_POWER_2_OR_LESS,true,MagicTargetHint.Positive,
"target creature with power 2 or less"); "target creature with power 2 or less");
public static final MagicTargetChoice NEG_TARGET_CREATURE_POWER_4_OR_MORE =
new MagicTargetChoice(MagicTargetFilter.TARGET_CREATURE_POWER_4_OR_MORE,true,MagicTargetHint.Negative,
"target creature with power 4 or greater");
public static final MagicTargetChoice NEG_TARGET_CREATURE_WITH_FLYING= public static final MagicTargetChoice NEG_TARGET_CREATURE_WITH_FLYING=
new MagicTargetChoice(MagicTargetFilter.TARGET_CREATURE_WITH_FLYING,true,MagicTargetHint.Negative,"target creature with flying"); new MagicTargetChoice(MagicTargetFilter.TARGET_CREATURE_WITH_FLYING,true,MagicTargetHint.Negative,"target creature with flying");
public static final MagicTargetChoice NEG_TARGET_CREATURE_WITHOUT_FLYING= public static final MagicTargetChoice NEG_TARGET_CREATURE_WITHOUT_FLYING=

View File

@ -780,6 +780,17 @@ public interface MagicTargetFilter {
} }
}; };
MagicTargetFilter TARGET_CREATURE_POWER_4_OR_MORE = new MagicTargetFilter() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
final MagicPermanent permanent = (MagicPermanent)target;
return permanent.isCreature() && permanent.getCardDefinition().getPower() >= 4;
}
public boolean acceptType(final MagicTargetType targetType) {
return targetType == MagicTargetType.Permanent;
}
};
MagicTargetFilter TARGET_ATTACKING_CREATURE=new MagicTargetFilter() { MagicTargetFilter TARGET_ATTACKING_CREATURE=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) {