diff --git a/modules/ui/tools.js b/modules/ui/tools.js index 6ca0b93a..f3a3071d 100644 --- a/modules/ui/tools.js +++ b/modules/ui/tools.js @@ -114,7 +114,7 @@ function regenerateBurgs() { if (burgsTree.find(x, y, s) !== undefined) continue; // to close to existing burg const state = cells.state[cell]; - const capital = !states[state].capital; // if state doesn't have capital, make this burg a capital + const capital = state > 0 ? !states[state].capital : 0; // if state doesn't have capital, make this burg a capital, no capital for neutral lands if (capital) {states[state].capital = id; states[state].center = cell;} const culture = cells.culture[cell]; @@ -497,4 +497,4 @@ function viewCellDetails() { resizable: false, width: "22em", title: "Cell Details", position: {my: "right top", at: "right-10 top+10", of: "svg", collision: "fit"} }); -} \ No newline at end of file +}