diff options
author | Fate <fate-tmw@googlemail.com> | 2008-11-24 12:41:04 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-11-24 12:41:04 -0700 |
commit | 8c2b0f2729f29f3906a75e2fba72d2dad4a80ee2 (patch) | |
tree | 49ec1cec95b6e6a4cfdaeda49b42afb140ac825d /src/map/magic-interpreter-parser.y | |
parent | 5bb68970dece3052f5bf82d53bec8c6eeac60e15 (diff) | |
download | tmwa-8c2b0f2729f29f3906a75e2fba72d2dad4a80ee2.tar.gz tmwa-8c2b0f2729f29f3906a75e2fba72d2dad4a80ee2.tar.bz2 tmwa-8c2b0f2729f29f3906a75e2fba72d2dad4a80ee2.tar.xz tmwa-8c2b0f2729f29f3906a75e2fba72d2dad4a80ee2.zip |
Added spell_index and is_equipped operations, permitted coercions from invocations to strings
Diffstat (limited to 'src/map/magic-interpreter-parser.y')
-rw-r--r-- | src/map/magic-interpreter-parser.y | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/magic-interpreter-parser.y b/src/map/magic-interpreter-parser.y index a8f7168..deb686d 100644 --- a/src/map/magic-interpreter-parser.y +++ b/src/map/magic-interpreter-parser.y @@ -821,7 +821,10 @@ fun_expr(char *name, int args_nr, expr_t **args, int line, int column) static spell_t * new_spell(spellguard_t *guard) { + static int spell_counter = 0; + spell_t *retval = calloc(1, sizeof(spell_t)); + retval->index = ++spell_counter; retval->spellguard = guard; return retval; } |