- take the healthLevel of the units into account
- take Sandarac comments on D446 into account
Details
- Reviewers
- None
- Commits
- rP19571: follow-up and complement of D446 to adapt garrisoning to the structure attackers
check in game that the AI behaves as expected
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1108/ for more details.
There is also a check for target.healthLevel() < 0.55 in defenseManager.js and some other places, but these are special cases.
binaries/data/mods/public/simulation/ai/petra/config.js | ||
---|---|---|
128 ↗ | (On Diff #1797) | It is not clear from the name what this var is for, it should mention it has to do with health levels for garrisoning. |
binaries/data/mods/public/simulation/ai/petra/garrisonManager.js | ||
283 ↗ | (On Diff #1797) | I'm not sure about this. Ideally for the emergency case, the ent should stay garrisoned until it is fully healed (if the holder has buffHeal), as for the current use (hero in regicide), if the ent dies, it's over for the AI (although before there was just the simple check for enemies around). |
ok this one is included with a medium value. The other ones are for structures to be repaired: not a problem as used only in one function, but if needed in the future, we could add a Config.repairHealthLevel for those ones.
binaries/data/mods/public/simulation/ai/petra/config.js | ||
---|---|---|
128 ↗ | (On Diff #1797) | ok renamed to garrisonHealthLevel |
binaries/data/mods/public/simulation/ai/petra/garrisonManager.js | ||
283 ↗ | (On Diff #1797) | Yes, but if the siege units manage to destroy the structure, the hero will be in a poor position. If in this situation and my hero would have health>0.7, i would use it to defend and regarrison it when its health becomes < 0.4 (which is what the AI was doing). |
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/1147/ for more details.