added Ballista Squad and Bandage

master
beholder 2011-09-20 13:57:41 +02:00
parent bb3d2ed999
commit 99a0964a86
4 changed files with 133 additions and 0 deletions

View File

@ -1,3 +1,16 @@
>Ballista Squad
image=http://magiccards.info/scans/en/10e/8.jpg
value=3
rarity=U
type=Creature
subtype=Human,Rebel
color=w
converted=4
cost={3}{W}
power=2
toughness=2
timing=main
>Aven Fisher
image=http://magiccards.info/scans/en/10e/68.jpg
value=3
@ -4076,6 +4089,16 @@ converted=3
cost={2}{W}
timing=pump
>Bandage
image=http://magiccards.info/scans/en/10e/9.jpg
value=1
rarity=C
type=Instant
color=w
converted=1
cost={W}
timing=pump
>Putrefy
image=http://magiccards.info/scans/en/rav/221.jpg
value=4

View File

@ -0,0 +1,61 @@
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.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.MagicPayManaCostTapEvent;
import magic.model.event.MagicPermanentActivation;
import magic.model.event.MagicSacrificeEvent;
import magic.model.event.MagicTiming;
import magic.model.target.MagicDamageTargetPicker;
import magic.model.target.MagicTarget;
public class Ballista_Squad {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.CAN_TAP_CONDITION,
MagicManaCost.X_WHITE.getCondition()
},
new MagicActivationHints(MagicTiming.Removal),
"Damage") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{
new MagicPayManaCostTapEvent(source,source.getController(),MagicManaCost.X_WHITE),
new MagicSacrificeEvent((MagicPermanent)source)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
final int amount = payedCost.getX();
return new MagicEvent(
source,
source.getController(),
MagicTargetChoice.NEG_TARGET_ATTACKING_OR_BLOCKING_CREATURE,
new MagicDamageTargetPicker(amount),
new Object[]{source,amount},
this,
source + " deals "+amount+" damage to target creature$.");
}
@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,(Integer)data[1],false);
game.doAction(new MagicDealDamageAction(damage));
}
});
}
};
}

View File

@ -0,0 +1,48 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPayedCost;
import magic.model.MagicPlayer;
import magic.model.action.MagicDrawAction;
import magic.model.action.MagicMoveCardAction;
import magic.model.action.MagicPreventDamageAction;
import magic.model.action.MagicTargetAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicEvent;
import magic.model.event.MagicSpellCardEvent;
import magic.model.stack.MagicCardOnStack;
import magic.model.target.MagicPreventTargetPicker;
import magic.model.target.MagicTarget;
public class Bandage {
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.POS_TARGET_CREATURE_OR_PLAYER,
MagicPreventTargetPicker.getInstance(),
new Object[]{cardOnStack,player},
this,
"Prevent the next 1 damage that would be dealt to target " +
"creature or player$ this turn. Draw a card.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
game.doAction(new MagicMoveCardAction((MagicCardOnStack)data[0]));
event.processTarget(game,choiceResults,0,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
game.doAction(new MagicPreventDamageAction(target,1));
}
});
game.doAction(new MagicDrawAction((MagicPlayer)data[1],1));
}
};
}

View File

@ -66,6 +66,7 @@ public class MagicManaCost {
public static final MagicManaCost ONE_WHITE=MagicManaCost.createCost("{1}{W}");
public static final MagicManaCost TWO_WHITE=MagicManaCost.createCost("{2}{W}");
public static final MagicManaCost WHITE_WHITE=MagicManaCost.createCost("{W}{W}");
public static final MagicManaCost X_WHITE=MagicManaCost.createCost("{X}{W}");
public static final MagicManaCost BLACK_GREEN=MagicManaCost.createCost("{B}{G}");
public static final MagicManaCost GREEN_WHITE=MagicManaCost.createCost("{G}{W}");
public static final MagicManaCost BLACK_BLACK=MagicManaCost.createCost("{B}{B}");