Submap with options

This commit is contained in:
Mészáros Gergely 2021-08-14 21:57:10 +02:00
parent 6f97864962
commit e6e12a01fa
5 changed files with 168 additions and 65 deletions

View file

@ -114,7 +114,7 @@ window.Military = (function () {
for (const u of options.military) {
if (u.type === "naval" && !b.port) continue; // only ports produce naval units
const perc = +u.urban;
if (isNaN(perc) || perc <= 0 || !s.temp[u.name]) continue;
if (isNaN(perc) || perc <= 0 || !s.temp || !s.temp[u.name]) continue;
const mod = type === "generic" ? 1 : burgTypeModifier[type][u.type]; // cell specific modifier
const army = m * perc * mod; // urban cell army