Skip to content

Commit

Permalink
Implemented SU_FRESHSHRIMP Skill.
Browse files Browse the repository at this point in the history
Consumes Fresh Shrimp to recover HP for 2 Minutes.
Max Level 5:
Recovers Every (11-SkillLevel) Seconds.
  • Loading branch information
dastgirp authored and hemagx committed Oct 22, 2016
1 parent 408878c commit a057d21
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/map/skill.c
Expand Up @@ -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)] )
Expand Down Expand Up @@ -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;
Expand Down
18 changes: 17 additions & 1 deletion src/map/status.c
Expand Up @@ -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 );
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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...?
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a057d21

Please sign in to comment.