added Embersmith and Ezuri, Renegade Leader

master
beholder 2011-10-03 15:26:26 +02:00
parent 7886d66d23
commit 0f2c6b2021
4 changed files with 189 additions and 0 deletions

View File

@ -11722,3 +11722,27 @@ converted=2
cost={1}{B}
pt=2/1
timing=main
>Embersmith
image=http://magiccards.info/scans/en/som/87.jpg
value=2
rarity=U
type=Creature
subtype=Human,Artificer
color=r
converted=2
cost={1}{R}
pt=2/1
timing=fmain
>Ezuri, Renegade Leader
image=http://magiccards.info/scans/en/som/119.jpg
value=4
rarity=R
type=Legendary,Creature
subtype=Elf,Warrior
color=g
converted=3
cost={1}{G}{G}
pt=2/2
timing=fmain

View File

@ -0,0 +1,58 @@
package magic.card;
import magic.model.MagicCard;
import magic.model.MagicDamage;
import magic.model.MagicGame;
import magic.model.MagicManaCost;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.action.MagicDealDamageAction;
import magic.model.action.MagicTargetAction;
import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicPayManaCostChoice;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicEvent;
import magic.model.stack.MagicCardOnStack;
import magic.model.target.MagicDamageTargetPicker;
import magic.model.target.MagicTarget;
import magic.model.trigger.MagicWhenSpellIsPlayedTrigger;
public class Embersmith {
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),
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER),
new MagicDamageTargetPicker(2),
new Object[]{permanent},
this,
"You may$ pay {1}$. If you do, " + permanent + " deals 1 " +
"damage to target creature or player$."):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
event.processTarget(game,choiceResults,2,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
final MagicDamage damage = new MagicDamage((MagicPermanent)data[0],target,1,false);
game.doAction(new MagicDealDamageAction(damage));
}
});
}
}
};
}

View File

@ -0,0 +1,106 @@
package magic.card;
import java.util.Collection;
import magic.model.MagicAbility;
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.action.MagicPermanentAction;
import magic.model.action.MagicRegenerateAction;
import magic.model.action.MagicSetAbilityAction;
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.MagicTiming;
import magic.model.target.MagicRegenerateTargetPicker;
import magic.model.target.MagicTarget;
import magic.model.target.MagicTargetFilter;
import magic.model.target.MagicTargetHint;
public class Ezuri__Renegade_Leader {
public static final MagicPermanentActivation A1 = new MagicPermanentActivation(
new MagicCondition[]{
MagicManaCost.GREEN.getCondition()},
new MagicActivationHints(MagicTiming.Pump,false),
"Regen") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.GREEN)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
final MagicTargetFilter targetFilter = new MagicTargetFilter.MagicOtherPermanentTargetFilter(
MagicTargetFilter.TARGET_ELF,source);
final MagicTargetChoice targetChoice = new MagicTargetChoice(
targetFilter,true,MagicTargetHint.Positive,"another target Elf");
return new MagicEvent(
source,
source.getController(),
targetChoice,
MagicRegenerateTargetPicker.getInstance(),
MagicEvent.NO_DATA,
this,
"Regenerate another target Elf$.");
}
@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 MagicRegenerateAction(creature));
}
});
}
};
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
new MagicCondition[]{
MagicManaCost.TWO_GREEN_GREEN_GREEN.getCondition()},
new MagicActivationHints(MagicTiming.Pump,true),
"Pump") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.TWO_GREEN_GREEN_GREEN)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
source.getController(),
new Object[]{source.getController()},
this,
"Elf creatures you control get +3/+3 and gain trample until end of turn.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
final Collection<MagicTarget> targets =
game.filterTargets((MagicPlayer)data[0],MagicTargetFilter.TARGET_ELF_YOU_CONTROL);
for (final MagicTarget target : targets) {
final MagicPermanent creature = (MagicPermanent)target;
game.doAction(new MagicChangeTurnPTAction(creature,3,3));
game.doAction(new MagicSetAbilityAction(creature,MagicAbility.Trample));
}
}
};
}

View File

@ -59,6 +59,7 @@ public class MagicManaCost {
public static final MagicManaCost TWO_GREEN=MagicManaCost.createCost("{2}{G}");
public static final MagicManaCost THREE_GREEN=MagicManaCost.createCost("{3}{G}");
public static final MagicManaCost TWO_GREEN_GREEN=MagicManaCost.createCost("{2}{G}{G}");
public static final MagicManaCost TWO_GREEN_GREEN_GREEN=MagicManaCost.createCost("{2}{G}{G}{G}");
public static final MagicManaCost X_RED=MagicManaCost.createCost("{X}{R}");
public static final MagicManaCost ONE_RED=MagicManaCost.createCost("{1}{R}");
public static final MagicManaCost TWO_RED=MagicManaCost.createCost("{2}{R}");