put signature of executeEvent on one line

master
melvin 2013-06-07 14:47:04 +08:00
parent c30c037b06
commit 27ecc51e3a
68 changed files with 101 additions and 258 deletions

View File

@ -79,9 +79,7 @@ public class MagicCardActivation extends MagicActivation<MagicCard> implements M
};
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
throw new RuntimeException(getClass() + " did not override executeEvent");
}

View File

@ -26,9 +26,7 @@ public class MagicCounterUnlessEvent extends MagicEvent {
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicItemOnStack itemOnStack = event.getRefItemOnStack();
if (event.isYes()) {
event.payManaCost(game,itemOnStack.getController());

View File

@ -20,9 +20,7 @@ public class MagicDeclareAttackersEvent extends MagicEvent {
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final MagicDeclareAttackersResult result = event.getAttackers();
game.doAction(new MagicDeclareAttackersAction(player,result));

View File

@ -44,9 +44,7 @@ public class MagicEvent implements MagicCopyable {
public static final MagicEvent[] NO_EVENTS = new MagicEvent[0];
private static final MagicCopyable NO_REF = new MagicInteger(-1);
private static final MagicEventAction NO_ACTION = new MagicEventAction() {
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
//do nothing
}
};

View File

@ -18,9 +18,7 @@ public class MagicExcludeEvent extends MagicEvent {
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.getExclude().exclude(game);
}
};

View File

@ -31,9 +31,7 @@ public class MagicExileCardEvent extends MagicEvent {
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCard(game,new MagicCardAction() {
public void doAction(final MagicCard card) {
game.doAction(new MagicRemoveCardAction(

View File

@ -23,9 +23,7 @@ public class MagicMulliganEvent extends MagicEvent {
}
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
if (event.isYes()) {
final MagicCardList hand = new MagicCardList(player.getHand());

View File

@ -27,9 +27,7 @@ public class MagicPayManaCostEvent extends MagicEvent {
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.payManaCost(game,event.getPlayer());
}
};

View File

@ -59,9 +59,7 @@ public abstract class MagicPermanentActivation extends MagicActivation<MagicPerm
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public final void executeEvent(
final MagicGame game,
final MagicEvent event) {
public final void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPermanentActivation permanentActivation = event.getRefPermanentActivation();
final MagicPermanent permanent = event.getPermanent();
final MagicAbilityOnStack abilityOnStack = new MagicAbilityOnStack(
@ -83,9 +81,7 @@ public abstract class MagicPermanentActivation extends MagicActivation<MagicPerm
public abstract MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost);
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
throw new RuntimeException(getClass() + " did not override executeEvent");
}
@ -105,24 +101,22 @@ public abstract class MagicPermanentActivation extends MagicActivation<MagicPerm
}
@Override
public MagicEvent getPermanentEvent(
final MagicPermanent source,
final MagicPayedCost payedCost) {
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"Put a charge counter on SN.");
"Put a charge counter on SN."
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(
event.getPermanent(),
MagicCounterType.Charge,
1,
true));
true
));
}
};
@ -144,12 +138,11 @@ public abstract class MagicPermanentActivation extends MagicActivation<MagicPerm
return new MagicEvent(
source,
this,
"Untap SN.");
"Untap SN."
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicUntapAction(event.getPermanent()));
}
};
@ -204,9 +197,7 @@ public abstract class MagicPermanentActivation extends MagicActivation<MagicPerm
"Return SN to its owner's hand.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicRemoveFromPlayAction(event.getPermanent(),MagicLocationType.OwnersHand));
}
};
@ -230,9 +221,7 @@ public abstract class MagicPermanentActivation extends MagicActivation<MagicPerm
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicAddStaticAction(event.getPermanent(), MagicStatic.SwitchPT));
}
};

View File

@ -38,9 +38,7 @@ public class MagicPingActivation extends MagicPermanentActivation {
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTarget(game,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
final MagicDamage damage=new MagicDamage(event.getSource(),target,n);

View File

@ -14,9 +14,7 @@ public class MagicPlayAbilityEvent extends MagicEvent {
}
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicPlayAbilityAction(event.getPermanent()));
}
};

View File

@ -37,9 +37,7 @@ public class MagicPlayAuraEvent extends MagicSpellCardEvent {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicPlayCardFromStackAction(event.getCardOnStack(),creature));

View File

@ -25,9 +25,7 @@ public class MagicPlayCardEvent {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicPlayCardFromStackAction(event.getCardOnStack()));
}
};
@ -44,9 +42,7 @@ public class MagicPlayCardEvent {
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicPlayCardFromStackAction(event.getCardOnStack(), event.getKickerCount()));
}
};
@ -64,9 +60,7 @@ public class MagicPlayCardEvent {
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final int X = event.getRefInt();
game.doAction(new MagicPlayCardFromStackAction(event.getCardOnStack(), X));
}

