- CheckStyle.

This commit is contained in:
Chris
2012-02-17 14:37:11 +00:00
parent edf56ffaca
commit 9309487b32

View File

@@ -288,13 +288,13 @@ public class AbilityFactoryTurns {
} }
} }
} }
// ************************************************************************* // *************************************************************************
// ************************* END TURN ************************************** // ************************* END TURN **************************************
// ************************************************************************* // *************************************************************************
public static SpellAbility createAbilityEndTurn(final AbilityFactory af) { public static SpellAbility createAbilityEndTurn(final AbilityFactory af) {
SpellAbility ret = new AbilityActivated(af.getHostCard(),af.getAbCost(),af.getAbTgt()) { SpellAbility ret = new AbilityActivated(af.getHostCard(), af.getAbCost(), af.getAbTgt()) {
private static final long serialVersionUID = 72570867940224012L; private static final long serialVersionUID = 72570867940224012L;
@@ -302,41 +302,41 @@ public class AbilityFactoryTurns {
public String getStackDescription() { public String getStackDescription() {
return "End the turn."; return "End the turn.";
} }
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
return false; return false;
} }
@Override @Override
public boolean doTrigger(boolean mandatory) { public boolean doTrigger(boolean mandatory) {
if(mandatory) { if (mandatory) {
return true; return true;
} }
return false; return false;
} }
@Override @Override
public void resolve() { public void resolve() {
endTurnResolve(af,this); endTurnResolve(af, this);
} }
}; };
return ret; return ret;
} }
public static SpellAbility createSpellEndTurn(final AbilityFactory af) { public static SpellAbility createSpellEndTurn(final AbilityFactory af) {
SpellAbility ret = new Spell(af.getHostCard(),af.getAbCost(),af.getAbTgt()) { SpellAbility ret = new Spell(af.getHostCard(), af.getAbCost(), af.getAbTgt()) {
private static final long serialVersionUID = -2553413143747617709L; private static final long serialVersionUID = -2553413143747617709L;
@Override @Override
public String getStackDescription() { public String getStackDescription() {
return "End the turn."; return "End the turn.";
} }
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
return false; return false;
@@ -344,14 +344,14 @@ public class AbilityFactoryTurns {
@Override @Override
public void resolve() { public void resolve() {
endTurnResolve(af,this); endTurnResolve(af, this);
} }
}; };
return ret; return ret;
} }
public static SpellAbility createDrawbackEndTurn(final AbilityFactory af) { public static SpellAbility createDrawbackEndTurn(final AbilityFactory af) {
final SpellAbility dbEndTurn = new AbilitySub(af.getHostCard(), af.getAbTgt()) { final SpellAbility dbEndTurn = new AbilitySub(af.getHostCard(), af.getAbTgt()) {
private static final long serialVersionUID = -562517287448810951L; private static final long serialVersionUID = -562517287448810951L;
@@ -373,36 +373,36 @@ public class AbilityFactoryTurns {
@Override @Override
public boolean doTrigger(final boolean mandatory) { public boolean doTrigger(final boolean mandatory) {
if(mandatory) { if (mandatory) {
return true; return true;
} }
return false; return false;
} }
}; };
return dbEndTurn; return dbEndTurn;
} }
private static void endTurnResolve(final AbilityFactory af, final SpellAbility sa) { private static void endTurnResolve(final AbilityFactory af, final SpellAbility sa) {
//Steps taken from gatherer's rulings on Time Stop. //Steps taken from gatherer's rulings on Time Stop.
//1) All spells and abilities on the stack are exiled. This includes Time Stop, though it will continue to resolve. It also includes spells and abilities that can't be countered. //1) All spells and abilities on the stack are exiled. This includes Time Stop, though it will continue to resolve. It also includes spells and abilities that can't be countered.
for(Card c : AllZone.getStackZone().getCards()) { for (Card c : AllZone.getStackZone().getCards()) {
AllZone.getGameAction().exile(c); AllZone.getGameAction().exile(c);
} }
AllZone.getStack().getStack().clear(); AllZone.getStack().getStack().clear();
//2) All attacking and blocking creatures are removed from combat. //2) All attacking and blocking creatures are removed from combat.
AllZone.getCombat().resetAttackers(); AllZone.getCombat().resetAttackers();
AllZone.getCombat().resetBlockers(); AllZone.getCombat().resetBlockers();
//3) State-based actions are checked. No player gets priority, and no triggered abilities are put onto the stack. //3) State-based actions are checked. No player gets priority, and no triggered abilities are put onto the stack.
AllZone.getGameAction().checkStateEffects(); AllZone.getGameAction().checkStateEffects();
//4) The current phase and/or step ends. The game skips straight to the cleanup step. The cleanup step happens in its entirety. //4) The current phase and/or step ends. The game skips straight to the cleanup step. The cleanup step happens in its entirety.
AllZone.getPhaseHandler().setPhaseState(Constant.Phase.CLEANUP); AllZone.getPhaseHandler().setPhaseState(Constant.Phase.CLEANUP);
//Update observers //Update observers
AllZone.getStack().updateObservers(); AllZone.getStack().updateObservers();
AllZone.getComputerPlayer().updateObservers(); AllZone.getComputerPlayer().updateObservers();