summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-29 15:25:28 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-29 15:25:28 +0000
commitb3b97640f916a93e193e491b156877824649d25c (patch)
tree447317f0af98e70d0b732ac3199c572e08b9af23 /src/map/battle.c
parente855e728ca6778580a913d8046a9e8fa652fb983 (diff)
downloadhercules-b3b97640f916a93e193e491b156877824649d25c.tar.gz
hercules-b3b97640f916a93e193e491b156877824649d25c.tar.bz2
hercules-b3b97640f916a93e193e491b156877824649d25c.tar.xz
hercules-b3b97640f916a93e193e491b156877824649d25c.zip
- Cleaned up some status_get functions.
- Optimized a bit the SC_PROVOKE code (to use val3/val4) - Fixed draining when the amount drained is negative (invoke zap rather than heal) - Implemented GS_FLING as per the current skill description. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6819 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 71c5c8411..5e2a0d1b6 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2463,6 +2463,7 @@ struct Damage battle_calc_misc_attack(
//Misc Settings
switch(skill_num){
case PA_PRESSURE:
+ case GS_FLING:
flag.elefix = flag.cardfix = 0;
case HT_BLITZBEAT:
case TF_THROWSTONE:
@@ -2551,6 +2552,9 @@ struct Damage battle_calc_misc_attack(
if(map_flag_vs(target->m) || is_boss(target))
md.damage>>=1; //temp value
break;
+ case GS_FLING:
+ md.damage = sd?sd->status.job_level:status_get_lv(src);
+ break;
}
damage_div_fix(md.damage, md.div_);
@@ -2741,7 +2745,17 @@ void battle_drain(TBL_PC *sd, TBL_PC* tsd, int rdamage, int ldamage, int race, i
}
if (!thp && !tsp) return;
- status_heal(&sd->bl, thp, tsp, battle_config.show_hp_sp_drain?3:1);
+ //Split'em up as Hp/Sp could be drained/leeched.
+ if(thp> 0)
+ status_heal(&sd->bl, thp, 0, battle_config.show_hp_sp_drain?3:1);
+ else if (thp < 0)
+ status_zap(&sd->bl, thp, 0);
+
+ if(tsp > 0)
+ status_heal(&sd->bl, 0, tsp, battle_config.show_hp_sp_drain?3:1);
+ else if (tsp < 0)
+ status_zap(&sd->bl, 0, tsp);
+
if (tsd) {
if (rhp || rsp)