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 | |
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')
-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 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 **/ diff --git a/src/map/skill.c b/src/map/skill.c index d21d39bb0..6486d0772 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 d61503a0e..cf2c096c9 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 ); @@ -4907,7 +4907,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; @@ -5036,7 +5036,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; @@ -8047,6 +8047,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; |