added Kemba's Skyguard and Lifesmith

master
beholder 2011-10-04 14:52:11 +02:00
parent 6a4ba1de6d
commit 599b7cfcba
3 changed files with 98 additions and 0 deletions

View File

@ -11946,3 +11946,28 @@ converted=3
cost={1}{W}{W}
pt=2/4
timing=main
>Kemba's Skyguard
image=http://magiccards.info/scans/en/som/13.jpg
value=3
rarity=C
type=Creature
subtype=Cat,Knight
color=w
converted=3
cost={1}{W}{W}
pt=2/2
ability=flying
timing=main
>Lifesmith
image=http://magiccards.info/scans/en/som/124.jpg
value=2
rarity=U
type=Creature
subtype=Human,Artificer
color=g
converted=2
cost={1}{G}
pt=2/1
timing=main

View File

@ -0,0 +1,31 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.action.MagicChangeLifeAction;
import magic.model.event.MagicEvent;
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
public class Kemba_s_Skyguard {
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 Object[]{player},
this,
player + " gains 2 life.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
game.doAction(new MagicChangeLifeAction((MagicPlayer)data[0],2));
}
};
}

View File

@ -0,0 +1,42 @@
package magic.card;
import magic.model.MagicCard;
import magic.model.MagicGame;
import magic.model.MagicManaCost;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.action.MagicChangeLifeAction;
import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicPayManaCostChoice;
import magic.model.event.MagicEvent;
import magic.model.stack.MagicCardOnStack;
import magic.model.trigger.MagicWhenSpellIsPlayedTrigger;
public class Lifesmith {
public static final MagicWhenSpellIsPlayedTrigger T = new MagicWhenSpellIsPlayedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack data) {
final MagicPlayer player = permanent.getController();
final MagicCard card = data.getCard();
return (card.getOwner() == player &&
data.getCardDefinition().isArtifact()) ?
new MagicEvent(
permanent,
player,
new MagicMayChoice(
"You may pay {1}.",
new MagicPayManaCostChoice(MagicManaCost.ONE)),
new Object[]{player},
this,
player + " may$ pay {1}$. If you do, you gain 3 life."):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game,final MagicEvent event,final Object data[],final Object[] choiceResults) {
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
game.doAction(new MagicChangeLifeAction((MagicPlayer)data[0],3));
}
}
};
}