magic-knuckles formula change proposals

Content and general development discussion, including quest scripts and server code.
Post Reply
User avatar
Wellvin
Peon
Peon
Posts: 19
Joined: 04 Nov 2018, 21:50
Contact:

magic-knuckles formula change proposals

Post 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
User avatar
jesusalva
Administrator
Administrator
Posts: 1025
Joined: 14 Nov 2016, 22:20
Location: Brazil
Contact:

Re: magic-knuckles formula change proposals

Post 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:
Jesusalva (aka. Jesusaves)
Donate to the project! ─ (Note: If you want to support me instead, Buy me a coffee!)
User avatar
Wellvin
Peon
Peon
Posts: 19
Joined: 04 Nov 2018, 21:50
Contact:

Re: magic-knuckles formula change proposals

Post by Wellvin »

Does MR stand for Merge Request ?

How to do it properly ?
User avatar
WildX
Forum Admin
Forum Admin
Posts: 1838
Joined: 07 Aug 2010, 14:13
Location: United Kingdom
Contact:

Re: magic-knuckles formula change proposals

Post by WildX »

You should come on IRC/Discord as it's easier to guide you through it :)
Post Reply