summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-08 13:34:38 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-08 13:34:38 +0000
commit9f4ef6d974826a6fff8e12ebf1e73bedd103f958 (patch)
treed3c095190a56b3f09df9641af2f7e7cf3ca2641f /src/map/battle.c
parente392d2608cf3ff2ca7a56a0e5d5b776418513313 (diff)
downloadhercules-9f4ef6d974826a6fff8e12ebf1e73bedd103f958.tar.gz
hercules-9f4ef6d974826a6fff8e12ebf1e73bedd103f958.tar.bz2
hercules-9f4ef6d974826a6fff8e12ebf1e73bedd103f958.tar.xz
hercules-9f4ef6d974826a6fff8e12ebf1e73bedd103f958.zip
- Fixed alliance/opposition making not cancelling out map-server-side when the guild already had max number of alliances/oppositions (thanks to k3dt)
- Cleaned a bit the code for SG_*_ANGER - Fixed a warning in clif.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8673 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index a2f71a32c..ec5cbad57 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1765,16 +1765,21 @@ static struct Damage battle_calc_weapon_attack(
if (flag.lh)
wd.damage2 = battle_addmastery(sd,target,wd.damage2,1);
- if((skill=pc_checkskill(sd,SG_STAR_ANGER)) >0 && (t_class == sd->hate_mob[2] || (sc && sc->data[SC_MIRACLE].timer!=-1)))
+ if((skill=pc_checkskill(sd,SG_STAR_ANGER)) >0 && (t_class == sd->hate_mob[2] ||
+ (sc && sc->data[SC_MIRACLE].timer!=-1)))
{
- skillratio = (sd->status.base_level + sstatus->str + sstatus->dex + sstatus->luk)/(skill<4?12-3*skill:1);
+ skillratio = sd->status.base_level + sstatus->str + sstatus->dex + sstatus->luk;
+ if (skill<4)
+ skillratio /= 12-3*skill;
ATK_ADDRATE(skillratio);
} else
if(
((skill=pc_checkskill(sd,SG_SUN_ANGER)) >0 && t_class == sd->hate_mob[0]) ||
((skill=pc_checkskill(sd,SG_MOON_ANGER)) >0 && t_class == sd->hate_mob[1])
) {
- skillratio = (sd->status.base_level + sstatus->dex+ sstatus->luk)/(skill<4?12-3*skill:1);
+ skillratio = sd->status.base_level + sstatus->dex+ sstatus->luk;
+ if (skill<4)
+ skillratio /= 12-3*skill;
ATK_ADDRATE(skillratio);
}
// Added Tobidougu bonus on throwing weapon ninja skills if not wearing a Fuuma shuriken (bonus already added in battle_addmastery)