Only the site where the fellowship currently is has its text affecting gameplay.

This commit is contained in:
marcins78@gmail.com
2011-09-26 14:25:10 +00:00
parent 6ef56dc480
commit 43f861c1ed
3 changed files with 10 additions and 4 deletions

View File

@@ -21,13 +21,15 @@ public class PlaySiteEffect extends UnrespondableEffect {
GameState gameState = game.getGameState();
PhysicalCard card = gameState.getSite(_siteNumber);
if (card != null) {
gameState.stopAffecting(card);
if (gameState.getCurrentSiteNumber() == _siteNumber)
gameState.stopAffecting(card);
gameState.removeCardFromZone(card);
gameState.addCardToZone(card, Zone.DECK);
}
PhysicalCard newSite = Filters.filter(gameState.getAdventureDeck(_playerId), game.getGameState(), game.getModifiersQuerying(), Filters.siteNumber(_siteNumber)).iterator().next();
gameState.sendMessage(newSite.getOwner() + " plays " + newSite.getBlueprint().getName());
gameState.addCardToZone(newSite, Zone.ADVENTURE_PATH);
gameState.startAffecting(newSite, game.getModifiersEnvironment());
if (gameState.getCurrentSiteNumber() == _siteNumber)
gameState.startAffecting(newSite, game.getModifiersEnvironment());
}
}

View File

@@ -560,16 +560,18 @@ public class GameState {
public void startAffectingCardsForCurrentPlayer(ModifiersEnvironment modifiersEnvironment) {
for (PhysicalCardImpl physicalCard : _inPlay) {
if (isCardInPlayActive(physicalCard))
if (isCardInPlayActive(physicalCard) && physicalCard.getBlueprint().getSide() != Side.SITE)
startAffecting(physicalCard, modifiersEnvironment);
}
startAffecting(getCurrentSite(), modifiersEnvironment);
}
public void stopAffectingCardsForCurrentPlayer() {
for (PhysicalCardImpl physicalCard : _inPlay) {
if (isCardInPlayActive(physicalCard))
if (isCardInPlayActive(physicalCard) && physicalCard.getBlueprint().getSide() != Side.SITE)
stopAffecting(physicalCard);
}
stopAffecting(getCurrentSite());
}
public void startAffecting(PhysicalCard card, ModifiersEnvironment modifiersEnvironment) {

View File

@@ -18,7 +18,9 @@ public class MovePlayerTokenToNextSiteGameProcess implements GameProcess {
@Override
public void process() {
GameState gameState = _game.getGameState();
gameState.stopAffecting(gameState.getCurrentSite());
gameState.setPlayerPosition(gameState.getCurrentPlayerId(), gameState.getCurrentSiteNumber() + 1);
gameState.startAffecting(gameState.getCurrentSite(), _game.getModifiersEnvironment());
gameState.increaseMoveCount();
int siteTwilightCost = _game.getModifiersQuerying().getTwilightCost(gameState, gameState.getCurrentSite());