Re: [CODE]Your opinion on new spell method

From: Cyberlord (
Date: 12/08/01

----- Original Message -----
From: "Daniel A. Koepke" <dkoepke@CIRCLEMUD.ORG>
To: <>
Sent: Saturday, December 08, 2001 3:33 PM
Subject: Re: [CIRCLE] [CODE]Your opinion on new spell method

> - It's 8 bytes overhead for each character in the game.  (4 for the
> pointer to the head of the list, 4 for the pointer to the next in the
> list.  Assuming 32 bit addressing, of course.)  I don't view that as
> significant overhead if it's necessary to achieve the desired results.


> - You do have to make a decision about what happens with extracted players
> in the hit list using your method.  The dangling pointers could cause you
> problems.  Players don't like intermittent crashes any more than
> implementors do.

Yes, this is where I am lacking at the moment, and will have to imlement
something here to check on this.

> - My view is that the spell terminates when there's no more targets, the
> caster manually stops the spell, or the caster runs out of mana (since, in
> my view, there's more than just an initial mana cost to such a potentially
> powerful spell).

Close. :) But the possibilities are limitless here. I like your idea of
reducing mana per round (mind if I steal it?) and our version of the spell
stops when 1) out of targets, or 2) the max number of targets has been hit
(depends on the level of the caster).

> - What happens if the same person gets hit by chain lightning from two
> different sources?  Is it not possible for two people to call down chain
> lightning at the same time in the same vicinity, or is the person spared?
> Your scheme doesn't allow for multiple ->next_hit pointers, as far as I
> can tell, so a person can only belong to a single hit list at once.
> Assuming this compromise is intended or acceptable, there are possibly
> better ways to handle this.

In our mud, for every spell of this type I keep in a list. Each different
cast of the spell is handled as a different spell. Each has it's own unique
list of everything, from room cast in, who cast it, and the victims who have
been hit. So this is taken care of. :)

> - A possibility: couldn't you just set an effect to indicate the person
> has been struck?  You could make it internally consistent by simply saying
> that being struck increased their electric potential, not allowing a path
> for current to flow.  Expire the effect after the chain lightning has
> terminated (or maybe leave it on for a while, but the danger here is that
> it expires before the spell has completed and the person gets hit again).

For some reason setting bits didn't cross my mind here, and that *would*
affect if a person could/could not get hit by another "C L" spell. I do want
to be able to hit people once with each spell.

> The only concern is that for each pulse of the chain lightning, you're
> going to be going through the world[ch->in_room].people list from the
> beginning until you find a matching target.  Fortunately, the pulses are
> some time apart, there usually aren't that many people in a single room,
> and the iteration is fast.  This achieves the desired result of people
> being able to enter and leave during the spell.

True, and also to this methods defense, not every mage will have the ability
to cast this spell. Some mages may never get it. :) But there will be other
rare spells like this too.

> - ...but if people can leave, won't they all just run away before they can
> be caught up?  Or will they simply not know what's happening until it's
> too late.  (Then again, that only means the first two or three won't know,
> but the fourth and beyond would have to be stupid to not connect the dots
> and realize chain lightning is heading their way.)

Well, yeah... I would hope they are smart enough to do that. The people not
in combat can leave easy enough (will take some time to figure out whats
going on at first) and since this is a *rare* spell that makes it even
better. People in combat tho will have to try to flee or leave another way.

My reasoning behind this is, I want the players to have time to think and
react to the situation. I think chain lightning is not as fast as lightning
bolt or call lightning anyway. Also I'm going by the book, one target per
round, but had to balance the power to match our levels. Still doing some
ironing in that area too. :)

 I might even put in code for the mobs that are not fighting to have a
chance at excaping the room too. Who knows. :)

I can't wait to allow a high level mage mob access to this spell and watch
the fireworks! *cackle* or should that be *crackle* :)


   | FAQ: |
   | Archives: |

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