Page MenuHomeWildfire Games

Do not allow minimum size drop to 0 because of population scale [Petra attack plan]
ClosedPublic

Authored by Silier on Dec 10 2019, 10:50 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23235: Do not allow minimum size drop to 0 because of population scale [Petra attack…
Summary

Petra reached maxed population and started spamming attack requests. Reported at forum https://wildfiregames.com/forum/index.php?/topic/27319-ai-chat-spamming/.

Cause of problem was that with given population scaling and current rounding minimal requested size of units dropped to 0.
What leaded to allow to start without units because minimum count have been reached.

This change requires at least one unit if minimum size is not 0 before adjustment by pop scaling , what we need to not block attacks with heroes or healers for example.

Now in case Petra is not able to produce units, aborts plan correctly. Not recreating the same failing plan is another issue.

Test Plan

saved game for a23b taken from forum post

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

Silier created this revision.Dec 10 2019, 10:50 PM
Owners added a subscriber: Restricted Owners Package.Dec 10 2019, 10:50 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/733/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1249/display/redirect

This revision was not accepted when it landed; it landed in state Needs Review.Dec 14 2019, 4:44 PM
This revision was automatically updated to reflect the committed changes.