diff options
author | Jared Adams <jaxad0127@gmail.com> | 2008-10-26 20:40:30 +0000 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2008-10-26 20:40:30 +0000 |
commit | 90735f447e12393f3d89b8c053bd4d8c8a707fa2 (patch) | |
tree | dc6757d0b88d3f7ba9f7f545aba437983bc0255b /src/map/magic.c | |
parent | 7f21ec064e78bf8d06ae341d1d61e12516970719 (diff) | |
download | tmwa-90735f447e12393f3d89b8c053bd4d8c8a707fa2.tar.gz tmwa-90735f447e12393f3d89b8c053bd4d8c8a707fa2.tar.bz2 tmwa-90735f447e12393f3d89b8c053bd4d8c8a707fa2.tar.xz tmwa-90735f447e12393f3d89b8c053bd4d8c8a707fa2.zip |
Commit Mantis 509
Diffstat (limited to 'src/map/magic.c')
-rw-r--r-- | src/map/magic.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/magic.c b/src/map/magic.c index 114f74d..7309281 100644 --- a/src/map/magic.c +++ b/src/map/magic.c @@ -76,8 +76,9 @@ magic_message(character_t *caster, free(spell_invocation); if (spell) { + int near_miss; env_t *env = spell_create_env(&magic_conf, spell, caster, power, parameter); - effect_set_t *effects = spell_trigger(spell, caster, env); + effect_set_t *effects = spell_trigger(spell, caster, env, &near_miss); #ifdef DEBUG fprintf(stderr, "Found spell `%s', triggered = %d\n", spell_, effects != NULL); @@ -99,6 +100,11 @@ magic_message(character_t *caster, return (spell->flags & SPELL_FLAG_SILENT)? -1 : 1; } else { magic_free_env(env); + + /* Obscure proper almost-triggered spell */ + if (near_miss) + while (*source_invocation) + *source_invocation++ = '.'; } return 0; } |