Search found 8 matches
- January 27th, 2016, 6:27 pm
- Forum: Users’ Forum
- Topic: Damage Rounding
- Replies: 10
- Views: 3042
Re: Damage Rounding
Since we are here, for the record the formula is:
'modifiers' is
base_damage * modifiers
where 'base_damage' is weapon->damage()
'modifiers' is
( 100% +TOD modifier +Nearby Leader bonus )
*opponents resistance factor (%)
hth*opponents resistance factor (%)
- January 27th, 2016, 3:34 pm
- Forum: Users’ Forum
- Topic: Damage Rounding
- Replies: 10
- Views: 3042
Re: Damage Rounding
Trying again: When the divisor is equivalent 100% when modifiers <= 100% it rounds to nearest with 'halfs up' when modifiers > 100% it rounds to nearest with 'halfs down' When divisor is is equivalent 200% (slow damage calculation) when modifiers <= 200% it rounds to nearest with 'halfs up' when mod...
- January 26th, 2016, 11:11 pm
- Forum: Users’ Forum
- Topic: Damage Rounding
- Replies: 10
- Views: 3042
Re: Damage Rounding
You are right it is also multiplied by another factor, presumably of scale *100 damage_multiplier *= opp.damage_from(*weapon, !attacking, opp_loc) But even if this value trips the bonus<divisor clause as intended (it is unclear) subtracting 1 from the 'rounding' value doesn't make the result rounded...
- January 26th, 2016, 9:54 pm
- Forum: Users’ Forum
- Topic: Damage Rounding
- Replies: 10
- Views: 3042
Re: Damage Rounding
I honestly dont have time to produce that gfgtdf but I will try to explain some of the flaws evident in the code: This is how the function is called in combat calc damage = round_damage(base_damage, damage_multiplier, 10000); damage_multipler is 100 + alignment-timeofday (it is never more than 10000...
- January 26th, 2016, 8:03 pm
- Forum: Users’ Forum
- Topic: Damage Rounding
- Replies: 10
- Views: 3042
Re: Damage Rounding
Looking at branch 1.2, combat rounding is a bit iffy. There is a function called round_damage, it is used in damage calculation like this: damage = round_damage(base_damage, damage_multiplier, 10000); slow_damage = round_damage(base_damage, damage_multiplier, 20000); Here it is in util.hpp ( branch ...
- January 24th, 2016, 12:54 am
- Forum: Coder’s Corner
- Topic: Very interesting talk on Random Number Generators
- Replies: 15
- Views: 12758
Re: Very interesting talk on Random Number Generators
it would allow people to choose how likely it is to get particularly good or bad results? Basically yes - it could be described as a setting to make combat more or less 'chaotic' :hmm: it would definitely have to be an off-by-default option somewhere in the preferences dialog, separate from difficu...
- January 23rd, 2016, 1:37 pm
- Forum: Coder’s Corner
- Topic: Very interesting talk on Random Number Generators
- Replies: 15
- Views: 12758
Re: Very interesting talk on Random Number Generators
Thanks for reply Cackfiend - I am sure the rngs quality is fine. The playing qualities of the randomness used in Wesnoth are almost certainly not perceptably affected by any statistical imperfections present in the standard libs PRNG employed in the code. This feature will actually use the present r...
- January 23rd, 2016, 1:18 am
- Forum: Coder’s Corner
- Topic: Very interesting talk on Random Number Generators
- Replies: 15
- Views: 12758
Re: Very interesting talk on Random Number Generators
Greatings Travellers - I have some experience in programming random numbers and I have played and loved Wesnoth and was a bit frustrated by the level of unpredictability in the game. The reason why I am telling this, is I have just penned and tested a 'loaded distribution' generator designed specifi...