[wesnoth-commits] [wesnoth/wesnoth] c4ebb1: AI recruitment: fix units on recall list interferi...

GitHub noreply at github.com
Sun Oct 28 22:23:16 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: c4ebb1cea68d612b62c7fd49a2e6c84dd064eaa3
      https://github.com/wesnoth/wesnoth/commit/c4ebb1cea68d612b62c7fd49a2e6c84dd064eaa3
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-10-28 (Sun, 28 Oct 2018)

  Changed paths:
    M src/ai/default/recruitment.cpp
    M src/ai/default/recruitment.hpp

  Log Message:
  -----------
  AI recruitment: fix units on recall list interfering with recruiting

Units on the recall list are treated as recruits by the AI. The code
previously did not check whether a unit it worth being recalled until
after it makes the decision which unit type to recruit/recall. If it
then can only recall, but not recruit units of that type and all of
them are deemed not worth it, the entire recruitment CA is disabled
(via black listing), meaning recruiting is abandoned also.

This commit fixes this by checking the unit value vs. the recall cost
before putting recalls on the recruitment list.


  Commit: e1da42ea91f6580e4166cd5a675fb74da4578091
      https://github.com/wesnoth/wesnoth/commit/e1da42ea91f6580e4166cd5a675fb74da4578091
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2018-10-28 (Sun, 28 Oct 2018)

  Changed paths:
    M src/ai/default/recruitment.cpp

  Log Message:
  -----------
  AI recruitment: use unit-specific recall cost

… when deciding whether a recall is worth it.


Compare: https://github.com/wesnoth/wesnoth/compare/559a9cc1fdd5...e1da42ea91f6
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Commits mailing list