Re: Spell and Skill Parser

From: ;P (siv@CYBERENET.NET)
Date: 05/03/98


> I'm thinking about writing a more functional (e.g., easier to read and more
> powerful) skill and spell parser based on command_interpreter with it's own
> setup.  This is really vague, but it's after midnight.  I was wondering if
> anybody had ideas to contribute for it which could be distributed as part
> of the patch.

i did this a while ago (made a combination spell/skill parser). i made it
so that a command (do_skill) was called by all skill commands with the
skill number as the subcommand, and cast call it with a sub command of 0.

i also set it up so that mobs could use skills and spells by passing an
extra argument that would be used as the skill percentage for that mob.
ie, 'kick $n 75' or 'cast 'fireball' $r 100' as a mob command in a
mob progs fight script would allow a mobile to use them just as if they
were a PC.

i think a combined parser is a good thing because it will cut down on
redundant code, you can group similar skills/spells together (ie, kick
goes with dam spells), and you can let NPCs become less distinguishable
from PCs

if anyone wants to see my code, drop me an email private. it's pretty
hackish (and i'm sure there's a mem leak or two :) - i REALLY need to
rewrite it), but it might give some ideas.

siv


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST