Changing how the turn ends.

This commit is contained in:
marcins78
2013-02-01 12:39:36 +00:00
parent fe0f5f8340
commit 214e1f6b17
3 changed files with 9 additions and 8 deletions

View File

@@ -31,9 +31,10 @@ public class PlayerPlaysStartingFellowshipGameProcess implements GameProcess {
@Override
public void process(LotroGame game) {
Collection<PhysicalCard> possibleCharacters = getPossibleCharacters(game, _playerId);
if (possibleCharacters.size() == 0)
if (possibleCharacters.size() == 0) {
game.getGameState().stopAffectingCardsForCurrentPlayer();
_nextProcess = _followingGameProcess;
else
} else
game.getUserFeedback().sendAwaitingDecision(_playerId, createChooseNextCharacterDecision(game, _playerId, possibleCharacters));
}
@@ -57,9 +58,10 @@ public class PlayerPlaysStartingFellowshipGameProcess implements GameProcess {
@Override
public void decisionMade(String result) throws DecisionResultInvalidException {
List<PhysicalCard> selectedCharacters = getSelectedCardsByResponse(result);
if (selectedCharacters.size() == 0)
if (selectedCharacters.size() == 0) {
game.getGameState().stopAffectingCardsForCurrentPlayer();
_nextProcess = _followingGameProcess;
else {
} else {
PhysicalCard selectedPhysicalCard = selectedCharacters.get(0);
Action playCardAction = selectedPhysicalCard.getBlueprint().getPlayCardAction(playerId, game, selectedPhysicalCard, 0, false);
game.getActionsEnvironment().addActionToStack(playCardAction);

View File

@@ -1,6 +1,5 @@
package com.gempukku.lotro.logic.timing.processes.turn;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.PlayOrder;
import com.gempukku.lotro.logic.timing.processes.GameProcess;
@@ -8,9 +7,6 @@ import com.gempukku.lotro.logic.timing.processes.GameProcess;
public class BetweenTurnsProcess implements GameProcess {
@Override
public void process(LotroGame game) {
game.getGameState().stopAffectingCardsForCurrentPlayer();
game.getGameState().setCurrentPhase(Phase.BETWEEN_TURNS);
PlayOrder playOrder = game.getGameState().getPlayerOrder().getClockwisePlayOrder(game.getGameState().getCurrentPlayerId(), false);
playOrder.getNextPlayer();

View File

@@ -1,5 +1,6 @@
package com.gempukku.lotro.logic.timing.processes.turn;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.game.state.actions.DefaultActionsEnvironment;
import com.gempukku.lotro.logic.actions.SystemQueueAction;
@@ -36,6 +37,8 @@ public class EndOfTurnGameProcess implements GameProcess {
public void playEffect(LotroGame game) {
((ModifiersLogic) game.getModifiersEnvironment()).removeEndOfTurn();
((DefaultActionsEnvironment) game.getActionsEnvironment()).removeEndOfTurnActionProxies();
game.getGameState().stopAffectingCardsForCurrentPlayer();
game.getGameState().setCurrentPhase(Phase.BETWEEN_TURNS);
}
});
game.getActionsEnvironment().addActionToStack(action);