summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-02 14:31:16 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-02 14:31:16 +0000
commit103ca6312d0d252b5a8a05eefa78034ad341fe6e (patch)
tree87f499d9a38013a223fa4005719b4d52d6ab4e9b /src/map/battle.c
parentbc3119af6271425b6d1579e10ff3d64478467a06 (diff)
downloadhercules-103ca6312d0d252b5a8a05eefa78034ad341fe6e.tar.gz
hercules-103ca6312d0d252b5a8a05eefa78034ad341fe6e.tar.bz2
hercules-103ca6312d0d252b5a8a05eefa78034ad341fe6e.tar.xz
hercules-103ca6312d0d252b5a8a05eefa78034ad341fe6e.zip
Fixed bugreport:6324 where re-spawning mob still hits/chases its previous attacker.
Partial fixed bugreport:6396 where Chemical Protection skills doesn't check targets current equipments. Finally added almost all Kagerou/Oboro skills only one more left..phew...:D (KG_KAGEHUMI,KG_KYOMU,KG_KAGEMUSYA,OB_ZANGETSU,OB_OBOROGENSOU,OB_OBOROGENSOU_TRANSITION_ATK,OB_AKAITSUKI) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16560 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index f06ab2292..046e64eb0 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1456,9 +1456,10 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if( sd && !skill_num ) { //Check for double attack.
if( ( ( skill_lv = pc_checkskill(sd,TF_DOUBLE) ) > 0 && sd->weapontype1 == W_DAGGER )
- || ( sd->bonus.double_rate > 0 && sd->weapontype1 != W_FIST ) ) //Will fail bare-handed
+ || ( sd->bonus.double_rate > 0 && sd->weapontype1 != W_FIST ) //Will fail bare-handed
+ || ( sc && sc->data[SC_KAGEMUSYA] && sd->weapontype1 != W_FIST )) // Need confirmation
{ //Success chance is not added, the higher one is used [Skotlex]
- if( rnd()%100 < ( 5*skill_lv > sd->bonus.double_rate ? 5*skill_lv : sd->bonus.double_rate ) )
+ if( rnd()%100 < ( 5*skill_lv > sd->bonus.double_rate ? 5*skill_lv : sc && sc->data[SC_KAGEMUSYA]?sc->data[SC_KAGEMUSYA]->val1*3:sd->bonus.double_rate ) )
{
wd.div_ = skill_get_num(TF_DOUBLE,skill_lv?skill_lv:1);
wd.type = 0x08;
@@ -4441,6 +4442,10 @@ int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int
if (rdamage < 1) rdamage = 1;
}
}
+
+ if( sc && sc->data[SC_KYOMU] ) // Nullify reflecting ability
+ rdamage = 0;
+
return rdamage;
}