diff options
author | Dastgir Pojee <dastgirp@gmail.com> | 2016-10-02 21:28:12 +0530 |
---|---|---|
committer | hemagx <ibrahem.h.basyone@gmail.com> | 2016-10-22 02:21:57 +0200 |
commit | a057d219f6253fb3ce19d7fc2a3f07e7365bc042 (patch) | |
tree | 36f9ce4a3c7ff11cf703183d5b57dce52a7c2487 | |
parent | 408878cc59bf0ad0154f7b9c7f5367ea530a9362 (diff) | |
download | hercules-a057d219f6253fb3ce19d7fc2a3f07e7365bc042.tar.gz hercules-a057d219f6253fb3ce19d7fc2a3f07e7365bc042.tar.bz2 hercules-a057d219f6253fb3ce19d7fc2a3f07e7365bc042.tar.xz hercules-a057d219f6253fb3ce19d7fc2a3f07e7365bc042.zip |
Implemented SU_FRESHSHRIMP Skill.
Consumes Fresh Shrimp to recover HP for 2 Minutes.
Max Level 5:
Recovers Every (11-SkillLevel) Seconds.
-rw-r--r-- | src/map/skill.c | 8 | ||||
-rw-r--r-- | src/map/status.c | 18 |
2 files changed, 23 insertions, 3 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index bb3b11218..b3cb1ae6f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -466,8 +466,11 @@ int can_copy (struct map_session_data *sd, uint16 skill_id, struct block_list* b skill_id == MER_INCAGI || skill_id == MER_BLESSING)) return 0; - // Couldn't preserve 3rd Class skills except only when using Reproduce skill. [Jobbie] - if( !(sd->sc.data[SC__REPRODUCE]) && ((skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK) || (skill_id >= RL_GLITTERING_GREED && skill_id <= OB_AKAITSUKI) || (skill_id >= GC_DARKCROW && skill_id <= NC_MAGMA_ERUPTION_DOTDAMAGE))) + // Couldn't preserve 3rd Class/Summoner skills except only when using Reproduce skill. [Jobbie] + if (!(sd->sc.data[SC__REPRODUCE]) && + ((skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK) || + (skill_id >= RL_GLITTERING_GREED && skill_id <= OB_AKAITSUKI) || + (skill_id >= GC_DARKCROW && skill_id <= SU_FRESHSHRIMP))) return 0; // Reproduce will only copy skills according on the list. [Jobbie] else if( sd->sc.data[SC__REPRODUCE] && !skill->dbs->reproduce_db[skill->get_index(skill_id)] ) @@ -6023,6 +6026,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case RK_ABUNDANCE: case RK_CRUSHSTRIKE: case ALL_ODINS_POWER: + case SU_FRESHSHRIMP: clif->skill_nodamage(src,bl,skill_id,skill_lv, sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv))); break; diff --git a/src/map/status.c b/src/map/status.c index bb1107ee6..f37c6e6cf 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -725,6 +725,7 @@ void initChangeTables(void) status->set_sc(SU_HIDE, SC_SUHIDE, SI_SUHIDE, SCB_SPEED); add_sc(SU_SCRATCH, SC_BLOODING); status->set_sc(SU_STOOP, SC_SU_STOOP, SI_SU_STOOP, SCB_NONE); + status->set_sc(SU_FRESHSHRIMP, SC_FRESHSHRIMP, SI_FRESHSHRIMP, SCB_NONE); // Elemental Spirit summoner's 'side' status changes. status->set_sc( EL_CIRCLE_OF_FIRE , SC_CIRCLE_OF_FIRE_OPTION, SI_CIRCLE_OF_FIRE_OPTION, SCB_NONE ); @@ -7809,7 +7810,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t // Other Effects case SC_VACUUM_EXTREME: case SC_NETHERWORLD: - + case SC_FRESHSHRIMP: return 0; } } @@ -9778,6 +9779,15 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t **/ val2 = 20+(20*val1); break; + /** + * Summoner + */ + case SC_FRESHSHRIMP: + val4 = tick / (10000 - ((val1 - 1) * 1000)); + tick_time = 10000 - ((val1 - 1) * 1000); + if (val4 <= 0) // Prevents a negeative value from happening + val4 = 0; + break; default: if (calc_flag == SCB_NONE && status->dbs->SkillChangeTable[type] == 0 && status->dbs->IconChangeTable[type] == 0) { //Status change with no calc, no icon, and no skill associated...? @@ -12043,6 +12053,12 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) return 0; } break; + case SC_FRESHSHRIMP: + if (--(sce->val4) >= 0) { + status_heal(bl, st->max_hp / 100, 0, 2); + sc_timer_next((10000 - ((sce->val1 - 1) * 1000)) + tick, status->change_timer, bl->id, data); + } + break; } // default for all non-handled control paths is to end the status |