Jump to content
  • 0

Making Regen Great Again


Humble_Bee

Question


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.03
  • Content Count:  112
  • Reputation:   9
  • Joined:  09/22/19
  • Last Seen:  

Howdy all. As we all know, HP and SP regen rates (passive rates) are horrid. Even at 1000% regen, people get very little bonus compared to other boosts in battle (give me 1000 defense over 1000% regen any day). I'm working on fixing this, and I'm coming close to finishing it. I'm just asking for help with some of the coding tweaks. First, how do I cap hprecov at 1000%? I know it looks something like this (possibly), but what I have below hasn't seemed to work for me yet:

 

Spoiler

sd->hprecov_rate = cap_value(sd->hprecov_rate, 1000., SHRT_MAX);

Edit: There was a lovely "underflow protection" section for this first part in status.cpp, so I just used the same concept to create an "overflow" or max cap for the regen.

Second- Is there a way to make the following pattern into one formula (it goes from 1000% regen at rate .1 all the way down to 200% regen at rate .9):

Spoiler

if (sd && sd->hprecov_rate >= 1000. && ud && ud->walktimer == INVALID_TIMER  )
        rate /= .1;
    
    else if (sd && sd->hprecov_rate >= 900. && ud && ud->walktimer == INVALID_TIMER  )
        rate /= .2;
    
    else if (sd  && sd->hprecov_rate >= 800. && ud && ud->walktimer == INVALID_TIMER  )
        rate /= .3;

Thanks! EDIT: Still haven't figured out how to make this into one simple formula, but at least I have it down to about 9 per HP and SP section. Regen is working as desired for me. 

Edited by Humble_Bee
Part of it figured out
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...