I think this ability is buggy.
The code does this :
1. healing rate of each unit = 20
2. healing rate of units in cities = 10 or 6 if animists guild
3. for each unit in order of creation time, do
3a. unit heals (1/healing rate) percentage of their max hit points
3b. if unit is a healer, and there are more than 9 units on the tile, kill all units not belonging to the human player
3c. if unit is a healer, all units stacked with it having a healing rate <> 66 are healed for 20% of their maximal health and their healing rate = 66 (to prevent being healed by another healer in the stack)
3b is obviously wrong - stacks cannot have over 9 units in the first place, and if this was supposed to be some backup plan to dispose of bugged AI stacks, then limiting it to healers is stupid. Since under normal operation this won't ever get executed I see no reason to change it.
However there is another problem.
Imagine the following scenario : Unit 1,2,3 are all in the same city. Unit 2 is a healer. How much will each unit heal?
this much :
Unit 1 will heal 10%.
Unit 2 will heal 10%
Unit 1,2,3 will heal 20% (from healer)
Unit 3 will heal 1.3%
Units produced before the healer will naturally heal PLUS receive the full benefit of "healer". Units produced after do not, and only recover 1.3% naturally, regardless of city effects.
Don't think this is worth fixing (too much work) but it's certainly wrong (on top of the usual problem of the healing effects being separate and rounded down)
The code does this :
1. healing rate of each unit = 20
2. healing rate of units in cities = 10 or 6 if animists guild
3. for each unit in order of creation time, do
3a. unit heals (1/healing rate) percentage of their max hit points
3b. if unit is a healer, and there are more than 9 units on the tile, kill all units not belonging to the human player
3c. if unit is a healer, all units stacked with it having a healing rate <> 66 are healed for 20% of their maximal health and their healing rate = 66 (to prevent being healed by another healer in the stack)
3b is obviously wrong - stacks cannot have over 9 units in the first place, and if this was supposed to be some backup plan to dispose of bugged AI stacks, then limiting it to healers is stupid. Since under normal operation this won't ever get executed I see no reason to change it.
However there is another problem.
Imagine the following scenario : Unit 1,2,3 are all in the same city. Unit 2 is a healer. How much will each unit heal?
this much :
Unit 1 will heal 10%.
Unit 2 will heal 10%
Unit 1,2,3 will heal 20% (from healer)
Unit 3 will heal 1.3%
Units produced before the healer will naturally heal PLUS receive the full benefit of "healer". Units produced after do not, and only recover 1.3% naturally, regardless of city effects.
Don't think this is worth fixing (too much work) but it's certainly wrong (on top of the usual problem of the healing effects being separate and rounded down)