Jump to content
  • 0

Limit MaxHp gained by vit points


Question

Posted

I want that somehow the max hp gained by raising your vit points will be always MaxHp - 1000000, so there is a "gap" left to bonuses, like Tao Gunka Card and buffs

PS: thanks in advance to anyone willing to help me biggrin.png

bump since it got into 2nd page, btw at least the first one is really needed right now :C

malufett tried to help me with this code but it didn't worked :( I hope anyone can help me

7 answers to this question

Recommended Posts

Posted (edited)

should be:

+vitgain = val * status->vit/100;
+if( (val + vitgain) >= battle_config.max_hp - 1000000 ) vitgap = 1;

val += val * status->vit/100; // +1% per each point of VIT

+if( vitgap ) val = battle_config.max_hp - 1000000;

or you can also try:

static unsigned int status_base_pc_maxhp(struct map_session_data* sd, struct status_data* status)
{
   ...

   return cap_value(val, 0, battle_config.max_hp - 1000000);
}

but it will also "gap" trans/baby class hp bonus/penalty..

Edited by FatalEror
  • Upvote 1
Posted (edited)

i think this line would probably answer your problem.

basically it calculates the base HP

then subtracts 1,000,000 hp

checks if it is within the min and max hp supported by the emulator.

all the bonuses will be checked afterwards.

my suggestion is that instead of subtracting a raw 1000000 hp, why not lessen it by %?

for example 20% of max hp

i = sd->status.max_hp + (int)status->max_hp;
+ i = i - i*20/100
status->max_hp = cap_value(i, 0, INT_MAX);

Edited by clydelion
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...