summaryrefslogtreecommitdiff
path: root/src/map/magic.c
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2008-11-22 01:15:44 -0700
committerFate <fate-tmw@googlemail.com>2008-11-22 01:15:44 -0700
commitc70aa417cdc1ef4b475131bdda14a3aca4135577 (patch)
tree63e35b12c9d5b7e11c33e88cd1ab8fe04c9e11ba /src/map/magic.c
parent7e9ef4d4154caf5c982e0753e9685c04ee52d913 (diff)
downloadtmwa-c70aa417cdc1ef4b475131bdda14a3aca4135577.tar.gz
tmwa-c70aa417cdc1ef4b475131bdda14a3aca4135577.tar.bz2
tmwa-c70aa417cdc1ef4b475131bdda14a3aca4135577.tar.xz
tmwa-c70aa417cdc1ef4b475131bdda14a3aca4135577.zip
Added NONMAGIC flag to distinguish `keyword' operations (such as `marry') from regular spells (keywords don't require spellcasting ability)
Diffstat (limited to 'src/map/magic.c')
-rw-r--r--src/map/magic.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/magic.c b/src/map/magic.c
index bc25b07..5225ede 100644
--- a/src/map/magic.c
+++ b/src/map/magic.c
@@ -78,7 +78,13 @@ magic_message(character_t *caster,
if (spell) {
int near_miss;
env_t *env = spell_create_env(&magic_conf, spell, caster, power, parameter);
- effect_set_t *effects = (power < 1) ? NULL : spell_trigger(spell, caster, env, &near_miss);
+ effect_set_t *effects;
+
+ if ((spell->flags & SPELL_FLAG_NONMAGIC)
+ || (power >= 1))
+ effects = spell_trigger(spell, caster, env, &near_miss);
+ else
+ effects = NULL;
#ifdef DEBUG
fprintf(stderr, "Found spell `%s', triggered = %d\n", spell_, effects != NULL);