added code for Pendelhaven's second ability
parent
b32674db83
commit
1c6f2098c9
|
@ -0,0 +1,52 @@
|
||||||
|
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.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.MagicTapEvent;
|
||||||
|
import magic.model.event.MagicPermanentActivation;
|
||||||
|
import magic.model.event.MagicTiming;
|
||||||
|
import magic.model.target.MagicPumpTargetPicker;
|
||||||
|
|
||||||
|
public class Pendelhaven {
|
||||||
|
public static final MagicPermanentActivation A = new MagicPermanentActivation(
|
||||||
|
new MagicCondition[]{MagicCondition.CAN_TAP_CONDITION},
|
||||||
|
new MagicActivationHints(MagicTiming.Pump,true),
|
||||||
|
"Pump") {
|
||||||
|
@Override
|
||||||
|
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||||
|
return new MagicEvent[]{new MagicTapEvent((MagicPermanent)source)};
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||||
|
return new MagicEvent(
|
||||||
|
source,
|
||||||
|
source.getController(),
|
||||||
|
MagicTargetChoice.POS_TARGET_1_1_CREATURE,
|
||||||
|
MagicPumpTargetPicker.create(),
|
||||||
|
MagicEvent.NO_DATA,
|
||||||
|
this,
|
||||||
|
"Target 1/1 creature$ gets +1/+2 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,2));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue