diff --git a/ui/src/pages/ActionsToolbar.js b/ui/src/pages/ActionsToolbar.js
index 74285758..cdb18270 100644
--- a/ui/src/pages/ActionsToolbar.js
+++ b/ui/src/pages/ActionsToolbar.js
@@ -47,13 +47,14 @@ function PlayButtons() {
[enqueueSnackbar, closeSnackbar]
);
- const { gameState, isPlayingMonopoly, isPlayingYearOfPlenty } = state;
+ const { gameState, isPlayingMonopoly, isPlayingYearOfPlenty, isRoadBuilding } = state;
const key = playerKey(gameState, gameState.current_color);
const isRoll =
gameState.current_prompt === "PLAY_TURN" &&
!gameState.player_state[`${key}_HAS_ROLLED`];
const isDiscard = gameState.current_prompt === "DISCARD";
const isMoveRobber = gameState.current_prompt === "MOVE_ROBBER";
+ const isPlayingDevCard = isPlayingMonopoly || isPlayingYearOfPlenty || isRoadBuilding;
const playableDevCardTypes = new Set(
gameState.current_playable_actions
.filter((action) => action[1].startsWith("PLAY"))
@@ -198,7 +199,7 @@ function PlayButtons() {
return (
<>
}
items={useItems}
@@ -206,7 +207,7 @@ function PlayButtons() {
Use
}
items={buildItems}
@@ -214,7 +215,7 @@ function PlayButtons() {
Buy
}
items={tradeItems}
@@ -222,27 +223,27 @@ function PlayButtons() {
Trade
}
onClick={
- isRoll
- ? rollAction
- : isDiscard
+ isDiscard
? proceedAction
: isMoveRobber
? setIsMovingRobber
: isPlayingYearOfPlenty || isPlayingMonopoly
? handleOpenResourceSelector
+ : isRoll
+ ? rollAction
: endTurnAction
}
>
{
- isRoll ? "ROLL" :
isDiscard ? "DISCARD" :
isMoveRobber ? "ROB" :
isPlayingYearOfPlenty || isPlayingMonopoly ? "SELECT" :
+ isRoll ? "ROLL" :
"END"
}