summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFreeyorp <Freeyorp101@hotmail.com>2010-04-05 22:39:03 +1200
committerFreeyorp <Freeyorp101@hotmail.com>2010-04-11 12:10:57 +1200
commit1983582d259875b95b1ec55ac342d102c936c026 (patch)
tree3747b86e60d5658c90a9ed6b019f9c562eb0e165 /src
parent5deddceda5db39858d036fdb8340d820d8b63ada (diff)
downloadtmwa-1983582d259875b95b1ec55ac342d102c936c026.tar.gz
tmwa-1983582d259875b95b1ec55ac342d102c936c026.tar.bz2
tmwa-1983582d259875b95b1ec55ac342d102c936c026.tar.xz
tmwa-1983582d259875b95b1ec55ac342d102c936c026.zip
Make injure() respect killer and killable states
Diffstat (limited to 'src')
-rw-r--r--src/map/magic-stmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/magic-stmt.c b/src/map/magic-stmt.c
index 93ef65f..a318314 100644
--- a/src/map/magic-stmt.c
+++ b/src/map/magic-stmt.c
@@ -714,7 +714,7 @@ static int op_injure (env_t * env, int args_nr, val_t * args)
int target_hp = battle_get_hp (target);
int mdef = battle_get_mdef (target);
- if (target->type == BL_PC && !map[target->m].flag.pvp)
+ if (target->type == BL_PC && !map[target->m].flag.pvp && !((character_t *) target)->special_state.killable && (caster->type != BL_PC || !((character_t *) caster)->special_state.killer))
return 0; /* Cannot damage other players outside of pvp */
if (target != caster)