summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-02 16:32:37 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-02 16:32:37 +0000
commit631137fae16d2ef187e461fe8ac5e53e1088967b (patch)
tree0d801e6ab5e84d18ae1582861232e175d4d479f3 /src/map/battle.c
parent99e419e146eeb6edb0ab70a4a12d5e980c6975fd (diff)
downloadhercules-631137fae16d2ef187e461fe8ac5e53e1088967b.tar.gz
hercules-631137fae16d2ef187e461fe8ac5e53e1088967b.tar.bz2
hercules-631137fae16d2ef187e461fe8ac5e53e1088967b.tar.xz
hercules-631137fae16d2ef187e461fe8ac5e53e1088967b.zip
- Kaite now works against all types of spells.
- Kaupe now works against all skills. - Sanctuary now won't damage non-enemies. - Blessing now will always give you bonus stats even if you are wearing undead armor. - Linking skills now have their cast-time reduced by dex. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6447 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 45f7ac24d..641e17378 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -461,7 +461,14 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
if(sc->data[SC_FOGWALL].timer != -1 && flag&BF_MAGIC
&& rand()%100 < 75 && !(skill_get_inf(skill_num)&INF_GROUND_SKILL))
return 0;
-
+
+ if(sc->data[SC_KAUPE].timer != -1 && rand()%100 < sc->data[SC_KAUPE].val2)
+ {
+ if (--sc->data[SC_KAUPE].val3 <= 0) //We make it work like Safety Wall, even though it only blocks 1 time.
+ status_change_end(bl, SC_KAUPE, -1);
+ return 0;
+ }
+
//Now damage increasing effects
if(sc->data[SC_AETERNA].timer!=-1 && skill_num != PA_PRESSURE && skill_num != PF_SOULBURN){
damage<<=1;
@@ -1363,11 +1370,7 @@ static struct Damage battle_calc_weapon_attack(
if(rand()%100 >= hitrate)
wd.dmg_lv = ATK_FLEE;
- else if (tsc && tsc->data[SC_KAUPE].timer != -1 && rand()%100 < tsc->data[SC_KAUPE].val2) {
- if (--tsc->data[SC_KAUPE].val3 <= 0) //We make it work like Safety Wall, even though it only blocks 1 time.
- status_change_end(target, SC_KAUPE, -1);
- wd.dmg_lv = ATK_FLEE;
- } else
+ else
flag.hit =1;
} //End hit/miss calculation