Now, in an Enchanter-type spellcasting system there are
three kinds of result you can get from CAST [SPELL]. There's the "That's
so obviously stupid/counterproductive that I'm not even going to let you do that" message,
the "You cast the spell but it doesn't do anything" message, and
the "You cast the spell and it does something" message, which is the only message that changes game state (the other two are only good for funny messages). Note that in the first
case you didn't actually cast the spell; but the example Inform magic system
will remove the spell from your memory as though you actually had
cast it. In Inform terms, what I added was sort of a 'before' rule for spells (there's
a before rule in the example code, but you forget the spell before it's
called so it can't do this).
Mon Apr 29 2002 20:02:
I've got spellcasting working in my game. Another big improvement of
my system over the example one that comes with Inform is that saying CAST [SPELL]
doesn't automatically remove that spell from your memory.