added Ferrovore and Recurring Nightmare

master
beholder 2011-10-04 07:13:57 +02:00
parent 0f2c6b2021
commit f3521a1ba1
3 changed files with 142 additions and 0 deletions

View File

@ -11746,3 +11746,25 @@ converted=3
cost={1}{G}{G}
pt=2/2
timing=fmain
>Ferrovore
image=http://magiccards.info/scans/en/som/88.jpg
value=2
rarity=C
type=Creature
subtype=Beast
color=r
converted=3
cost={2}{R}
pt=2/2
timing=main
>Recurring Nightmare
image=http://magiccards.info/scans/en/ex/72.jpg
value=4
rarity=R
type=Enchantment
color=b
converted=3
cost={2}{B}
timing=enchantment

View File

@ -0,0 +1,56 @@
package magic.card;
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.MagicChangeTurnPTAction;
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.MagicSacrificePermanentEvent;
import magic.model.event.MagicTiming;
public class Ferrovore {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{
MagicManaCost.RED.getCondition(),
MagicCondition.ONE_CREATURE_CONDITION,
MagicCondition.CONTROL_ARTIFACT_CONDITION
},
new MagicActivationHints(MagicTiming.Pump),
"Pump") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
final MagicPlayer player = source.getController();
return new MagicEvent[]{
new MagicPayManaCostEvent(source,player,MagicManaCost.RED),
new MagicSacrificePermanentEvent(
source,
player,
MagicTargetChoice.SACRIFICE_ARTIFACT)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
source.getController(),
new Object[]{source},
this,
source + " gets +3/+0 until end of turn.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
game.doAction(new MagicChangeTurnPTAction((MagicPermanent)data[0],3,0));
}
};
}

View File

@ -0,0 +1,64 @@
package magic.card;
import magic.model.MagicCard;
import magic.model.MagicGame;
import magic.model.MagicLocationType;
import magic.model.MagicPayedCost;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.MagicSource;
import magic.model.action.MagicCardAction;
import magic.model.action.MagicPlayCardAction;
import magic.model.action.MagicReanimateAction;
import magic.model.action.MagicRemoveFromPlayAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
import magic.model.event.MagicSacrificePermanentEvent;
import magic.model.event.MagicTiming;
import magic.model.target.MagicGraveyardTargetPicker;
public class Recurring_Nightmare {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{
MagicCondition.ONE_CREATURE_CONDITION,
MagicCondition.SORCERY_CONDITION
},
new MagicActivationHints(MagicTiming.Pump),
"Return") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{new MagicSacrificePermanentEvent(
source,
source.getController(),
MagicTargetChoice.SACRIFICE_CREATURE)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
source.getController(),
MagicTargetChoice.TARGET_CREATURE_CARD_FROM_GRAVEYARD,
new MagicGraveyardTargetPicker(true),
new Object[]{source,source.getController()},
this,
"Return " + source + " to its owner's hand. Return " +
"target creature card$ from your graveyard to the battlefield.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
game.doAction(new MagicRemoveFromPlayAction((MagicPermanent)data[0],MagicLocationType.OwnersHand));
event.processTargetCard(game,choiceResults,0,new MagicCardAction() {
public void doAction(final MagicCard targetCard) {
game.doAction(new MagicReanimateAction((MagicPlayer)data[1],targetCard,MagicPlayCardAction.NONE));
}
});
}
};
}