User:Sljm/Notepad

Weapon: Metal Hammer, 10% skill
Class = Xelor, Wand -5%, Hammer -0% Penalty: 0% Skill: 10% Damage type: Neutral Strength: 5 base + 132 equip Damage %: 5 Total % up: 142% Damage +: 28 Damage Range: 16 to 30

Damage Array. Key, Val 0, 69 1,  71 2,  73 3,  76 4,  81 5,  83 6,  86 7,  88 8,  90 9,  93 10, 95 11, 98 12, 100 13, 103 14, 107
 * For values 16 through 30
 * Expectation: 16 -> 69, 30 -> 107

Test method 1: floor(16*1.1) = 17 floor(17*2.42) = 41 41+28 = 69 Test method 2: floor(16*2.52) = 40 40+28 = 68 Method 1 appears valid. Test method 1: floor(30*1.1) = 33 floor(33*2.42) = 79 79+28 = 107 Test method 2: floor(30*2.52) = 75 75+28 = 103 Method 1 appears valid. Median of Range: 23 Median of Array: [7] floor(23*1.1) = 25 floor(25*2.42) = 60 60+28 = 88 Array[7] = 88 Range[7] = 23 The method is valid. Thus, weapon skill appears to be applied to base damage, rounded down, and stored, before statistics are applied.

Weapon: Axel, 10% skill
Class = Xelor, Wand -5%, Hammer -0% Penalty: 10% Skill: 10% Damage type: Water Chance: 49 base + 268 equip Damage %: 19 Total % up: 336 Damage +: 28 Damage Range: 7 to 13

Damage Array. Key, Val 0, 58 1, 62 2, 67 3, 71 4, 75 5, 80 6, 84
 * For values 7 through 13
 * Expectation: 7 -> 58, 13 -> 84
 * Test method 1 from last example returned true, must find placement of 10% penalty.

Test method A: floor((7*1.1)*.9) = 6 floor(6*4.36) = 26 26+28 = 54 Test method B: floor(7*(.9+.1)) = 7 floor(7*4.36) = 30 30+28 = 58 Method B appears valid. Test method A: floor((13*1.1)*.9) = 12 floor(12*4.36) = 52 52+28 = 80 Test method B: floor(13*(.9+.1)) = 13 floor(13*4.36) = 56 56+28 = 84 Method B appears valid. Median of Range: 10 Median of Array: [3] floor(10*(.9+.1)) = 10 floor(10*4.36) = 43 43+28 = 71 Array[3] = 71 Range[3] = 10 The method is valid. Thus, the sum of weapon skill and class penalty appears to be applied to the base damage, which is rounded down, before statistics are applied.

Weapon: Axel, 35% skill
Class = Xelor, Wand -5%, Hammer -0% Penalty: 10% Skill: 35% Damage type: Water Chance: 39 base + 207 equip Damage %: 28 Total % up: 274 Damage +: 35 Damage Range: 7 to 13

Damage Array. Key, Val 0, 64 1, 72 2, 76 3, 79 4, 83 5, 91 6, 94
 * For values 7, 10, 13
 * Expectation: 7 -> 64, 10 -> 79, 13 -> 94

Test method: floor(7*(.9+.35)) = 8 floor(8*3.74) = 29 29+35 = 64 Test method: floor(10*(.9+.35)) = 12 floor(12*3.74) = 44 44+35 = 79 Test method: floor(13*(.9+.35)) = 16 floor(16*3.74) = 59 59+35 = 94 The method is valid.

Revised Damage Equation
Res = Base Res = Math.floor( Res * (1 + ((Skil - Modi) / 100))) Res = Math.floor( Res * (1 + ((Stat + PDmg) / 100))) Res = Res + LDmg Res = Resist( Res ) Base : Random value from base damage range Skil : Weapon skill bonus. (Weapon attack only.) Modi : Class penalty with given weapon. (Weapon attack only.) Stat : Total value of relevant characteristic. Minimum 0. PDmg : All bonuses of type +x% damage. LDmg : All bonuses of type +x damage. Resist : Enemy's resistance. Exact formula unknown at the moment.