summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorcsnv <ctt@csnv.es>2015-07-03 18:50:54 +0200
committercsnv <ctt@csnv.es>2015-07-03 18:50:54 +0200
commitab3b17b12e3da7b2f5bb7b43546dd4d60fd934b7 (patch)
treec413a8bde03c0165b1b8fa1efbec409d58e26868 /src/map/battle.c
parent53c8d6755372b34f0f6b53433b57fa061e1cc7a8 (diff)
downloadhercules-ab3b17b12e3da7b2f5bb7b43546dd4d60fd934b7.tar.gz
hercules-ab3b17b12e3da7b2f5bb7b43546dd4d60fd934b7.tar.bz2
hercules-ab3b17b12e3da7b2f5bb7b43546dd4d60fd934b7.tar.xz
hercules-ab3b17b12e3da7b2f5bb7b43546dd4d60fd934b7.zip
Corrected critical bonus display
- Fixes #573
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 603db4738..4e56b47ce 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4485,13 +4485,19 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
skill_id == NJ_KIRIKAGE))
{
short cri = sstatus->cri;
- if (sd)
- {
+ if (sd) {
+ // Check for katar here as katar crit bonus should not be displayed
+ if (sd->status.weapon == W_KATAR) {
+ cri <<= 1;
+ }
+
cri+= sd->critaddrace[tstatus->race];
- if(flag.arrow)
+
+ if (flag.arrow) {
cri += sd->bonus.arrow_cri;
+ }
}
- if( sc && sc->data[SC_CAMOUFLAGE] )
+ if (sc && sc->data[SC_CAMOUFLAGE])
cri += 10 * (10-sc->data[SC_CAMOUFLAGE]->val4);
#ifndef RENEWAL
//The official equation is *2, but that only applies when sd's do critical.