Re: 2 Spells a round.

From: Lubos Lunak (l.lunak@SH.CVUT.CZ)
Date: 06/09/98


Pheonix Shadowflame wrote:

> I want to give an ability to cast 2 spells around to some classes on
> my mud but I can't find where it makes it so you have to wait 1 combat
> round after casting a spell. then I can make it wait 1/2 combat round.
> Any ideas where it might be? or if making it wait 1/2 fighting pulse
> wouldn't work what should I do?
>
> Pheonix Shadowflame

spell_parser.c : do_cast() :

  } else { /* cast spell returns 1 on success; subtract mana & set
waitstate */
    if (cast_spell(ch, tch, tobj, spellnum)) {
      WAIT_STATE(ch, PULSE_VIOLENCE);
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      if (mana > 0)
 GET_MANA(ch) = MAX(0, MIN(GET_MAX_MANA(ch), GET_MANA(ch) - mana));
    }

There are 5 more WAIT_STATE() in spell_parser.c, one for failing the spell
and 4 for wands, scrolls,
 staves and potions. Changing that should be enough, and it should work.
Moreover, if you want to set the wait_state depending on the spell ( in
call_magic(), mag_damage() or
 wherever you want ), move that WAIT_STATE() before calling cast_spell(),
otherwise it will set
 the waitstate regardless of the value it was set before ( look at the
WAIT_STATE() macro ).

L.Lunak
l.lunak@sh.cvut.cz


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