mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 20:11:24 +01:00
feat: routes - add route on burg creation
This commit is contained in:
parent
16b441c5cf
commit
6907c9dcac
7 changed files with 191 additions and 95 deletions
|
|
@ -253,11 +253,11 @@ window.BurgsAndStates = (() => {
|
|||
return "Generic";
|
||||
};
|
||||
|
||||
const defineBurgFeatures = newburg => {
|
||||
const defineBurgFeatures = burg => {
|
||||
const {cells} = pack;
|
||||
|
||||
pack.burgs
|
||||
.filter(b => (newburg ? b.i == newburg.i : b.i && !b.removed && !b.lock))
|
||||
.filter(b => (burg ? b.i == burg.i : b.i && !b.removed && !b.lock))
|
||||
.forEach(b => {
|
||||
const pop = b.population;
|
||||
b.citadel = Number(b.capital || (pop > 50 && P(0.75)) || (pop > 15 && P(0.5)) || P(0.1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue