[Commits] [wesnoth/wesnoth] 233692: simulate_combat_fake(): don't fill empty HP chance...

GitHub noreply at github.com
Thu May 1 02:10:23 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 2336921a81b19d464f6993f672e429834ad5a2be
      https://github.com/wesnoth/wesnoth/commit/2336921a81b19d464f6993f672e429834ad5a2be
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M data/ai/lua/battle_calcs.lua

  Log Message:
  -----------
  simulate_combat_fake(): don't fill empty HP chances with zeros

That’s what wesnoth.simulate_combat() does, but is different from the
other functions in battle_calcs.  Only hp_chance[0] needs to be set,
even if it is zero.


  Commit: 0218b881802ffd6734be4cf6becd8597e2fc34de
      https://github.com/wesnoth/wesnoth/commit/0218b881802ffd6734be4cf6becd8597e2fc34de
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M data/ai/lua/battle_calcs.lua

  Log Message:
  -----------
  attack_combo_stats(): also cache intermediate battle outcomes

Speeds up some calculations significantly.


  Commit: 7623c5513a6ff4f270f271e8725aa904a06645b2
      https://github.com/wesnoth/wesnoth/commit/7623c5513a6ff4f270f271e8725aa904a06645b2
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M data/ai/lua/battle_calcs.lua

  Log Message:
  -----------
  battle_calcs: do not use variance of attack in attack rating

This was an idea we tried so that we’d start with the most uncertain
attack first, but it did not work very well.
Keep the code for now, just comment it out.


  Commit: 82e4ccad4dff52bbd23febba9f99772ed1a5c182
      https://github.com/wesnoth/wesnoth/commit/82e4ccad4dff52bbd23febba9f99772ed1a5c182
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2014-04-30 (Wed, 30 Apr 2014)

  Changed paths:
    M data/ai/lua/battle_calcs.lua

  Log Message:
  -----------
  battle_calcs.attack_rating(): overhaul attack rating system

This was long overdue.  The return value is now much closer to
something describing the actual gain/loss (roughly) in units of gold.


Compare: https://github.com/wesnoth/wesnoth/compare/f0c7ddcab1f5...82e4ccad4dff


More information about the Commits mailing list