Are Damage Calculations bugged?

General feedback and discussion of the game.

Moderators: Forum Moderators, Developers

Post Reply
mxb2001
Posts: 32
Joined: January 26th, 2019, 7:03 pm

Are Damage Calculations bugged?

Post by mxb2001 » February 8th, 2019, 6:07 pm

Yes, sorry about beating a dead horse (re: LUCK) but I was wondering how often one can see a 3.8% chance come true. Yes, 3.8% of the time, I know. But to take another tack, is it possible that while the much inspected randomness has been given a clean bill of health the damage calculator might be off for some units with odd rare abilities. To wit, berserk, drain, backstab, marksman, etc. I just had a drake fighter attack an ulfserker (nicely softened up by ranged first) on a hill and the dam calc claimed a 90+ chance to kill and only a 3.8% of the drake snuffing it. That's what happened though and while it could be chance I must admit I've been seeing the less than 50% odds come out a lot more than 50% of the time for killing attacks and this seems the straw that breaks my camel.

So, maybe dam calc is reporting falsely for units with unusual abilities? Food for thought...
01/01/01

User avatar
josteph
Developer
Posts: 738
Joined: August 19th, 2017, 6:58 pm

Re: Are Damage Calculations bugged?

Post by josteph » February 8th, 2019, 6:18 pm

mxb2001 wrote:
February 8th, 2019, 6:07 pm
while it could be chance I must admit I've been seeing the less than 50% odds come out a lot more than 50% of the time for killing attacks
Have you actually counted this, or is this just an impression?

What's the setting of the "Allow damage calculation with Monte Carlo simulation" advanced preference?

User avatar
Ravana
Forum Moderator
Posts: 2242
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Are Damage Calculations bugged?

Post by Ravana » February 8th, 2019, 6:24 pm

Damage calculations are certainly not aware of eventbased abilities, and I suspect they fail with some filter cases too.

User avatar
josteph
Developer
Posts: 738
Joined: August 19th, 2017, 6:58 pm

Re: Are Damage Calculations bugged?

Post by josteph » February 8th, 2019, 6:51 pm

I checked. A Drake Clasher attacking a Dwarvish Berserker on flat terrain in daytime has 76.9% chance to kill and 22.7% chance to be killed in the damage prediction dialog. Trying it out, out of 750 iterations, 590 times the Drake Clasher died and 160 times the Dwarvish Berserker died. That's 78.7%.

Here's the code. (Run it with wesnoth -t; I didn't bother writing it as a headless unit test.)
Spoiler:

User avatar
beetlenaut
Developer
Posts: 2389
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Are Damage Calculations bugged?

Post by beetlenaut » February 10th, 2019, 10:23 pm

mxb2001 wrote:
February 8th, 2019, 6:07 pm
how often one can see a 3.8% chance come true
It doesn't sound like you've been playing very long, because that kind of thing happens all the time. You should expect to see something similar in every scenario or multiplayer match. (It's only 1/26 after all, not something like 1/1000.) Personally, I wouldn't risk a 3.8% chance of death with a leader or hero--it's too high.
Ravana wrote:
February 8th, 2019, 6:24 pm
Damage calculations are certainly not aware of eventbased abilities, and I suspect they fail with some filter cases too.
But not with a mainline ability like berserk.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide

mxb2001
Posts: 32
Joined: January 26th, 2019, 7:03 pm

Re: Are Damage Calculations bugged?

Post by mxb2001 » February 22nd, 2019, 5:20 pm

[quote=beetlenaut post_id=638372 time=1549837398 user_id=107794]
[quote=mxb2001 post_id=638313 time=1549649228 user_id=175961]
how often one can see a 3.8% chance come true
[/quote]It doesn't sound like you've been playing very long, because that kind of thing happens all the time. You should [i]expect[/i] to see something similar in every scenario or multiplayer match. (It's only 1/26 after all, not something like 1/1000.) Personally, I wouldn't risk a 3.8% chance of death with a leader or hero--it's too high.
[quote=Ravana post_id=638315 time=1549650264 user_id=129456]
Damage calculations are certainly not aware of eventbased abilities, and I suspect they fail with some filter cases too.
[/quote]But not with a mainline ability like berserk.
[/quote]

5 weeks playing :) and I guess my post is half frustration and half tongue in cheek. I've been wargaming since the 70's so I've had a long time to learn to hate bad die rolls. No, you never do come to accept them... <grin>
01/01/01

Post Reply