diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 15 | ||||
-rw-r--r-- | src/map/skill.c | 2 | ||||
-rw-r--r-- | src/map/status.c | 10 |
3 files changed, 24 insertions, 3 deletions
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 **/ diff --git a/src/map/skill.c b/src/map/skill.c index 98c7e8ba3..81bfbd7c7 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1436,6 +1436,8 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint rate = battle_config.equip_natural_break_rate; if( sc ) { + if(sc->data[SC_GIANTGROWTH]) + rate += 10; if(sc->data[SC_OVERTHRUST]) rate += 10; if(sc->data[SC_MAXOVERTHRUST]) diff --git a/src/map/status.c b/src/map/status.c index edac88af0..b3cbf27ab 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -556,7 +556,7 @@ void initChangeTables(void) { set_sc( RK_MILLENNIUMSHIELD , SC_MILLENNIUMSHIELD , SI_REUSE_MILLENNIUMSHIELD , SCB_NONE ); set_sc( RK_REFRESH , SC_REFRESH , SI_REFRESH , SCB_NONE ); set_sc( RK_GIANTGROWTH , SC_GIANTGROWTH , SI_GIANTGROWTH , SCB_STR ); - set_sc( RK_STONEHARDSKIN , SC_STONEHARDSKIN , SI_STONEHARDSKIN , SCB_NONE ); + set_sc( RK_STONEHARDSKIN , SC_STONEHARDSKIN , SI_STONEHARDSKIN , SCB_DEF|SCB_MDEF ); set_sc( RK_VITALITYACTIVATION, SC_VITALITYACTIVATION, SI_VITALITYACTIVATION, SCB_REGEN ); set_sc( RK_FIGHTINGSPIRIT , SC_FIGHTINGSPIRIT , SI_FIGHTINGSPIRIT , SCB_WATK|SCB_ASPD ); set_sc( RK_ABUNDANCE , SC_ABUNDANCE , SI_ABUNDANCE , SCB_NONE ); @@ -4906,7 +4906,7 @@ static defType status_calc_def(struct block_list *bl, struct status_change *sc, def -= 20; if( sc->data[SC_ANGRIFFS_MODUS] ) def -= 30 + 20 * sc->data[SC_ANGRIFFS_MODUS]->val1; - if(sc->data[SC_STONEHARDSKIN])// Final DEF increase divided by 10 since were using classic (pre-renewal) mechanics. [Rytech] + if(sc->data[SC_STONEHARDSKIN]) def += sc->data[SC_STONEHARDSKIN]->val1; if(sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) def >>=1; @@ -5035,7 +5035,7 @@ static defType status_calc_mdef(struct block_list *bl, struct status_change *sc, mdef += (sc->data[SC_ENDURE]->val4 == 0) ? sc->data[SC_ENDURE]->val1 : 1; if(sc->data[SC_CONCENTRATION]) mdef += 1; //Skill info says it adds a fixed 1 Mdef point. - if(sc->data[SC_STONEHARDSKIN])// Final MDEF increase divided by 10 since were using classic (pre-renewal) mechanics. [Rytech] + if(sc->data[SC_STONEHARDSKIN]) mdef += sc->data[SC_STONEHARDSKIN]->val1; if(sc->data[SC_WATER_BARRIER]) mdef += sc->data[SC_WATER_BARRIER]->val2; @@ -8046,6 +8046,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val case SC_DEATHBOUND: val2 = 500 + 100 * val1; break; + case SC_STONEHARDSKIN: + if( sd ) + val1 = sd->status.job_level * pc_checkskill(sd, RK_RUNEMASTERY) / 4; //DEF/MDEF Increase + break; case SC_FIGHTINGSPIRIT: val_flag |= 1|2; break; |