Anonymous

Township: Difference between revisions

From Melvor Idle
439 bytes added ,  18 November 2022
added death calculations
(→‎Workers: Fix an image not changing color in dark mode)
(added death calculations)
Line 213: Line 213:


===Health===
===Health===
{{Icon|Health|type=township}} is a mechanic that calculates when elderly citizens will die. If the player has a non-zero amount of both {{Icon|Potions|type=resource}} and {{Icon|Food|type=resource}}, regardless of the {{Icon|Health|type=township|nolink=true}}, citizens will never die below the age of 100. If the player does not have these two resources, above the age of 55 years old, each citizen has a chance of dying every tick. A citizen that dies due to poor health will be added to the {{Icon|Dead Storage|type=township}}.
{{Icon|Health|type=township}} is a mechanic that calculates when elderly citizens will die. Each citizen aged 55 or above has a chance of dying every tick. Citizens die automatically at age 100, any other citizen that dies will be added to the {{Icon|Dead Storage|type=township}}.
The base chance for a citizen to die each tick is expressed by:
 
<math>\textrm{DeathChance} = \frac{100 - \textrm{healthPercent}}{38100} \times (2 + \frac{\textrm{healthPercent}}{100})</math>
 
In the above calculation, <math>\textrm{healthPercent}</math> is the % health as displayed in-game.
If we consider <math>\textrm{sickness}</math> to be the decimal representation of "un-health" (i.e. <math>\frac{100 - \textrm{healthPercent}}{100})</math>, this simplifies to:
 
<math>\textrm{DeathChance} = \frac{\textrm{sickness}}{381} \times (1 + \textrm{sickness})</math>
 
<math>\textrm{DeathChance}</math> is increased by 0.05 if there is a food deficit.
 
The table below gives some examples.


{| class="wikitable"
{| class="wikitable"
29

edits