From 803169a68c6b3dcf9d0db07b479d4bad65894603 Mon Sep 17 00:00:00 2001 From: aleos Date: Wed, 20 Feb 2013 04:13:42 +0000 Subject: > Follow up to r17140. - Crush Strike now lasts for 30 seconds. - Phantom Thrust is now targeted to allies. - Updated SP requirement for Death Bound. - Giant Growth now has a .1% chance to break caster's weapon. - Stone Hard Skin now has a 30% chance to break caster's weapon. - Stone Hard Skin now has a 30% chance to reduce 25% damage from monsters for 10 seconds. - Corrected Stone Hard Skin's DEF/MDEF increase formula. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17145 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/map/battle.c') diff --git a/src/map/battle.c b/src/map/battle.c index 3140fbc18..8d3edec4e 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 **/ -- cgit v1.2.3-60-g2f50