Opponent's sites should be played when player moves, not his own.

Also the attached and stacked cards should be sent to player after all the non-stacked, non-attached are.
This commit is contained in:
marcins78@gmail.com
2011-09-19 00:27:07 +00:00
parent 9814b9ea92
commit 37456de949
2 changed files with 22 additions and 6 deletions

View File

@@ -128,9 +128,19 @@ public class GameState {
for (Map.Entry<String, Integer> stringIntegerEntry : _playerPosition.entrySet())
listener.setPlayerPosition(stringIntegerEntry.getKey(), stringIntegerEntry.getValue());
// First non-stacked non-attached cards
for (List<PhysicalCardImpl> physicalCards : _inPlay.values())
for (PhysicalCardImpl physicalCard : physicalCards)
listener.cardCreated(physicalCard);
for (PhysicalCardImpl physicalCard : physicalCards) {
if (physicalCard.getZone() != Zone.ATTACHED && physicalCard.getZone() != Zone.STACKED)
listener.cardCreated(physicalCard);
}
// Now the stacked and attached ones
for (List<PhysicalCardImpl> physicalCards : _inPlay.values())
for (PhysicalCardImpl physicalCard : physicalCards) {
if (physicalCard.getZone() == Zone.ATTACHED || physicalCard.getZone() == Zone.STACKED)
listener.cardCreated(physicalCard);
}
List<PhysicalCardImpl> hand = _hands.get(playerId);
if (hand != null) {

View File

@@ -6,6 +6,7 @@ import com.gempukku.lotro.game.LotroCardBlueprint;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.GameState;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.PlayOrder;
import com.gempukku.lotro.logic.effects.PlayCardEffect;
import com.gempukku.lotro.logic.timing.actions.SimpleEffectAction;
import com.gempukku.lotro.logic.timing.processes.GameProcess;
@@ -35,10 +36,15 @@ public class PlayerPlaysNextSiteIfNotThereGameProcess implements GameProcess {
if (nextSite == null) {
LotroCardBlueprint.Direction nextSiteDirection = gameState.getCurrentSite().getBlueprint().getSiteDirection();
String playerToPlaySite;
if (nextSiteDirection == LotroCardBlueprint.Direction.LEFT)
playerToPlaySite = gameState.getPlayerOrder().getClockwisePlayOrder(gameState.getCurrentPlayerId(), false).getNextPlayer();
else
playerToPlaySite = gameState.getPlayerOrder().getCounterClockwisePlayOrder(gameState.getCurrentPlayerId(), false).getNextPlayer();
if (nextSiteDirection == LotroCardBlueprint.Direction.LEFT) {
PlayOrder order = gameState.getPlayerOrder().getClockwisePlayOrder(gameState.getCurrentPlayerId(), false);
order.getNextPlayer();
playerToPlaySite = order.getNextPlayer();
} else {
PlayOrder order = gameState.getPlayerOrder().getCounterClockwisePlayOrder(gameState.getCurrentPlayerId(), false);
order.getNextPlayer();
playerToPlaySite = order.getNextPlayer();
}
nextSite = Filters.filter(gameState.getAdventureDeck(playerToPlaySite), gameState, _game.getModifiersQuerying(),
Filters.siteNumber(nextSiteNumber)).get(0);