Re: OBcircle slaying

From: Rob Baumstark (shirak@CONNECT.AB.CA)
Date: 04/27/98


>I am trying to avoid ITEM_OGRE_SLAYING because i have > 32 mob races.  I am
>having them come in as applies.  Kinda like APPLY_DAMAGE. (option F in
Oasis
>OLC).  Then add a special menu to the OLC to list the races.  The part that
>worries me is how to quickly check this.  There is going to be a % chance
to
>slay, but very few weapons should be slaying (I am just going to have the
weapon
>do 4x damage, not really slay (slay is WAY too powerful)).  My problem is
that
>there is a MAX of 6 applies, and I don't want to run through this list
EVERY
>time I hit with a weapon. It is just 12 little if checks, but that can be a
lot,
>especially burried in the fight code, which you want to keep as tight as
>possible.  Hmm, anyone think of a quicker way then this:
A not too hard way to do it would be to modify your OLC a bit to re-organize
the applies when it saves them.  If the SLAY apply was either always first,
or not there, then there would only be one check (which you have to have
anyway).  If you have mutliple SLAY applies on the same weapon (for multiple
reaces or whatever), then you only have to do as many checks as there are
applies, and you can stop checking the moment a non-slay apply is found, or
a slay that applies to the target is found.
It might make your OLC a bit slower (not a problem), but allows you too add
it without adding any new variables to the structure.  If you do do it this
way, put lots of comments in the area, so another coder will know they are
(should be) in order, and how to use them.

------------------------------------------------------------
G:  "If we do happen to step on a mine, Sir, what do we do?"
EB: "Normal procedure, Lieutenant, is to jump 200 feet in
     the air and scatter oneself over a wide area."
-- Somewhere in No Man's Land, BA4
------------------------------------------------------------
     Rob Baumstark:   shirak@connect.ab.ca
                      cst0656@nait.ab.ca
------------------------------------------------------------


     +------------------------------------------------------------+
     | 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