View File

@ -29,9 +29,7 @@ public class MagicPlayMulticounterEvent extends MagicSpellCardEvent {
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicCardOnStack cardOnStack = event.getCardOnStack();
final MagicPlayCardFromStackAction action = new MagicPlayCardFromStackAction(cardOnStack);
game.doAction(action);

View File

@ -12,9 +12,7 @@ public class MagicPriorityEvent extends MagicEvent {
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayChoiceResult playChoiceResult = event.getPlayChoice();
if (playChoiceResult==MagicPlayChoiceResult.PASS ||

View File

@ -27,9 +27,7 @@ public class MagicRedirectDamageEvent extends MagicEvent {
private static final MagicEventAction EventAction(final int amount, final boolean isCombat) {
return new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent planeswalker) {

View File

@ -28,9 +28,7 @@ public class MagicReturnAuraEvent extends MagicEvent {
private static final MagicEventAction EVENT_ACTION = new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicCardOnStack cardOnStack = event.getCardOnStack();
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {

View File

@ -23,9 +23,7 @@ import java.util.regex.Matcher;
public enum MagicRuleEventAction {
Destroy("destroy ([^\\.]*).", "neg", new MagicDestroyTargetPicker(false), new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicDestroyAction(creature));
@ -35,9 +33,7 @@ public enum MagicRuleEventAction {
}),
DestroyNoRegen("destroy ([^\\.]*). it can't be regenerated.", "neg", new MagicDestroyTargetPicker(true), new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicChangeStateAction(creature,MagicPermanentState.CannotBeRegenerated,true));
@ -48,9 +44,7 @@ public enum MagicRuleEventAction {
}),
Counter("counter ([^\\.]*).", "neg", MagicDefaultTargetPicker.create(), new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCardOnStack(game,new MagicCardOnStackAction() {
public void doAction(final MagicCardOnStack targetSpell) {
game.doAction(new MagicCounterItemOnStackAction(targetSpell));
@ -60,9 +54,7 @@ public enum MagicRuleEventAction {
}),
Exile("exile ([^\\.]*).", "neg", MagicExileTargetPicker.create(), new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent perm) {
game.doAction(new MagicRemoveFromPlayAction(perm,MagicLocationType.Exile));

View File

@ -33,9 +33,7 @@ public class MagicSacrificePermanentEvent extends MagicEvent {
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent permanent) {
game.doAction(new MagicSacrificeAction(permanent));

View File

@ -37,9 +37,7 @@ public class MagicSoulbondEvent extends MagicEvent {
private static final MagicEventAction EVENT_ACTION = new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {

View File

@ -34,9 +34,7 @@ public abstract class MagicSpellCardEvent implements MagicCardEvent,MagicEventAc
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
action.executeEvent(game, event);
}
};

View File

@ -19,9 +19,7 @@ public class MagicSpellCastEvent extends MagicEvent {
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicItemOnStack itemOnStack = event.getRefItemOnStack();
// execute spell is cast triggers

View File

@ -20,9 +20,7 @@ public class MagicStackGetChoicesEvent extends MagicEvent {
private static final MagicEventAction EVENT_ACTION=new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicItemOnStack itemOnStack = event.getRefItemOnStack();
itemOnStack.setChoiceResults(event.getChosen());

View File

@ -30,9 +30,7 @@ public abstract class MagicTapCreatureActivation extends MagicPermanentActivatio
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicTapAction(creature,true));

View File

@ -20,9 +20,7 @@ public abstract class MagicWeakenCreatureActivation extends MagicPermanentActiva
}
@Override
public MagicEvent getPermanentEvent(
final MagicPermanent source,
final MagicPayedCost payedCost) {
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_CREATURE,
@ -33,9 +31,7 @@ public abstract class MagicWeakenCreatureActivation extends MagicPermanentActiva
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicChangeCountersAction(

View File

@ -39,9 +39,7 @@ public class MagicAllyGrowTrigger extends MagicWhenOtherComesIntoPlayTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicChangeCountersAction(
event.getPermanent(),

View File

@ -30,9 +30,7 @@ public class MagicAnnihilatorTrigger extends MagicWhenAttacksTrigger {
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
int count = amount;
while (count > 0 && player.getPermanents().size() > 0) {

View File

@ -34,12 +34,11 @@ public abstract class MagicAtEndOfTurnTrigger extends MagicTrigger<MagicPlayer>
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicRemoveFromPlayAction(
event.getPermanent(),
MagicLocationType.OwnersHand));
MagicLocationType.OwnersHand
));
}
};
}

View File

@ -35,9 +35,7 @@ public abstract class MagicAtUpkeepTrigger extends MagicTrigger<MagicPlayer> {
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicChangeCountersAction(event.getPermanent(),MagicCounterType.Charge,1,true));
}

View File

@ -30,9 +30,7 @@ public class MagicAttacksPumpTrigger extends MagicWhenAttacksTrigger {
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeTurnPTAction(
event.getPermanent(),
power,

View File

@ -35,9 +35,7 @@ public class MagicBattleCryTrigger extends MagicWhenAttacksTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPermanent permanent = event.getPermanent();
final Collection<MagicPermanent> targets = game.filterPermanents(
event.getPlayer(),

View File

@ -42,9 +42,7 @@ public class MagicBecomesBlockedPumpTrigger extends MagicWhenBecomesBlockedTrigg
return MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeTurnPTAction(
event.getPermanent(),
amountPower,

View File

@ -32,9 +32,7 @@ public class MagicBloodthirstTrigger extends MagicWhenComesIntoPlayTrigger {
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(
event.getPermanent(),
MagicCounterType.PlusOne,

View File

@ -36,9 +36,7 @@ public class MagicComesIntoPlayWithCounterTrigger extends MagicWhenComesIntoPlay
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(
event.getPermanent(),
counterType,

View File

@ -56,9 +56,7 @@ public class MagicCumulativeUpkeepTrigger extends MagicAtUpkeepTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isNo()) {
game.doAction(new MagicSacrificeAction(event.getPermanent()));
}

View File

@ -35,9 +35,7 @@ public class MagicDamageGrowTrigger extends MagicWhenDamageIsDealtTrigger {
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(
event.getPermanent(),
MagicCounterType.PlusOne,

View File

@ -58,9 +58,7 @@ public class MagicDevourTrigger extends MagicWhenComesIntoPlayTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {

View File

@ -42,9 +42,7 @@ public class MagicDieDrawCardTrigger extends MagicWhenPutIntoGraveyardTrigger {
return MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (mustDraw) {
game.doAction(new MagicDrawAction(event.getPlayer(),1));
} else if (event.isYes()) {

View File

@ -38,9 +38,7 @@ public class MagicEchoTrigger extends MagicAtUpkeepTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPermanent permanent = event.getPermanent();
if (event.isYes()) {
game.doAction(new MagicChangeStateAction(

View File

@ -49,9 +49,7 @@ public class MagicEntersDamageTargetTrigger extends MagicWhenComesIntoPlayTrigge
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTarget(game,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
final MagicDamage damage = new MagicDamage(

View File

@ -24,12 +24,11 @@ public class MagicEntersDrawCardTrigger extends MagicWhenComesIntoPlayTrigger {
return new MagicEvent(
permanent,
this,
"PN draws a card.");
"PN draws a card."
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicDrawAction(event.getPlayer(),1));
}
}

View File

@ -71,9 +71,7 @@ public class MagicEntersExileCreatureOrSacrificeTrigger extends MagicWhenComesIn
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPermanent permanent = event.getPermanent();
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {

View File

@ -37,9 +37,7 @@ public class MagicExtortTrigger extends MagicWhenOtherSpellIsCastTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicChangeLifeAction(event.getPlayer().getOpponent(),-1));
game.doAction(new MagicChangeLifeAction(event.getPlayer(),1));

View File

@ -47,18 +47,14 @@ public class MagicFadeVanishCounterTrigger extends MagicAtUpkeepTrigger {
private static final MagicEventAction SAC_PERM = new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicSacrificeAction(event.getPermanent()));
}
};
private static final MagicEventAction REMOVE_COUNTER = new MagicEventAction() {
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(
event.getPermanent(),
MagicCounterType.Charge,

View File

@ -40,9 +40,7 @@ public class MagicFlankingTrigger extends MagicWhenBecomesBlockedTrigger {
return MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
for (final MagicPermanent blocker : event.getRefPermanentList()) {
game.doAction(new MagicChangeTurnPTAction(blocker,-1,-1));
}

View File

@ -26,9 +26,7 @@ public class MagicLandfallPumpTrigger extends MagicLandfallTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeTurnPTAction(
event.getPermanent(),
power,

View File

@ -44,9 +44,7 @@ public class MagicLeavesDamageTargetTrigger extends MagicWhenLeavesPlayTrigger {
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTarget(game,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
final MagicDamage damage = new MagicDamage(event.getSource(),target,n);

View File

@ -26,9 +26,7 @@ public class MagicLeavesGainLifeTrigger extends MagicWhenLeavesPlayTrigger {
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeLifeAction(event.getPlayer(),life));
}
};

View File

@ -33,9 +33,7 @@ public class MagicLeavesReturnExileTrigger extends MagicWhenLeavesPlayTrigger {
return MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicReturnExiledUntilThisLeavesPlayAction(event.getPermanent(),MagicLocationType.Play));
}
}

View File

@ -32,9 +32,7 @@ public class MagicLivingWeaponTrigger extends MagicWhenComesIntoPlayTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
//create the token
final MagicPlayTokenAction play_token=new MagicPlayTokenAction(

View File

@ -32,9 +32,7 @@ public class MagicMiracleTrigger extends MagicWhenDrawnTrigger {
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
final MagicCard card = event.getCard();

View File

@ -43,9 +43,7 @@ public class MagicModularTrigger extends MagicWhenPutIntoGraveyardTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {

View File

@ -28,9 +28,7 @@ public class MagicRampageTrigger extends MagicWhenBecomesBlockedTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final int amount = event.getRefInt();
game.doAction(new MagicChangeTurnPTAction(
event.getPermanent(),

View File

@ -35,9 +35,7 @@ public class MagicRavnicaLandTrigger extends MagicWhenComesIntoPlayTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicChangeLifeAction(event.getPlayer(),-2));
} else {

View File

@ -28,9 +28,7 @@ public class MagicRefugeLandTrigger extends MagicWhenComesIntoPlayTrigger {
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeLifeAction(event.getPlayer(),life));
}
}

View File

@ -32,9 +32,7 @@ public class MagicReplicateTrigger extends MagicWhenSpellIsCastTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicCardOnStack cardOnStack = event.getCardOnStack();
final int kickerCount = (Integer)cardOnStack.getChoiceResults()[1];
for (int i = 0; i < kickerCount; i++) {

View File

@ -28,9 +28,7 @@ public class MagicSacrificeAtEnd extends MagicAtEndOfTurnTrigger {
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicSacrificeAction(event.getPermanent()));
}
}

View File

@ -50,9 +50,7 @@ public class MagicSoulshiftTrigger extends MagicWhenPutIntoGraveyardTrigger {
return MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
event.processTargetCard(game,new MagicCardAction() {
public void doAction(final MagicCard card) {

View File

@ -34,9 +34,7 @@ public class MagicStormTrigger extends MagicWhenSpellIsCastTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final int count = event.getRefInt();
for (int i = 0; i < count; i++) {
game.doAction(new MagicCopyCardOnStackAction(

View File

@ -66,9 +66,7 @@ public class MagicThiefTrigger extends MagicWhenDamageIsDealtTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (choice == choice.Must) {
game.doAction(new MagicDrawAction(event.getPlayer(),amount));
} else if (event.isYes()) {

View File

@ -31,9 +31,7 @@ public abstract class MagicTrigger<T> implements MagicEventAction,MagicChangeCar
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
throw new RuntimeException(getClass() + " did not override executeEvent");
}

View File

@ -31,9 +31,7 @@ public class MagicUndyingTrigger extends MagicWhenDiesTrigger {
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicCard card = event.getPermanent().getCard();
game.doAction(new MagicReanimateAction(
card.getOwner(),

View File

@ -31,9 +31,7 @@ public class MagicUnleashTrigger extends MagicWhenComesIntoPlayTrigger {
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicChangeCountersAction(
event.getPermanent(),

View File

@ -28,9 +28,7 @@ public class MagicWhenBlocksPumpTrigger extends MagicWhenBlocksTrigger {
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeTurnPTAction(
event.getPermanent(),
amountPower,

View File

@ -50,9 +50,7 @@ public abstract class MagicWhenComesIntoPlayTrigger extends MagicTrigger<MagicPl
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
action.executeEvent(game, event);
}
};

View File

@ -35,9 +35,7 @@ public abstract class MagicWhenDiesTrigger extends MagicWhenPutIntoGraveyardTrig
);
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicCard card = event.getCard();
game.doAction(new MagicRemoveCardAction(card,MagicLocationType.Graveyard));
game.doAction(new MagicMoveCardAction(card,MagicLocationType.Graveyard,MagicLocationType.OwnersHand));

View File

@ -37,9 +37,7 @@ public abstract class MagicWhenOtherComesIntoPlayTrigger extends MagicTrigger<Ma
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(
event.getPermanent(),
MagicCounterType.PlusOne,

View File

@ -44,9 +44,7 @@ public abstract class MagicWhenPutIntoGraveyardTrigger extends MagicTrigger<Magi
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final MagicCardList graveyard = new MagicCardList(player.getGraveyard());
for (final MagicCard card : graveyard) {