summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index d7334a079..b2dfd3abd 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5676,14 +5676,17 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
if(inf&INF_ATTACK_SKILL ||
(inf&INF_SELF_SKILL && inf2&INF2_NO_TARGET_SELF)) //Combo skills
inf = BCT_ENEMY; //Offensive skill.
- else
- inf = 0;
+ else if(inf2&INF2_NO_ENEMY)
+ inf = BCT_NOENEMY;
if(inf2 & (INF2_PARTY_ONLY|INF2_GUILD_ONLY) && src != target)
+ {
inf |=
(inf2&INF2_PARTY_ONLY?BCT_PARTY:0)|
- (inf2&INF2_GUILD_ONLY?BCT_GUILD:0)|
- (inf2&INF2_ALLOW_ENEMY?BCT_ENEMY:0);
+ (inf2&INF2_GUILD_ONLY?BCT_GUILD:0);
+ //Remove neutral targets (but allow enemy if skill is designed to be so)
+ inf &= ~BCT_NEUTRAL;
+ }
if (inf && battle_check_target(src, target, inf) <= 0)
break;