diff options
author | Dastgir Pojee <dastgirp@gmail.com> | 2016-10-02 21:21:37 +0530 |
---|---|---|
committer | hemagx <ibrahem.h.basyone@gmail.com> | 2016-10-22 02:21:56 +0200 |
commit | 408878cc59bf0ad0154f7b9c7f5367ea530a9362 (patch) | |
tree | f1eb265bbdf9d7ce38d8c7c57bfadac3ddc7c79f /src/map/status.c | |
parent | af8ecd8af6a33b598844decff9b021bd07c931ce (diff) | |
download | hercules-408878cc59bf0ad0154f7b9c7f5367ea530a9362.tar.gz hercules-408878cc59bf0ad0154f7b9c7f5367ea530a9362.tar.bz2 hercules-408878cc59bf0ad0154f7b9c7f5367ea530a9362.tar.xz hercules-408878cc59bf0ad0154f7b9c7f5367ea530a9362.zip |
Implemented SU_SPRITEMABLE Skill.
MaxHP + 1000, MaxSP + 100.
Show's Spirit of Sea, Land and Life around the sprite when skill is
learned.
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c index 8a8cf123e..bb1107ee6 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1004,6 +1004,9 @@ void initChangeTables(void) status->dbs->IconChangeTable[SC_MAGICAL_FEATHER] = SI_MAGICAL_FEATHER; status->dbs->IconChangeTable[SC_BLOSSOM_FLUTTERING] = SI_BLOSSOM_FLUTTERING; + // Summoner + status->dbs->IconChangeTable[SC_SPRITEMABLE] = SI_SPRITEMABLE; + // Other SC which are not necessarily associated to skills. status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION1] |= SCB_ASPD; status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION2] |= SCB_ASPD; @@ -2742,9 +2745,12 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) bstatus->max_hp = (unsigned int)cap_value(i64, 0, INT_MAX); // Absolute modifiers from passive skills - if((skill_lv=pc->checkskill(sd,CR_TRUST))>0) + if ((skill_lv=pc->checkskill(sd,CR_TRUST)) > 0) bstatus->max_hp += skill_lv*200; + if ((pc->checkskill(sd,SU_SPRITEMABLE)) > 0) + bstatus->max_hp += 1000; + // Apply relative modifiers from equipment if(sd->hprate < 0) sd->hprate = 0; @@ -2777,6 +2783,8 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) bstatus->max_sp += 200 + 20 * skill_lv; if( (skill_lv = pc->checkskill(sd,WM_LESSON)) > 0 ) bstatus->max_sp += 30 * skill_lv; + if ((pc->checkskill(sd,SU_SPRITEMABLE)) > 0) + bstatus->max_sp += 100; // Apply relative modifiers from equipment if(sd->sprate < 0) @@ -3184,6 +3192,12 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) clif->updatestatus(sd,SP_CARTINFO); } + // Spirit Marble status activates automatically for a infinite + // amount of time when the skill is learned. Felt this was the + // best place to put this. [Rytech] + if (pc->checkskill(sd, SU_SPRITEMABLE)) + sc_start(&sd->bl, &sd->bl, SC_SPRITEMABLE, 100, 1, INFINITE_DURATION); + calculating = 0; return 0; @@ -9753,6 +9767,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t if (!mob->db_checkid(val1)) val1 = MOBID_PORING; break; + case SC_SPRITEMABLE: case SC_ALL_RIDING: tick = INFINITE_DURATION; break; |