a promotion to counter the "feature deals damage each turn" option

liwy

Chieftain
Joined
Nov 15, 2009
Messages
63
Location
Brussels
You might all know that features can be made dangerous, dealing damages to units each turn. This ability used in final frontier for example was never used in the main game. I really don't know why as history is full of anecdotes of armies and expeditions doomed by their environnement. So I tried it, made a mandatory feature for ice and desert (without water) wich deals damages. I even thout that the high sea might deals damages to ships before the discovery of some technologies, remember that only a tiny amount of the crew of the expedition of Magellan made it to finish the first circumnavigation.

So, the damage are (I think) dealt by the feature at the end of turn, so the promotion should take effect just after it, and of course only if the unit stopped on the specified feature (if you want to suggest a code you can name it FEATURE_DAMAGE) and heal of an amount equal to the damage dealt.

Side question, does the AI take the damages into consideration when they move?

thanks in advance!
 
I don't know if C2C got its terrain damage mechanisms from FFH or not but our promotions have a tag available IgnoreTerrainDamage which stops damage occurring from one terrain.

No idea about the AI, I think Koshling had to write some code to get the AI aware of damaging terrain. Before he did that units would try to heal in bad places until they died.
 
Side question, does the AI take the damages into consideration when they move?

Yes, it does, as it is foreseen in the dll code (I just checked it).

Ideally, your "healing with promotion" code should also be in the dll, at the same places (negating the damages if one unit has the promotion).

It can also be done in Python but it requires you to check every unit every turn in addition to what is already done in the dll.
 
Back
Top Bottom