[wesnoth-commits] [wesnoth/wesnoth] 70be1d: Revert "Allow modifying dead units in more event h...
GitHub
noreply at github.com
Mon May 28 19:15:24 UTC 2018
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 70be1d2932be67e19dff5afd680c8405b3325b57
https://github.com/wesnoth/wesnoth/commit/70be1d2932be67e19dff5afd680c8405b3325b57
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2018-05-28 (Mon, 28 May 2018)
Changed paths:
M src/actions/attack.cpp
Log Message:
-----------
Revert "Allow modifying dead units in more event handlers"
This reverts commit 9110e49760e40d9856b96f884f3c1636e034768c.
Commit: 58dca3a8848b66f92e4f2b228e775dde1b000634
https://github.com/wesnoth/wesnoth/commit/58dca3a8848b66f92e4f2b228e775dde1b000634
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2018-05-28 (Mon, 28 May 2018)
Changed paths:
M src/game_events/pump.cpp
M src/game_events/pump.hpp
M src/units/unit.cpp
Log Message:
-----------
Revert "Throw a Lua exception when creating a negative-HP unit in a Lua context"
This reverts commit 258a0e4689e9c000e3e0017ceed5e120156883ae.
Commit: 050bb3fa2c8d3e1422fe11e56909cfaba63d9aac
https://github.com/wesnoth/wesnoth/commit/050bb3fa2c8d3e1422fe11e56909cfaba63d9aac
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2018-05-28 (Mon, 28 May 2018)
Changed paths:
M src/actions/attack.cpp
M src/units/unit.cpp
M src/units/unit.hpp
Log Message:
-----------
Revert "Allow modifying dead units in last_breath and die event handlers"
This reverts commit 15446acb2ad1fd7990e52e7194480820c4923596.
Commit: 0200487aad71816b843a8c542b3b0c394c5c87d8
https://github.com/wesnoth/wesnoth/commit/0200487aad71816b843a8c542b3b0c394c5c87d8
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2018-05-28 (Mon, 28 May 2018)
Changed paths:
M src/scripting/lua_unit.cpp
M src/units/unit.cpp
Log Message:
-----------
Revert "Disallow units with negative HP"
This reverts commit ef60deaa2b0d14006a6747c61fdd4fd33562b6f0.
@ln-zookeeper pointed out that units with negative HP are documented in
the wiki, and thus disallowing them is an API
change.
Commit: 472b0cbbfbcdde4e32f26a1cb5afaa5ffd6c7a88
https://github.com/wesnoth/wesnoth/commit/472b0cbbfbcdde4e32f26a1cb5afaa5ffd6c7a88
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2018-05-28 (Mon, 28 May 2018)
Changed paths:
M src/attack_prediction.cpp
Log Message:
-----------
Fix #3042: attack prediction gives wrong results for HP <= 0 units
One_strike_fight() assumed that if HP distribution hadn't been calculated,
the unit is alive. It would normally be a valid assumption, but the Wesnoth
engine allows units with negative HP (although things aren't guaranteed to
work correctly in the presence of such units).
The assumption, together with a completely wrong calculation for the
probability that the opponent will counterattack, resulted in badly
incorrect results. That, in turn, caused the calculated probability that
the opponent to kill us to become negative (I observed -75 % when
debugging), making the calculated probability to be poisoned/slowed to
exceed 100 %, and that finally caused an assert if the AI simulated another
fight for the same unit.
I have now fixed those issues. I also noticed that rounding error allowed
the probability to be killed to still become slightly negative, and thus
changed std::min() to utils::clamp() to limit the value to the allowed
range.
Commit: ae8baa63560bd89ffb6c0319fda4ee708ff40ff5
https://github.com/wesnoth/wesnoth/commit/ae8baa63560bd89ffb6c0319fda4ee708ff40ff5
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2018-05-28 (Mon, 28 May 2018)
Changed paths:
M changelog.md
Log Message:
-----------
Changelog entries
Compare: https://github.com/wesnoth/wesnoth/compare/019848a28fae...ae8baa63560b
**NOTE:** This service 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