summaryrefslogtreecommitdiff
path: root/src/map/magic-interpreter-parser.y
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-interpreter-parser.y
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-interpreter-parser.y')
-rw-r--r--src/map/magic-interpreter-parser.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/magic-interpreter-parser.y b/src/map/magic-interpreter-parser.y
index 6d310bd..bae6844 100644
--- a/src/map/magic-interpreter-parser.y
+++ b/src/map/magic-interpreter-parser.y
@@ -119,6 +119,7 @@ find_constant(char *name);
%token CALL
%token SILENT
%token LOCAL
+%token NONMAGIC
%token SHL
%token SHR
%token EQ
@@ -291,6 +292,11 @@ spell_flags : /* empty */
fail(@1.first_line, @1.first_column, "`LOCAL' specified more than once");
$$ = $2 | SPELL_FLAG_LOCAL;
}
+ | NONMAGIC spell_flags
+ { if ($2 & SPELL_FLAG_NONMAGIC)
+ fail(@1.first_line, @1.first_column, "`NONMAGIC' specified more than once");
+ $$ = $2 | SPELL_FLAG_NONMAGIC;
+ }
| SILENT spell_flags
{ if ($2 & SPELL_FLAG_SILENT)
fail(@1.first_line, @1.first_column, "`SILENT' specified more than once");