added Culling Dais and Darksteel Juggernaut

master
beholder 2011-10-03 14:27:26 +02:00
parent 1ceb653b78
commit 5c73963738
3 changed files with 141 additions and 0 deletions

View File

@ -11680,3 +11680,23 @@ converted=6
cost={4}{B}{B}
pt=6/3
timing=main
>Culling Dais
image=http://magiccards.info/scans/en/som/148.jpg
value=3
rarity=U
type=Artifact
converted=2
cost={2}
timing=artifact
>Darksteel Juggernaut
image=http://magiccards.info/scans/en/som/150.jpg
value=4
rarity=R
type=Artifact,Creature
subtype=Juggernaut
converted=5
cost={5}
ability=indestructible,attacks each turn if able
timing=main

View File

@ -0,0 +1,104 @@
package magic.card;
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.MagicSource;
import magic.model.action.MagicChangeCountersAction;
import magic.model.action.MagicDrawAction;
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.MagicSacrificeEvent;
import magic.model.event.MagicSacrificePermanentEvent;
import magic.model.event.MagicTapEvent;
import magic.model.event.MagicTiming;
public class Culling_Dais {
public static final MagicPermanentActivation A1 = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.CAN_TAP_CONDITION,
MagicCondition.ONE_CREATURE_CONDITION
},
new MagicActivationHints(MagicTiming.Pump),
"Charge") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{
new MagicTapEvent((MagicPermanent)source),
new MagicSacrificePermanentEvent(
source,
source.getController(),
MagicTargetChoice.SACRIFICE_CREATURE)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
source.getController(),
new Object[]{source},
this,
"Put a charge counter on " + source + ".");
}
@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));
}
};
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{MagicManaCost.ONE.getCondition()},
new MagicActivationHints(MagicTiming.Pump),
"Draw") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
final MagicPermanent permanent = (MagicPermanent)source;
return new MagicEvent[]{
new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.ONE),
new MagicSacrificeEvent(permanent)};
}
@Override
public MagicEvent getPermanentEvent(
final MagicPermanent source,
final MagicPayedCost payedCost) {
final MagicPlayer player = source.getController();
final int amount = source.getCounters(MagicCounterType.Charge);
return amount > 0 ?
new MagicEvent(
source,
player,
new Object[]{player,amount},
this,
amount > 1 ?
player + " draws " + amount + " cards." :
player + " draws a card.") :
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
game.doAction(new MagicDrawAction(
(MagicPlayer)data[0],
(Integer)data[1]));
}
};
}

View File

@ -0,0 +1,17 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPlayer;
import magic.model.MagicPowerToughness;
import magic.model.MagicType;
import magic.model.mstatic.MagicCDA;
public class Darksteel_Juggernaut {
public static final MagicCDA CDA = new MagicCDA() {
@Override
public void getPowerToughness(final MagicGame game,final MagicPlayer player,final MagicPowerToughness pt) {
final int amount = player.getNrOfPermanentsWithType(MagicType.Artifact,game);
pt.set(amount,amount);
}
};
}