From 33af4d422e9127086bd218e63369174ca85ea754 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Wed, 27 Jul 2011 14:38:11 -0700 Subject: Raging skill only with melee weapon, fix integer truncation --- src/map/pc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index fb98bcb..fcf97c1 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1814,9 +1814,10 @@ int pc_calcstatus (struct map_session_data *sd, int first) // so critical chance can get multiplied by ~1.5 and setting def2 to a third when skill maxed out // def2 is the defence gained by vit, whereas "def", which is gained by armor, stays as is int spbsk = skill_power (sd, TMW_RAGING); - if (spbsk!=0) { - sd->critical *= (128 + spbsk)/256; - sd->def2 /= (128 + spbsk)/128; + if (spbsk != 0 && sd->attackrange <= 2) + { + sd->critical = (sd->critical * (128 + spbsk)) / 256; + sd->def2 = (sd->def2 * 128) / (128 + spbsk); } if (sd->base_atk < 1) -- cgit v1.2.3-70-g09d2