Page 1 of 1

magic-knuckles formula change proposals

Posted: 05 Jul 2022, 13:06
by Wellvin
Hi

I looked up the magic-knuckles script and would like to propose the following 2 changes that don't affect the output values:

1) change the damage formula to make it easier to understand

max(1, BASE_ATK + min(0,Int-100))

2) change the delay formula to prevent the potential computation of sqrt of negative values

sqrt( max(0, 300 - 2*Agi) ) + 5/2

Re: magic-knuckles formula change proposals

Posted: 05 Jul 2022, 13:20
by jesusalva
Wellvin wrote: 05 Jul 2022, 13:06 sqrt( max(0, 300 - 2*Agi) ) + 5/2
Not too concerned about this one, to this be negative agility will need to exceed 127, which by TMWA rules, may cause negative computations in the C++ code ─ and by o11c rule, anything wrong is fatal, I think the server will crash way before you can cast magic knuckles XD

PS. Evol2/Hercules can go up to 255 safely, and up to 65535 un-safely. While it would be a cause of concern, this spell no longer exists there.

But hey, this is a nice first MR, feel free to submit patches at https://git.themanaworld.org/legacy/serverdata :alt-7:

Re: magic-knuckles formula change proposals

Posted: 06 Jul 2022, 18:05
by Wellvin
Does MR stand for Merge Request ?

How to do it properly ?

Re: magic-knuckles formula change proposals

Posted: 06 Jul 2022, 18:49
by WildX
You should come on IRC/Discord as it's easier to guide you through it :)