added Mantis Engine and Megrim

master
beholder 2011-09-22 05:03:45 +02:00
parent 0a35ac75bd
commit d925243600
3 changed files with 143 additions and 0 deletions

View File

@ -1,3 +1,14 @@
>Mantis Engine
image=http://magiccards.info/scans/en/10e/333.jpg
value=3
rarity=U
type=Artifact,Creature
subtype=Insect
converted=5
cost={5}
pt=3/3
timing=main
>Loyal Sentry
image=http://magiccards.info/scans/en/10e/27.jpg
value=2
@ -6211,6 +6222,16 @@ cost={W}{W}
static=all
timing=enchantment
>Megrim
image=http://magiccards.info/scans/en/m10/104.jpg
value=3
rarity=U
type=Enchantment
color=b
converted=3
cost={2}{B}
timing=enchantment
>Liliana's Caress
image=http://magiccards.info/scans/en/m11/103.jpg
value=3

View File

@ -0,0 +1,81 @@
package magic.card;
import magic.model.MagicAbility;
import magic.model.MagicGame;
import magic.model.MagicManaCost;
import magic.model.MagicPayedCost;
import magic.model.MagicPermanent;
import magic.model.MagicSource;
import magic.model.action.MagicSetAbilityAction;
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;
public class Mantis_Engine {
// gains flying until end of turn
public static final MagicPermanentActivation A1 = new MagicPermanentActivation(
new MagicCondition[]{MagicManaCost.TWO.getCondition()},
new MagicActivationHints(MagicTiming.Pump,true),
"Flying"
) {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.TWO)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
source.getController(),
new Object[]{source},
this,
source + " gains flying until end of turn.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
game.doAction(new MagicSetAbilityAction((MagicPermanent)data[0],MagicAbility.Flying));
}
};
// gains first strike until end of turn
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{MagicManaCost.TWO.getCondition()},
new MagicActivationHints(MagicTiming.Pump,true),
"First strike"
) {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.TWO)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
source.getController(),
new Object[]{source},
this,
source + " gains first strike until end of turn.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
game.doAction(new MagicSetAbilityAction((MagicPermanent)data[0],MagicAbility.FirstStrike));
}
};
}

View File

@ -0,0 +1,41 @@
package magic.card;
import magic.model.MagicCard;
import magic.model.MagicDamage;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.action.MagicDealDamageAction;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicWhenDiscardedTrigger;
public class Megrim {
public static final MagicWhenDiscardedTrigger T = new MagicWhenDiscardedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCard data) {
final MagicPlayer otherController = data.getOwner();
final MagicPlayer player = permanent.getController();
return (otherController != player) ?
new MagicEvent(
permanent,
player,
new Object[]{permanent,otherController},
this,
permanent + " deals 2 damage to " + otherController + "."):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
final MagicDamage damage = new MagicDamage(
(MagicPermanent)data[0],
(MagicPlayer)data[1],
2,
false);
game.doAction(new MagicDealDamageAction(damage));
}
};
}