added Scuttling Death and Thief of Hope

master
beholder 2011-10-30 16:06:37 +01:00
parent 5061e947cf
commit dc33750a51
3 changed files with 126 additions and 0 deletions

View File

@ -18029,3 +18029,29 @@ converted=4
cost={2}{G}{G}
pt=3/3
timing=main
>Scuttling Death
url=http://magiccards.info/chk/en/142.html
image=http://magiccards.info/scans/en/chk/142.jpg
value=3
rarity=C
type=Creature
subtype=Spirit
color=b
converted=5
cost={4}{B}
pt=4/2
timing=main
>Thief of Hope
url=http://magiccards.info/chk/en/147.html
image=http://magiccards.info/scans/en/chk/147.jpg
value=3
rarity=U
type=Creature
subtype=Spirit
color=b
converted=3
cost={2}{B}
pt=2/2
timing=fmain

View File

@ -0,0 +1,57 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPayedCost;
import magic.model.MagicPermanent;
import magic.model.MagicSource;
import magic.model.action.MagicChangeTurnPTAction;
import magic.model.action.MagicPermanentAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicActivation;
import magic.model.event.MagicActivationHints;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPermanentActivation;
import magic.model.event.MagicSacrificeEvent;
import magic.model.event.MagicTiming;
import magic.model.target.MagicWeakenTargetPicker;
import magic.model.trigger.MagicSoulshiftTrigger;
public class Scuttling_Death {
public static final MagicSoulshiftTrigger T = new MagicSoulshiftTrigger(4);
public static final MagicPermanentActivation A = new MagicPermanentActivation(
MagicActivation.NO_COND,
new MagicActivationHints(MagicTiming.Removal),
"Weaken") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{new MagicSacrificeEvent((MagicPermanent)source)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
source.getController(),
MagicTargetChoice.NEG_TARGET_CREATURE,
new MagicWeakenTargetPicker(1,1),
MagicEvent.NO_DATA,
this,
"Target creature$ gets -1/-1 until end of turn.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicChangeTurnPTAction(creature,-1,-1));
}
});
}
};
}

View File

@ -0,0 +1,43 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.MagicSubType;
import magic.model.action.MagicChangeLifeAction;
import magic.model.event.MagicEvent;
import magic.model.stack.MagicCardOnStack;
import magic.model.trigger.MagicSoulshiftTrigger;
import magic.model.trigger.MagicWhenSpellIsPlayedTrigger;
// this card ignores the part that deals with Arcane spells
public class Thief_of_Hope {
public static final MagicSoulshiftTrigger T1 = new MagicSoulshiftTrigger(2);
public static final MagicWhenSpellIsPlayedTrigger T2 = new MagicWhenSpellIsPlayedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack data) {
final MagicPlayer player = permanent.getController();
return (data.getCard().getOwner() == player &&
data.getCardDefinition().hasSubType(MagicSubType.Spirit)) ?
new MagicEvent(
permanent,
player,
new Object[]{player},
this,
game.getOpponent(player) + " loses 1 life and " +
player + " gains 1 life."):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
final MagicPlayer player = (MagicPlayer)data[0];
game.doAction(new MagicChangeLifeAction(game.getOpponent(player),-1));
game.doAction(new MagicChangeLifeAction(player,1));
}
};
}