diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2013-02-22 20:47:10 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2013-02-22 20:47:10 +0800 |
commit | cd0743985cc0499035d4500209b4af604de2d8be (patch) | |
tree | e4953e8821199191ba051cd9902831ab25ef2949 /src/map/battle.c | |
parent | 915365b27f5e35e8957e25d9ea7231ad1c4f8861 (diff) | |
parent | 6165590a1a68653ad1fa3dd14306a2e64dc9c5c9 (diff) | |
download | hercules-cd0743985cc0499035d4500209b4af604de2d8be.tar.gz hercules-cd0743985cc0499035d4500209b4af604de2d8be.tar.bz2 hercules-cd0743985cc0499035d4500209b4af604de2d8be.tar.xz hercules-cd0743985cc0499035d4500209b4af604de2d8be.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 197b0578a..930be1478 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1061,6 +1061,21 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag skill_castend_damage_id(bl,src,MH_MAGMA_FLOW,sce->val1,gettick(),0); } + if( (sce = sc->data[SC_STONEHARDSKIN]) && flag&BF_WEAPON && damage > 0 ) { + sce->val2 -= damage; + if( src->type == BL_PC ) { + TBL_PC *ssd = BL_CAST(BL_PC, src); + if (ssd && ssd->status.weapon != W_BOW) + skill_break_equip(src, EQP_WEAPON, 3000, BCT_SELF); + } else + skill_break_equip(src, EQP_WEAPON, 3000, BCT_SELF); + // 30% chance to reduce monster's ATK by 25% for 10 seconds. + if( src->type == BL_MOB ) + sc_start(src, SC_STRIPWEAPON, 30, 0, skill_get_time2(RK_STONEHARDSKIN, sce->val1)); + if( sce->val2 <= 0 ) + status_change_end(bl, SC_STONEHARDSKIN, INVALID_TIMER); + } + /** * In renewal steel body reduces all incoming damage by 1/10 **/ |