[wesnoth-commits] [wesnoth/wesnoth] 8fbf58: Revert "Allow modifying dead units in more event h...
GitHub
noreply at github.com
Mon May 28 19:10:33 UTC 2018
Branch: refs/heads/1.14
Home: https://github.com/wesnoth/wesnoth
Commit: 8fbf58e10a71bd02b98ff45dcbfb27fa9c1b4b0c
https://github.com/wesnoth/wesnoth/commit/8fbf58e10a71bd02b98ff45dcbfb27fa9c1b4b0c
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 b0c1382693f4d72d7ad8f662ad91612da72b6781.
Commit: 76652d5905e4b8fe8e9f2108442f028126c39c80
https://github.com/wesnoth/wesnoth/commit/76652d5905e4b8fe8e9f2108442f028126c39c80
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 b8ffe007e5a4026185c488589069766f475e1013.
Commit: ca96a2ba61073bc2ef309b3ee5cf60ac94478eca
https://github.com/wesnoth/wesnoth/commit/ca96a2ba61073bc2ef309b3ee5cf60ac94478eca
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 dc6818799952c7b76e78c7309a30f8a6a6a7010c.
Commit: 43c964fe3f41092443eeb35c1eec9155d7845096
https://github.com/wesnoth/wesnoth/commit/43c964fe3f41092443eeb35c1eec9155d7845096
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 3c344e8da502b92d3feefc7d1690c29a3a2c76ec.
@ln-zookeeper pointed out that units with negative HP are documented in the wiki, and thus disallowing them is an API
change.
Commit: 00c05661632237f4d6d4b3638fcf8e8c025d524d
https://github.com/wesnoth/wesnoth/commit/00c05661632237f4d6d4b3638fcf8e8c025d524d
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: 6d8957ca5c7a017d01105fd28f091d8bec491fc1
https://github.com/wesnoth/wesnoth/commit/6d8957ca5c7a017d01105fd28f091d8bec491fc1
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/7be39c937d92...6d8957ca5c7a
**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