When a structure with arrow was attacked, it was garrisoned independently of the attacker, which was not the best answer when atacked by a ram for example. This patch tries to adapt the garrisoning to the attackers.
Details
- Reviewers
Sandarac - Commits
- rP19547: petra: adapt garrisoning to the attackers
Check in game that the AI reacts 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/1054/ for more details.
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/1055/ for more details.
Nice! These sorts of improvements to garrisoning attacked structures are great to have.
I tested it briefly and will test it more soon, I like the looks of these changes.
Also, I think at some point it would be best to explicitly target melee siege units, as they do a lot of damage to structures.
Thanks for the review. As this patch is now well tested :) i'll commit it in its current state and adress your comments (emergency case and removal of inertStructures) in a following one where the health level of the units to be ungarrisoned is also taken into account.
yes, but should be a in another patch as it would mainly involve the defenseArmy.js file (function assignUnit) i guess.
Ah (looked like one because the errors were thrown in the AI), sorry for the false alert then and thanks for the fix :-)