summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 12:31:58 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 12:31:58 +0000
commitbdc6551ea5f86f85c5edeb1b6ae388b1b01a3427 (patch)
tree2620b12ed7dee6e00b3f2648fc3a16f93cfa0140 /src
parent373bd27fd29189f7e387b11021bbd9e15fa6468c (diff)
downloadhercules-bdc6551ea5f86f85c5edeb1b6ae388b1b01a3427.tar.gz
hercules-bdc6551ea5f86f85c5edeb1b6ae388b1b01a3427.tar.bz2
hercules-bdc6551ea5f86f85c5edeb1b6ae388b1b01a3427.tar.xz
hercules-bdc6551ea5f86f85c5edeb1b6ae388b1b01a3427.zip
- Fixed battle_calc_weapon_attack damage capping damage to a minimum of 0 (negative values should be allowed when attack is absorbed by target's element)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6840 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 1770e3df9..f655c4619 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1888,12 +1888,6 @@ static struct Damage battle_calc_weapon_attack(
}
}
}
-
- if(!flag.rh || wd.damage<1)
- wd.damage=0;
-
- if(!flag.lh || wd.damage2<1)
- wd.damage2=0;
if (sd)
{
@@ -1926,6 +1920,12 @@ static struct Damage battle_calc_weapon_attack(
flag.lh = 1;
}
}
+
+ if(!flag.rh && wd.damage)
+ wd.damage=0;
+
+ if(!flag.lh && wd.damage2)
+ wd.damage2=0;
if(wd.damage > 0 || wd.damage2 > 0)
{