Healing ability

Originally, the only unit that could regenerate health (appart from heroes) was the Berserk. This ability was controlled via resource 96. The value of that resource would control the regeneration speed of the Berserk.

We’ve been able to activate that healing ability for other units but it comes with a problem: the regeneration speed is controlled by resource 96, which means that every unit with regenerating abilities would regenerate at the same rate. With the introduction of the Caravanserai, this poses a problem for a Viking player allied with a Hindustani. The code would modify the regeneration speed of Berserkers when using trade carts.

With the introduction of Maghrebi Camels, the game has a new way of giving units regenerating abilities that is programmed as an atribute of speciffic units, so that we can set different regeneration speeds for each unit. This is done via 2 attributes:

  • Attribute 40 seems to control wether the regeneration is active or not. Putting it to 1 is the simplest option.
  • Attribute 45 controls the regeneration speed. The number is the time in seconds to get a new health point. The smaller the number, the faster the regeneration.

With this, the Berserker no longer uses the dedicated resource, which is reserved for