Automatic conversion based on HP - #2320
Conversation
Coronia
left a comment
There was a problem hiding this comment.
This implementation is very problematic in performance. If you have a conversion type set it'll be executed every frame once the health condition meets. Should at least make it only happen when there's an actual change of health conditions, and make it bail out as early as possible by checking its current type and such
|
I did my best to meet your requests. This is my solution. Could you please take a look? |
|
To Chinese users:
|
Coronia
left a comment
There was a problem hiding this comment.
did some regulation to tag names, code style and such. Notice that we already have a universal IsHealthInThreshold function to handle health condition, so no need to reimplement it again
|
It would be best to write the Chinese documentation as well. We have a skill for this. |
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
# Conflicts: # docs/Whats-New.md
Automatic conversion based on HP
Convert.Health.AbovePercentdetermines the minimal health percentage at which a unit converts automatically.Convert.Health.BelowPercentdetermines the maximum health percentage at which a unit converts automatically.Convert.Healthspecify the new techno after the conversion. This unit must be of the same type of the original (infantry -> infantry, vehicle -> vehicle or aircraft -> aircraft).In
rulesmd.ini: