added Lavacore Elemental and Ravaging Riftwurm

master
beholder 2011-10-19 09:12:34 +02:00
parent 34f2354f4c
commit 0403ff6560
3 changed files with 125 additions and 0 deletions

View File

@ -15585,3 +15585,29 @@ converted=2
cost={1}{R}
pt=3/3
timing=main
>Lavacore Elemental
url=http://magiccards.info/pc/en/103.html
image=http://magiccards.info/scans/en/pc/103.jpg
value=3
rarity=U
type=Creature
subtype=Elemental
color=r
converted=3
cost={2}{R}
pt=5/3
timing=main
>Ravaging Riftwurm
url=http://magiccards.info/fut/en/135.html
image=http://magiccards.info/scans/en/fut/135.jpg
value=5
rarity=U
type=Creature
subtype=Wurm
color=g
converted=3
cost={1}{G}{G}
pt=6/6
timing=main

View File

@ -0,0 +1,46 @@
package magic.card;
import magic.model.MagicCounterType;
import magic.model.MagicDamage;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.MagicSource;
import magic.model.action.MagicChangeCountersAction;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicComesIntoPlayWithCounterTrigger;
import magic.model.trigger.MagicFadeVanishCounterTrigger;
import magic.model.trigger.MagicWhenDamageIsDealtTrigger;
public class Lavacore_Elemental {
public static final MagicComesIntoPlayWithCounterTrigger T1 =
new MagicComesIntoPlayWithCounterTrigger(MagicCounterType.Charge,"time",1);
public static final MagicFadeVanishCounterTrigger T2 = new MagicFadeVanishCounterTrigger("time");
public static final MagicWhenDamageIsDealtTrigger T3 = new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
final MagicPlayer player = permanent.getController();
final MagicSource source = damage.getSource();
return (damage.isCombat() &&
damage.getTarget().isPlayer() &&
source.getController() == player) ?
new MagicEvent(
permanent,
player,
new Object[]{permanent},
this,
player + " puts a time 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.Charge,1,true));
}
};
}

View File

@ -0,0 +1,53 @@
package magic.card;
import magic.model.MagicCard;
import magic.model.MagicCounterType;
import magic.model.MagicGame;
import magic.model.MagicManaCost;
import magic.model.MagicPayedCost;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.action.MagicChangeCountersAction;
import magic.model.action.MagicPlayCardFromStackAction;
import magic.model.choice.MagicKickerChoice;
import magic.model.event.MagicEvent;
import magic.model.event.MagicSpellCardEvent;
import magic.model.stack.MagicCardOnStack;
import magic.model.trigger.MagicFadeVanishCounterTrigger;
public class Ravaging_Riftwurm {
public static final MagicFadeVanishCounterTrigger T = new MagicFadeVanishCounterTrigger("time");
public static final MagicSpellCardEvent S = new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
final MagicPlayer player = cardOnStack.getController();
final MagicCard card = cardOnStack.getCard();
return new MagicEvent(
card,
player,
new MagicKickerChoice(MagicManaCost.FOUR,false),
new Object[]{cardOnStack,player},
this,
"$Play " + card + ". If " + card + " was kicked$, " +
"it enters the battlefield with three additional time counters on it.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
final boolean kicked = ((Integer)choiceResults[1]) > 0;
final MagicCardOnStack cardOnStack = (MagicCardOnStack)data[0];
final MagicPlayCardFromStackAction action = new MagicPlayCardFromStackAction(cardOnStack);
game.doAction(action);
final MagicPermanent permanent = action.getPermanent();
game.doAction(new MagicChangeCountersAction(
permanent,
MagicCounterType.Charge,
kicked ? 5 : 2,
true));
}
};
}