undo change to MagicRegenerationActivation. added Elder of Laurels

master
beholder 2011-09-25 16:07:03 +02:00
parent 0edb31f1e4
commit 6473c94057
4 changed files with 70 additions and 0 deletions

View File

@ -4189,6 +4189,18 @@ cost={2}{W}
pt=2/2
timing=main
>Elder of Laurels
image=http://magiccards.info/scans/en/isd/177.jpg
value=3
rarity=R
type=Creature
subtype=Human,Advisor
color=g
converted=3
cost={2}{G}
pt=2/3
timing=fmain
>Morkrut Banshee
image=http://magiccards.info/scans/en/isd/110.jpg
value=4

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.MagicType;
import magic.model.action.MagicChangeTurnPTAction;
import magic.model.action.MagicPermanentAction;
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.MagicPumpTargetPicker;
public class Elder_of_Laurels {
public static final MagicPermanentActivation A = new MagicPermanentActivation(
new MagicCondition[]{MagicManaCost.THREE_GREEN.getCondition()},
new MagicActivationHints(MagicTiming.Pump,true),
"Pump") {
@Override
public MagicEvent[] getCostEvent(final MagicSource source) {
return new MagicEvent[]{new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.THREE_GREEN)};
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
source.getController(),
MagicTargetChoice.POS_TARGET_CREATURE,
MagicPumpTargetPicker.getInstance(),
new Object[]{source.getController()},
this,
"Target creature gets +X/+X until end of turn, " +
"where X is the number of creatures you control.");
}
@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) {
final int amount = ((MagicPlayer)data[0]).getNrOfPermanentsWithType(MagicType.Creature,game);
game.doAction(new MagicChangeTurnPTAction(creature,amount,amount));
}
});
}
};
}

View File

@ -57,6 +57,7 @@ public class MagicManaCost {
public static final MagicManaCost TWO_BLUE_BLUE=MagicManaCost.createCost("{2}{U}{U}");
public static final MagicManaCost ONE_GREEN=MagicManaCost.createCost("{1}{G}");
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 X_RED=MagicManaCost.createCost("{X}{R}");
public static final MagicManaCost ONE_RED=MagicManaCost.createCost("{1}{R}");

View File

@ -19,6 +19,7 @@ public class MagicRegenerationActivation extends MagicPermanentActivation {
new MagicCondition[]{
MagicCondition.CAN_REGENERATE_CONDITION,
cost.getCondition(),
new MagicSingleActivationCondition(),
},
ACTIVATION_HINTS,
"Regen");