Drain doesn't reduce expected value on statistics

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
Mawmoocn
Posts: 154
Joined: March 16th, 2019, 3:54 pm

Drain doesn't reduce expected value on statistics

Post by Mawmoocn »

Greetings,


Unless it's fixed before this was presented, the problem affects statistics for Battle for Wesnoth versions 1.12 and above, including developemental builds.

Statistics have 2 numbers, these are damage done and expected value. (These combines "Taken" and "Inflicted" stats that represents the player or the enemy.)

Damage done would be listed only on sucessful hit.

Expected value is recorded and adjusted to chance to hit average whether damage hits or not.

Most abilities and weapon specials follow these.

Except select abilities and weapon specials.

Drain is one of the exceptions.

Drain heals damage.
In statistics, it decreases or reduces the damage done based on the amount healed.

However, expected value is not adjusted.

Sample replay
Minimum of Wesnoth 1.14.11 required
(You can see that the discrepancy between damage done and expected value is large, when used in a concentrated manner.)

The expected behavior for Drain should adjust both damage done and expected value.

When it heals damage (only applies when not on full hit points), it subtracts or reduces the value recorded on damage done, without adjusting the expected value.


The difference between damage done and expected value, is innacurate.



Expected value for Drain (and other healing inside combat abilities and weapon specials that uses damage in the future) intead of using none addition, could use subtraction with chance to hit formula (similar to the curent calculation model but inverted to subtraction).


In conclusion, I was trying to create a draft that took too long that I guess I'll just report this and polish that abilities and weapon specials can be a source of "challenging" programming.

Mainline and user made content could use more statistics for abilities and weapon specials to differentiate variance beteween damage.

This may help publishing bugs for newer and old abilities and weapon specials.



Thank you for your time.
Post Reply