1
0

Initial placement with volcano off was broken; fixed

Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
James Ketrenos 2022-06-20 11:49:22 -07:00
parent 22be30f44b
commit 784ea1ecee

View File

@ -1597,9 +1597,13 @@ const getValidCorners = (game, color, type) => {
}
}
if (valid) {
if (game.state !== 'initial-placement'
|| (isRuleEnabled(game, 'volcano')
&& layout.tiles[game.robber].corners.indexOf(cornerIndex) === -1)) {
/* During initial placement, if volcano is enabled, do not allow
* placement on a corner connected to the volcano (robber starts
* on the volcano) */
if (!(game.state === 'initial-placement'
&& isRuleEnabled(game, 'volcano')
&& layout.tiles[game.robber].corners.indexOf(cornerIndex) !== -1
)) {
limits.push(cornerIndex);
}
}