Fixing problem with cards affecting game during play-starting-fellowship process.

This commit is contained in:
marcins78@gmail.com
2011-09-13 09:47:00 +00:00
parent 295587c551
commit f7f1799c95

View File

@@ -1,9 +1,12 @@
package com.gempukku.lotro.logic.timing.processes.pregame;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.PlayOrder;
import com.gempukku.lotro.logic.timing.processes.GameProcess;
import java.util.List;
public class PlayStartingFellowshipGameProcess implements GameProcess {
private LotroGame _game;
private PlayOrder _playOrder;
@@ -18,10 +21,20 @@ public class PlayStartingFellowshipGameProcess implements GameProcess {
@Override
public void process() {
String nextPlayer = _playOrder.getNextPlayer();
if (_game.getGameState().getCurrentPlayerId() != null)
_game.getGameState().stopAffectingCardsForCurrentPlayer();
if (nextPlayer != null) {
if (_game.getGameState().getCurrentPlayerId() != null)
_game.getGameState().stopAffectingCardsForCurrentPlayer();
_game.getGameState().startPlayerTurn(nextPlayer);
PhysicalCard ringBearer = _game.getGameState().getRingBearer(nextPlayer);
_game.getGameState().startAffecting(ringBearer, _game.getModifiersEnvironment());
List<PhysicalCard> attachedToRingBearer = _game.getGameState().getAttachedCards(ringBearer);
for (PhysicalCard physicalCard : attachedToRingBearer)
_game.getGameState().startAffecting(physicalCard, _game.getModifiersEnvironment());
_nextProcess = new PlayerPlaysStartingFellowshipGameProcess(_game, nextPlayer, new PlayStartingFellowshipGameProcess(_game, _playOrder));
} else {
_nextProcess = new PlayersDrawEightCardsGameProcess(_game);