Re: Multiple Hit Spells

From: Patrick Dughi (dughi@imaxx.net)
Date: 05/02/00


> Hmm, immolation is an interesting thought, but basically what I'm looking for
> is an all in one round sort of thing.  A spell like fireball, but it can hit
> up to say 3 times per casting, all in the same combat round.  I'm thinking
> that I can just add it in the damage routine near where sanctuary is?  Still
> working the bugs out on that but I was thinking someone else probably had a
> vastly superior method?
>

Here's what I recommend.
        First, make a working copy of a fireball spell (don't forget your
messages file).  Call it 'multiball'. Doesn't matter really what you call
it of course.

        Now, go into mag_damage in magic.c.  Up at the top where you have
your variable declaration, add an int - call it balls. (int balls). Locate
the case for your spell (hint, fireballs is "case SPELL_FIREBALL:").

        Then, determine how many balls you want to fire : balls=dice(1,3)
or balls=GET_LEVEL(ch)/10 + 1; etc.. add that line right under the case
line.
        Now, we'll slip two extra lines in right under that.  Something
like
        sprintf(buf,"A stream of %d fireballs strike $N.",balls);
        act(buf,FALSE,ch,0,victim,TO_ROOM);
                (you can add more act's as necessary)

        Then, below, where it calculates damage, something like

        dam=dice(11,8)+11;

        change it to something like

        for(;balls >0;balls--) {
          dam=dice(11,8)+11;
        }

        And you're done.

        In fact, you won't hit them multiple times, but it will have the
same end effect.  This is better for a zillion reasons, first and foremost
being you're avoiding messy checking if you're trying to kill a corpse,
and the like.  Second, no one wants to see 3-4-5 identical "You have been
hit by a fireball" messages.  It's spammy.  You've probably already added
the ability to strike 12 times, an average combat round probably scrolls
off the screen.  Third, it's easy, and it works within the existing
mechanism.  You get the idea.

                                                        PjD


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT