I am building a Diablo III calculator that will have API importing & also user data entry with validation. My issue lies with the latter part since I'm having a lot of trouble reassembling items with physical damage affixes.
Here's data for a problematic item: http://us.battle.net/api/d3/data/item/skorn
The goal I've set is to recalculate the maximum possible damage value using the attributes. The value we want to see is 1762.5 as it is given in the API, and I've verified through looking in-game that items can roll a damage value that high (see: https://i.stack.imgur.com/Lmrry.jpg).
What I know:
The damage range is only affected by these attribute types:
Where #Element is the type of bonus damage (Physical, Fire, Cold, Lightning, Arcane, Holy)
My calculations work perfectly if the bonus damage type is anything other than physical. The 2 types (physical and elemental) also display differently like so:
+200-450 Fire Damage
+200 Minimum Damage +250 Maximum Damage
If we were to calculate the Skorn example as elemental, we'd do it like so:
((507 + 106) * 1.5) + 381 + 286 = 1586.5
Which looks like this with attributes instead:
((Damage_Weapon_Min#Physical + Damage_Weapon_Delta#Physical) * (1 + Damage_Weapon_Percent_Bonus#Physical) + Damage_Weapon_Bonus_Delta#Physical + Damage_Weapon_Bonus_Min#Physical
Unfortunately, this just doesn't work since it's way off of what the actual maximum value should be. I just don't know where to go from here, so any assistance would be greatly appreciated.