summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-29 18:30:25 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-29 18:30:25 +0000
commit4eb0c37f3c4c9bc545a37afcbfdd0493df29de28 (patch)
tree61e0caaaba6a9bab1431ec1be4e9cf103f2a17ee /src/map/battle.c
parentad8fe4131ee71b832d9cf5c75997705ff0f9770a (diff)
downloadhercules-4eb0c37f3c4c9bc545a37afcbfdd0493df29de28.tar.gz
hercules-4eb0c37f3c4c9bc545a37afcbfdd0493df29de28.tar.bz2
hercules-4eb0c37f3c4c9bc545a37afcbfdd0493df29de28.tar.xz
hercules-4eb0c37f3c4c9bc545a37afcbfdd0493df29de28.zip
- Added bonus bSkillHeal to distinguish offensive skill damage increases from healing power boosts.
- Moved battle_skillatk_bonus to pc.c, cleaned up the related skillatk bonus code to consider the skillheal bonus option. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11085 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 93e2e98fb..3f9441aa4 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -824,20 +824,6 @@ static int battle_blewcount_bonus(struct map_session_data *sd, int skill_num)
return 0;
}
-int battle_skillatk_bonus(struct map_session_data *sd, int skill_num)
-{
- int i;
- if (!sd->skillatk[0].id)
- return 0;
- for (i = 0; i < MAX_PC_BONUS && sd->skillatk[i].id &&
- sd->skillatk[i].id != skill_num; i++);
-
- if (i < MAX_PC_BONUS && sd->skillatk[i].id)
- return sd->skillatk[i].val;
-
- return 0;
-}
-
struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag);
struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag);
@@ -1637,7 +1623,7 @@ static struct Damage battle_calc_weapon_attack(
if(sd)
{
- if (skill_num && (i = battle_skillatk_bonus(sd, skill_num)))
+ if (skill_num && (i = pc_skillatk_bonus(sd, skill_num)))
ATK_ADDRATE(i);
if(skill_num != PA_SACRIFICE && skill_num != MO_INVESTIGATE &&
@@ -2334,7 +2320,7 @@ struct Damage battle_calc_magic_attack(
if(sd) {
//Damage bonuses
- if ((i = battle_skillatk_bonus(sd, skill_num)))
+ if ((i = pc_skillatk_bonus(sd, skill_num)))
ad.damage += ad.damage*i/100;
//Ignore Defense?
@@ -2631,7 +2617,7 @@ struct Damage battle_calc_misc_attack(
md.damage=md.damage*cardfix/10000;
}
- if (sd && (i = battle_skillatk_bonus(sd, skill_num)))
+ if (sd && (i = pc_skillatk_bonus(sd, skill_num)))
md.damage += md.damage*i/100;
if(md.damage < 0)