Skip to content

Commit

Permalink
Updated Howling of Mandragora effect
Browse files Browse the repository at this point in the history
* Timer is not refreshed when casted on target again.
* Target's SP is not zapped again when already active.
  • Loading branch information
aleos89 committed Dec 22, 2015
1 parent 49f1c43 commit 9632d2a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/map/skill.c
Expand Up @@ -10069,19 +10069,20 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case GN_MANDRAGORA:
if( flag&1 ) {
int rate = 25 + (10 * skill_lv) - (tstatus->vit + tstatus->luk) / 5;

if (rate < 10)
rate = 10;
if (bl->type == BL_MOB)
break;
if (rnd()%100 < rate) {
sc_start(src,bl,type,100,skill_lv,skill_get_time(skill_id,skill_lv));
status_zap(bl,0,status_get_max_sp(bl) * (25 + 5 * skill_lv) / 100);
}
} else {
map_foreachinrange(skill_area_sub,bl,skill_get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill_castend_nodamage_id);
clif_skill_nodamage(src,src,skill_id,skill_lv,1);
if (bl->type == BL_MOB || (tsc && tsc->data[type]))
break; // Don't activate if target is a monster or zap SP if target already has Mandragora active.
if (rnd()%100 < rate) {
sc_start(src,bl,type,100,skill_lv,skill_get_time(skill_id,skill_lv));
status_zap(bl,0,status_get_max_sp(bl) * (25 + 5 * skill_lv) / 100);
}
break;
} else {
map_foreachinrange(skill_area_sub,bl,skill_get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill_castend_nodamage_id);
clif_skill_nodamage(src,src,skill_id,skill_lv,1);
}
break;
case GN_SLINGITEM:
if( sd ) {
short ammo_id;
Expand Down
1 change: 1 addition & 0 deletions src/map/status.c
Expand Up @@ -8573,6 +8573,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
case SC_DEEPSLEEP:
case SC_NETHERWORLD:
case SC_CRYSTALIZE:
case SC_MANDRAGORA:
case SC_DEFSET:
case SC_MDEFSET:
case SC_NORECOVER_STATE:
Expand Down

0 comments on commit 9632d2a

Please sign in to comment.