feat: zones - generation fixes

This commit is contained in:
Azgaar 2024-08-31 19:56:17 +02:00
parent fdf0d163a8
commit c17be58efe
4 changed files with 116 additions and 105 deletions

View file

@ -503,7 +503,9 @@ window.Military = (function () {
: "";
const campaign = s.campaigns ? ra(s.campaigns) : null;
const year = campaign ? rand(campaign.start, campaign.end) : gauss(options.year - 100, 150, 1, options.year - 6);
const year = campaign
? rand(campaign.start, campaign.end || options.year)
: gauss(options.year - 100, 150, 1, options.year - 6);
const conflict = campaign ? ` during the ${campaign.name}` : "";
const legend = `Regiment was formed in ${year} ${options.era}${conflict}. ${station}${troops}`;
notes.push({id: `regiment${s.i}-${r.i}`, name: `${r.icon} ${r.name}`, legend});