summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorDastgir Pojee <dastgirp@gmail.com>2016-10-02 21:28:12 +0530
committerhemagx <ibrahem.h.basyone@gmail.com>2016-10-22 02:21:57 +0200
commita057d219f6253fb3ce19d7fc2a3f07e7365bc042 (patch)
tree36f9ce4a3c7ff11cf703183d5b57dce52a7c2487 /src/map/status.c
parent408878cc59bf0ad0154f7b9c7f5367ea530a9362 (diff)
downloadhercules-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.
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c18
1 files changed, 17 insertions, 1 deletions
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