From c70aa417cdc1ef4b475131bdda14a3aca4135577 Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 22 Nov 2008 01:15:44 -0700 Subject: Added NONMAGIC flag to distinguish `keyword' operations (such as `marry') from regular spells (keywords don't require spellcasting ability) --- src/map/magic-interpreter-parser.y | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/map/magic-interpreter-parser.y') 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"); -- cgit v1.2.3-60-g2f50