diff --git a/client/src/Actions.js b/client/src/Actions.js index d86cad0..4ee430d 100644 --- a/client/src/Actions.js +++ b/client/src/Actions.js @@ -160,14 +160,17 @@ const Actions = ({ isTurn = (turn && turn.color === color) ? true : false, robberActions = (turn && turn.robberInAction), haveResources = priv ? priv.resources !== 0 : false, + volcanoActive = state === 'volcano', placement = (state === 'initial-placement' || (turn && turn.active === 'road-building')), placeRoad = placement && turn && turn.actions && (turn.actions.indexOf('place-road') !== -1 || turn.actions.indexOf('place-city') !== -1 || turn.actions.indexOf('place-settlement') !== -1); - if (tradeActive && (!turn || !turn.actions || turn.actions.indexOf('trade'))) { + if (tradeActive + && (!turn || !turn.actions || turn.actions.indexOf('trade'))) { setTradeActive(false); - } else if (!tradeActive && turn && turn.actions && turn.actions.indexOf('trade') !== -1) { + } else if (!tradeActive + && turn && turn.actions && turn.actions.indexOf('trade') !== -1) { setTradeActive(true); } @@ -189,14 +192,17 @@ const Actions = ({ robberActions || (inGame && (!isTurn || hasRolled)) || (inGameOrder && hasGameOrderRolled) || - (!inGame && !inGameOrder) + (!inGame && !inGameOrder && (!isTurn || !volcanoActive)) } onClick={rollClick}>Roll Dice - - + + + + + {name && color && } - + > } { /* inLobby && diff --git a/client/src/Activities.js b/client/src/Activities.js index 42f4518..21cc54c 100644 --- a/client/src/Activities.js +++ b/client/src/Activities.js @@ -135,11 +135,12 @@ const Activities = () => { const isTurn = (turn && turn.color === color) ? true : false, - normalPlay = (state === 'initial-placement' || state === 'normal'), + normalPlay = ([ 'initial-placement', 'normal', 'volcano' ].indexOf(state) !== -1), mustPlaceRobber = (turn && !turn.placedRobber && turn.robberInAction), placement = (state === 'initial-placement' || (turn && turn.active === 'road-building')), placeRoad = placement && turn && turn.actions && turn.actions.indexOf('place-road') !== -1, mustStealResource = turn && turn.actions && turn.actions.indexOf('steal-resource') !== -1, + rollForVolcano = (isTurn && state === 'volcano'), rollForOrder = (state === 'game-order'); console.log(`activities - `, state, turn, activities); let discarders = [], mustDiscard = false; @@ -189,6 +190,10 @@ console.log(`activities - `, state, turn, activities);