Re: not dead yet....

From: George Greer (greerga@circlemud.org)
Date: 04/12/02


On Fri, 12 Apr 2002, Edward J Glamkowski wrote:

>You'll pardon, but I haven't followed circle development in a while
>and this NOTDEADYET flag....
>
>I have a spell, energy drain, which may kill either victim or the
>caster or both or nobody.  But if neither die, I want to set them
>fighting.  Since the call to die() for ch and/or victim would happen
>before extract_char_final() is called, I assume I should test for the
>NOTDEADYET flag before setting them fighting.  Don't want dead people
>taking swings...

/*
 * Every spell that does damage comes through here.  This calculates the
 * amount of damage, adds in any modifiers, determines what the saves are,
 * tests for save and calls damage().
 *
 * -1 = dead, otherwise the amount of damage done.
 */
int mag_damage(int level, struct char_data *ch, struct char_data *victim,
                     int spellnum, int savetype)

I don't know what type of spell you have, but a similar check of the return
value might work or could be added.

--
George Greer
greerga@circlemud.org

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



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