SHOW:
|
|
- or go back to the newest paste.
1 | static unsigned int status_base_pc_maxhp(struct map_session_data* sd, struct status_data* status) | |
2 | { | |
3 | unsigned int val = pc_class2idx(sd->status.class_); | |
4 | +int vitgain = 0, vitgap = 0; | |
5 | ||
6 | if((sd->class_&MAPID_UPPERMASK) == MAPID_NINJA || (sd->class_&MAPID_UPPERMASK) == MAPID_GUNSLINGER) | |
7 | val += 100; //Since their HP can't be approximated well enough without this. | |
8 | if((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc_famerank(sd->status.char_id, MAPID_TAEKWON)) | |
9 | val *= 3; //Triple max HP for top ranking Taekwons over level 90. | |
10 | if((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.base_level >= 99) | |
11 | val += 2000; //Supernovice lvl99 hp bonus. | |
12 | ||
13 | +vitgain = val * status->vit/100; | |
14 | +if( (val+vitgain) >= battle_config.max_hp ) vitgap = 1; | |
15 | ||
16 | val += val * status->vit/100; // +1% per each point of VIT | |
17 | ||
18 | +if( vitgap && val > 1000000 ) val -= 1000000; | |
19 | ||
20 | if (sd->class_&JOBL_UPPER) | |
21 | val += val * 25/100; //Trans classes get a 25% hp bonus | |
22 | else if (sd->class_&JOBL_BABY) | |
23 | val -= val * 30/100; //Baby classes get a 30% hp penalty | |
24 | ||
25 | return val; | |
26 | } |