]> git.pond.sub.org Git - empserver/commitdiff
(infect_people): Use max_pop() to compute space. This makes all
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 10 Aug 2004 07:56:34 +0000 (07:56 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 10 Aug 2004 07:56:34 +0000 (07:56 +0000)
crowded sectors equally vulnerable, including mountains, plains, and
inefficient big cities.  Closes #917488.
Update info.

info/Concepts/Plague.t
src/lib/update/plague.c

index 8cf67151b95bf95b1b6ac3cb2ab50911dd644b17..4f59333b8480aa87409755f6e59331e89d7dc85f 100644 (file)
@@ -83,7 +83,7 @@ technology, population, standard of living and the Empire Plague:
 Likelihood of plague outbreak (in percent) is
         civ + mil + uw   t_level + (iron + oil + rad * 2) / 10 + 100
 max (0, -------------- * ------------------------------------------- - 1)
 Likelihood of plague outbreak (in percent) is
         civ + mil + uw   t_level + (iron + oil + rad * 2) / 10 + 100
 max (0, -------------- * ------------------------------------------- - 1)
-              999               r_level + effic + mobil + 100
+            max_pop             r_level + effic + mobil + 100
 .FI
 .s1
 Later formulations of this relationship show great similarity
 .FI
 .s1
 Later formulations of this relationship show great similarity
index 115d9114e5f4def040c4ae5150e7e557e1b10fcc..6e219aa0c3dccac7eb674788f2e334fed4293b83 100644 (file)
@@ -133,7 +133,7 @@ infect_people(struct natstr *np, struct sctstr *sp)
      * make plague where there was none before...
      */
     pop = sp->sct_item[I_CIVIL] + sp->sct_item[I_MILIT] + sp->sct_item[I_UW];
      * make plague where there was none before...
      */
     pop = sp->sct_item[I_CIVIL] + sp->sct_item[I_MILIT] + sp->sct_item[I_UW];
-    pop_space = opt_BIG_CITY && (sp->sct_type == SCT_CAPIT) ? 9999.0 : 999.0;
+    pop_space = max_pop(np->nat_level[NAT_RLEV], sp);
     bad_stuff
        = sp->sct_item[I_IRON] + sp->sct_item[I_OIL] + sp->sct_item[I_RAD] * 2;
     pollution = bad_stuff / 10.0 + np->nat_level[NAT_TLEV] + 100.0;
     bad_stuff
        = sp->sct_item[I_IRON] + sp->sct_item[I_OIL] + sp->sct_item[I_RAD] * 2;
     pollution = bad_stuff / 10.0 + np->nat_level[NAT_TLEV] + 100.0;