added Ancient Hellkite

master
beholder 2011-09-01 08:40:36 +02:00
parent 0f48ebf30a
commit f422db3c16
3 changed files with 75 additions and 0 deletions

View File

@ -52,6 +52,20 @@ power=2
toughness=4
timing=main
>Ancient Hellkite
image=http://magiccards.info/scans/en/m11/122.jpg
value=5
rarity=R
type=Creature
subtype=Dragon
color=r
converted=7
cost={4}{R}{R}{R}
power=6
toughness=6
ability=flying
timing=main
>Armored Warhorse
image=http://magiccards.info/scans/en/m12/7.jpg
value=2

View File

@ -0,0 +1,54 @@
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.MagicPayManaCostEvent;
import magic.model.event.MagicPermanentActivation;
import magic.model.event.MagicTiming;
import magic.model.target.MagicDamageTargetPicker;
import magic.model.target.MagicTarget;
public class Ancient_Hellkite {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicCondition.IS_ATTACKING_CONDITION,MagicManaCost.RED.getCondition()},
new MagicActivationHints(MagicTiming.Removal),
"Damage") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.RED)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
source.getController(),
MagicTargetChoice.TARGET_CREATURE_YOUR_OPPONENT_CONTROLS,
new MagicDamageTargetPicker(1),
new Object[]{source},
this,
source + " deals 1 damage to target creature$ your opponent controls.");
}
@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,1,false);
game.doAction(new MagicDealDamageAction(damage));
}
});
}
};
}

View File

@ -79,6 +79,13 @@ public interface MagicCondition {
}
};
public static final MagicCondition IS_ATTACKING_CONDITION = new MagicCondition() {
public boolean accept(final MagicGame game,final MagicSource source) {
final MagicPermanent permanent = (MagicPermanent)source;
return permanent.isAttacking();
}
};
public static final MagicCondition ABILITY_ONCE_CONDITION=new MagicCondition() {
public boolean accept(final MagicGame game,final MagicSource source) {
final MagicPermanent permanent=(MagicPermanent)source;