Is there a plugin or something somewhere that would allow me to write my damage formulas with more than one line?
For reference, this is where I'm at with one of the weapon types....
Math.max(1, Math.floor(((a.atk + (a.dex / 10) + (v[105] / 10)) * (1 + ((a.dex / 100) + (v[105] / 100)))) * ((Math.random() + Math.random() + Math.random() + Math.random() + Math.random() + Math.random()) / 6) * (1 - ((0.75 * Math.min(1, Math.max(0, (b.ac + ((b.level - a.level) * 5)) / 100))) - (0.75 * Math.min(1, Math.max(0, (a.level - b.level) / 10)))))))
Basically, it takes into account the players stats, and weapon skill to apply a base damage bonus and then a modifier, then rng's 6 times to average the damage output into more of a bell curve. thats then applied against the enemies AC, which is soft capped at 75% mitigation, but takes into account the different in levels between player and enemy. I'm not too experienced with this, but it sure would help if I could write this in multiple lines so I could grasp the equation better. Lol.
Thank you for your time.
ps; will happily take any input or advise.
For reference, this is where I'm at with one of the weapon types....
Math.max(1, Math.floor(((a.atk + (a.dex / 10) + (v[105] / 10)) * (1 + ((a.dex / 100) + (v[105] / 100)))) * ((Math.random() + Math.random() + Math.random() + Math.random() + Math.random() + Math.random()) / 6) * (1 - ((0.75 * Math.min(1, Math.max(0, (b.ac + ((b.level - a.level) * 5)) / 100))) - (0.75 * Math.min(1, Math.max(0, (a.level - b.level) / 10)))))))
Basically, it takes into account the players stats, and weapon skill to apply a base damage bonus and then a modifier, then rng's 6 times to average the damage output into more of a bell curve. thats then applied against the enemies AC, which is soft capped at 75% mitigation, but takes into account the different in levels between player and enemy. I'm not too experienced with this, but it sure would help if I could write this in multiple lines so I could grasp the equation better. Lol.
Thank you for your time.
ps; will happily take any input or advise.