summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-30 17:53:18 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-30 17:53:18 +0000
commit5d2225fbbf84324c1cf370bb11776b1c0a671b4a (patch)
tree448f2af719809cbc0a733729be8017de4b5c57a7 /src/map/battle.c
parentb47c0ac38a3b04b6e5b0001608e726de3e93448f (diff)
downloadhercules-5d2225fbbf84324c1cf370bb11776b1c0a671b4a.tar.gz
hercules-5d2225fbbf84324c1cf370bb11776b1c0a671b4a.tar.bz2
hercules-5d2225fbbf84324c1cf370bb11776b1c0a671b4a.tar.xz
hercules-5d2225fbbf84324c1cf370bb11776b1c0a671b4a.zip
- Set the inf2 to encore skills of Wand of Hermode
- Modified battle_calc_return_damage to take the skill id as well, now magic damage return will not work on skills tagged as ground or self targetted. - Fixed Gank not working at all with the default max steal tries setting. - Soul Drain won't work with skills tagged as self-targetted. - Improved the Suiton code so that the walk/agi penalty only applies to enemies of whoever casted the skill. - Moved the initial status_calc_pc call to when you finish loading the map, should fix equipment scripts which are based on character variables not working. - Some cleanup of the clif_parse_LoadEndAck function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9099 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 6a4dbf98f..6d6c928d7 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2761,7 +2761,7 @@ struct Damage battle_calc_attack( int attack_type,
return d;
}
-int battle_calc_return_damage(struct block_list *bl, int *damage, int flag) {
+int battle_calc_return_damage(struct block_list *bl, int skill, int *damage, int flag) {
struct map_session_data *sd=NULL;
struct status_change *sc;
int rdamage = 0;
@@ -2793,7 +2793,9 @@ int battle_calc_return_damage(struct block_list *bl, int *damage, int flag) {
// magic_damage_return by [AppleGirl] and [Valaris]
if(flag&BF_MAGIC)
{
- if(sd && sd->magic_damage_return && rand()%100 < sd->magic_damage_return)
+ if(sd && sd->magic_damage_return &&
+ !(skill_get_inf(skill)&(INF_GROUND_SKILL|INF_SELF_SKILL)) &&
+ rand()%100 < sd->magic_damage_return)
{ //Bounces back full damage, you take none.
rdamage = *damage;
*damage = 0;
@@ -2980,7 +2982,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
damage = wd.damage + wd.damage2;
if (damage > 0 && src != target) {
- rdamage = battle_calc_return_damage(target, &damage, wd.flag);
+ rdamage = battle_calc_return_damage(target, 0, &damage, wd.flag);
if (rdamage > 0) {
rdelay = clif_damage(src, src, tick, wd.amotion, sstatus->dmotion, rdamage, 1, 4, 0);
//Use Reflect Shield to signal this kind of skill trigger. [Skotlex]