Corrected Stone Hard Skin Rune effects (#3713)
* Fixes #3693. * Stone Hard Skin should not end after taking full damage. Thanks to @slyx88 and @flamefury!
This commit is contained in:
parent
5cc368a177
commit
0bb279b64c
@ -1425,13 +1425,10 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
|
||||
skill_castend_damage_id(bl,src,MH_MAGMA_FLOW,sce->val1,gettick(),0);
|
||||
|
||||
if( damage > 0 && (sce = sc->data[SC_STONEHARDSKIN]) ) {
|
||||
sce->val2 -= (int)cap_value(damage,INT_MIN,INT_MAX);
|
||||
if( src->type == BL_MOB ) //using explicit call instead break_equip for duration
|
||||
sc_start(src,src, SC_STRIPWEAPON, 30, 0, skill_get_time2(RK_STONEHARDSKIN, sce->val1));
|
||||
else if (flag&(BF_WEAPON|BF_SHORT))
|
||||
skill_break_equip(src,src, EQP_WEAPON, 3000, BCT_SELF);
|
||||
if( sce->val2 <= 0 )
|
||||
status_change_end(bl, SC_STONEHARDSKIN, INVALID_TIMER);
|
||||
}
|
||||
|
||||
if (src->type == BL_PC && sc->data[SC_GVG_GOLEM]) {
|
||||
|
@ -10377,15 +10377,10 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
||||
val2 = 500 + 100 * val1;
|
||||
break;
|
||||
case SC_STONEHARDSKIN:
|
||||
{
|
||||
int hp = status->hp / 5; // 20% of HP
|
||||
|
||||
if (sd)
|
||||
val1 = sd->status.job_level * pc_checkskill(sd, RK_RUNEMASTERY) / 4; // DEF/MDEF Increase
|
||||
if (!status_charge(bl, hp, 0))
|
||||
return 0;
|
||||
val2 = hp;
|
||||
}
|
||||
if (!status_charge(bl, status->hp / 5, 0)) // 20% of HP
|
||||
return 0;
|
||||
if (sd)
|
||||
val1 = sd->status.job_level * pc_checkskill(sd, RK_RUNEMASTERY) / 4; // DEF/MDEF Increase
|
||||
break;
|
||||
case SC_REFRESH:
|
||||
status_heal(bl, status_get_max_hp(bl) * 25 / 100, 0, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user