Re: [CODE]Your opinion on new spell method

From: Mike Stilson (mike@velgarian.sytes.net)
Date: 12/08/01


On Sat, Dec 08, 2001 at 10:22:06AM -0600, Cyberlord wrote:
>I'm still going my route, even though basically the only difference between
>your way and mine is, I'm checking the room for targets every time the spell
>fires and comparing the current target to a stored list of victims who have
>already been hit. That way players/mobs can come and go in between the
>"hops" and shouldn't cause to many problems. The only concern I have now is
>if one of the stored victims dies, will my checking routine crash?

Mine just checks the list as it's about to hop from char to char.
That sounds like an added layer of complexity, maintaining the other
list, have to remove from it when characters move, die, quit, recall, or
whatever, then make sure the counters are adjusted accordingly.

My li'l snippet isn't 100% complete yet, there's a few things left to
account for, and I wanna change how I build the target list, but it
seems maintaining the target list directly rather than by referencing
another array/structure/whatever is a bit simpler.


>Just out of curousity, why did you choose to call your spell every pulse
>violence/2?

Why not?  Lightning does move pretty quick.  Besides, I'm not a big fan
of everything happening in rounds/ticks/pulses/etc, and that just throws
another slightly random factor into the mix for players to deal with.


>I actually call my spell checking routine(we're going to have more spells
>that act like this) every round and use a counter (stored in the spell
>structure) to determine if the spell is ready to go again. This way we can
>have multiple time delay or damage per round (or what ever we can dream up)
>type spells going on at the same time.

That's fine if you rewrite how things are done, but for me, rather than
almost reinventing the wheel it seemed just as easy to fire it off as
another event.   It can almost be made into a template for similar spell
events, just by changing a couple variable names, and the actual
damage/whatever function, for example, my group recall spell works VERY
similarly (just much faster), and is different by about 6 lines of code.

>Tim
-mike

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/24/03 PDT