
05-07-2026, 04:49 PM
|
|
Planar Protector
Join Date: Jan 2014
Posts: 8,371
|
|
Quote:
Originally Posted by bcbrown
[You must be logged in to view images. Log in or Register.]
It looks like there's a community consensus that the examples could be improved. I put them all under the collapsible div, and also rewrote the calculation to hopefully be a bit easier to follow.
Since this is a community resource, which version of the calculation do people prefer?
Rewritten Version
Code:
StrengthModifier = ((2 * STR) - 150) / 3
if STR is less than 75:
StrengthModifier = 0
Wrath = Weapon Skill + StrengthModifier + Worn ATK + Spell ATK
if Wrath is less than 115 or <random value between 0 and 100> is less than maxExtraChance:
ExtraPercent = 100
else:
BaseBonus = (Wrath - minusFactor) / 2
if BaseBonus is less than 10:
BaseBonus = 10
ExtraPercent = 100 + (BaseBonus * <random value between 0.0 and 1.0)
RolledD20 = Weighted D20 Dice Roll / 10
DamageDone = (Weapon Damage * RolledD20 * ExtraPercent) / 100
if Archery and mob is rooted or moving:
DamageDone = DamageDone / 2
if critical hit:
if DamageDone is less than Weapon Damage:
DamageDone = Weapon Damage
if warrior and berserk:
DamageDone = 1.7 * (DamageDone + 5) + 1.19 * (DamageDone + 5)
else:
DamageDone = 1.7 * (DamageDone + 5)
FinalDamage = DamageDone + DamageBonus
Original Version
Code:
1. Calculate Wrath
1a. StrengthModifier = ((2 * STR) - 150) / 3
1b. If STR is less than 75, StrengthModifier = 0
1c. Wrath = Weapon Skill + StrengthModifier + Worn ATK + Spell ATK
2. Roll a D20
Press the expand button if you want to see how the game weights the D20 dice.
[Expand]
2k. RolledD20 = Weighted D20 Dice Roll / 10
3. Calculate DamageDone
3a. If Wrath is less than 115, Extra Percent = 100, skip to step 3g
3b. Roll D100. If Rolled D100 is less than maxExtraChance, Extra Percent = 100, skip to step 3g
3c. Base Bonus = (Wrath - minusFactor) / 2
3d. If Base Bonus is less than 10, Base Bonus = 10
3e. Extra Percent = 100 + (Base Bonus * Random Float Value between 0.0 and 1.0)
3f. If Extra Percent is greater than maxExtra, Extra Percent = maxExtra
3g. DamageDone = (Weapon Damage * RolledD20 * Extra Percent) / 100
4. Calculate FinalDamage
4a. If using Archery, DamageDone = DamageDone / 2
4b. If not using Archery, or using Archery as a Ranger and target is "stationary" (mob not moving and not rooted), skip step 4a
4c. If Critical Hit is possible and has occurred, continue to step 4d. Otherwise skip to step 4i
4d. If DamageDone is less than Weapon Damage, DamageDone = Weapon Damage
4e. DamageDone = DamageDone + 5
4f. DamageDone = DamageDone * 1.7
4g. Continue if Warrior and Berserk
4h. DamageDone = DamageDone + (Damage from step 4e * 1.19)
4i. FinalDamage = DamageDone + Main Hand Damage Bonus
|
That is a lot worse to be honest. Not everybody is a programmer. Writing it in psuedo-code is confusing. The old page didn't do pseudo-code either. Going to revert this for now.
|
|
|
|