added Corpse Cur and Corrupted Harvester

master
beholder 2011-10-03 13:24:28 +02:00
parent 9b2268d79a
commit 1ceb653b78
5 changed files with 140 additions and 0 deletions

View File

@ -11656,3 +11656,27 @@ converted=1
cost={G}
pt=1/1
timing=main
>Corpse Cur
image=http://magiccards.info/scans/en/som/147.jpg
value=3
rarity=C
type=Artifact,Creature
subtype=Hound
converted=4
cost={4}
pt=2/2
ability=infect
timing=main
>Corrupted Harvester
image=http://magiccards.info/scans/en/som/59.jpg
value=4
rarity=U
type=Creature
subtype=Horror
color=b
converted=6
cost={4}{B}{B}
pt=6/3
timing=main

View File

@ -0,0 +1,46 @@
package magic.card;
import magic.model.MagicCard;
import magic.model.MagicGame;
import magic.model.MagicLocationType;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.action.MagicCardAction;
import magic.model.action.MagicMoveCardAction;
import magic.model.action.MagicRemoveCardAction;
import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicEvent;
import magic.model.target.MagicGraveyardTargetPicker;
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
public class Corpse_Cur {
public static final MagicWhenComesIntoPlayTrigger T = new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
return new MagicEvent(
permanent,
player,
new MagicMayChoice(
"You may return target creature card with infect from your graveyard to your hand.",
MagicTargetChoice.TARGET_CREATURE_CARD_WITH_INFECT_FROM_GRAVEYARD),
new MagicGraveyardTargetPicker(false),
MagicEvent.NO_DATA,
this,
"You may$ return target creature card$ with infect from your graveyard to your hand.");
}
@Override
public void executeEvent(final MagicGame game,final MagicEvent event,final Object data[],final Object[] choiceResults) {
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
event.processTargetCard(game,choiceResults,1,new MagicCardAction() {
public void doAction(final MagicCard card) {
game.doAction(new MagicRemoveCardAction(card,MagicLocationType.Graveyard));
game.doAction(new MagicMoveCardAction(card,MagicLocationType.Graveyard,MagicLocationType.OwnersHand));
}
});
}
}
};
}

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.MagicSource;
import magic.model.action.MagicRegenerateAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.condition.MagicCondition;
import magic.model.condition.MagicSingleActivationCondition;
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 Corrupted_Harvester {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{
MagicManaCost.BLACK.getCondition(),
MagicCondition.ONE_CREATURE_CONDITION,
MagicCondition.CAN_REGENERATE_CONDITION,
new MagicSingleActivationCondition()
},
new MagicActivationHints(MagicTiming.Pump),
"Regen") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{
new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.BLACK),
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,
"Regenerate " + source + ".");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
game.doAction(new MagicRegenerateAction((MagicPermanent)data[0]));
}
};
}

View File

@ -220,6 +220,9 @@ public class MagicTargetChoice extends MagicChoice {
new MagicTargetChoice(MagicTargetFilter.TARGET_CARD_FROM_GRAVEYARD,false,MagicTargetHint.None,"target creature card from your graveyard");
public static final MagicTargetChoice TARGET_CREATURE_CARD_FROM_GRAVEYARD=
new MagicTargetChoice(MagicTargetFilter.TARGET_CREATURE_CARD_FROM_GRAVEYARD,false,MagicTargetHint.None,"target creature card from your graveyard");
public static final MagicTargetChoice TARGET_CREATURE_CARD_WITH_INFECT_FROM_GRAVEYARD=
new MagicTargetChoice(MagicTargetFilter.TARGET_CREATURE_CARD_WITH_INFECT_FROM_GRAVEYARD,false,MagicTargetHint.None,
"target creature card with infect from your graveyard");
public static final MagicTargetChoice TARGET_PERMANENT_CARD_FROM_GRAVEYARD =
new MagicTargetChoice(MagicTargetFilter.TARGET_PERMANENT_CARD_FROM_GRAVEYARD,false,MagicTargetHint.None,"target permanent card from your graveyard");
public static final MagicTargetChoice TARGET_PERMANENT_CARD_CMC_LEQ_3_FROM_GRAVEYARD=

View File

@ -1202,6 +1202,17 @@ public interface MagicTargetFilter {
}
};
MagicTargetFilter TARGET_CREATURE_CARD_WITH_INFECT_FROM_GRAVEYARD = new MagicTargetFilter() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
final MagicCardDefinition cardDefinition = ((MagicCard)target).getCardDefinition();
return cardDefinition.isCreature() &&
cardDefinition.hasAbility(MagicAbility.Infect);
}
public boolean acceptType(final MagicTargetType targetType) {
return targetType == MagicTargetType.Graveyard;
}
};
MagicTargetFilter TARGET_PERMANENT_CARD_FROM_GRAVEYARD = new MagicTargetFilter() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
return !((MagicCard)target).getCardDefinition().isSpell();