[CODE][SKILL][SNIPPET][HELP] Feign Death skill, possible?

From: Lethal Access (lethalaccess@DEATHSDOOR.COM)
Date: 03/17/98


I have been wondering if perhaps it might be possible to implement the
skill feign death.

What the skill should do is do the death cry thing, stop the fighting
and etc. except
of course the corpse wont be there and there won't be any exp gain or
loss.

Lets pretend I've setup all the other settings for whatever has to be
done for this
skill.

Before the actual check to see if the person is dead, I'd add in this
snippet....

 /*  Feign Death SKILL code...
  *  In fight.c damage()      **WARNING Code has not been tested!
  */
if ((GET_POS(victim) == POS_DEAD) && (!(IS_NPC(victim))) && (number(0,
101) < GET_SKILL(victim, SKILL_FEIGN_DEATH)))
{

    if (MOB_FLAGGED(ch, MOB_MEMORY))
    {
        forget(ch, victim);
    }
    if (FIGHTING(ch))
    {
        stop_fighting(ch);
    }
    if (FIGHTING(victim))
    {
        stop_fighting(victim);
    }

    if (CAN_GO(victim, attempt) && !IS_SET(ROOM_FLAGS(EXIT(victim,
attempt)->to_room),  ROOM_DEATH))
    {
        GET_HIT(victim) = 1;
        death_cry(victim);

        attempt = number(0, NUM_OF_DIRS - 1);

        was_in = victim->in_room;
        char_from_room(victim);
        char_to_room(victim, world[was_in].dir_option[dir]->to_room);
        send_to_char("You successfully feigned your death!!!!\r\n",
victim);
        return;
    }

    send_to_char("You were unable to successfully feign your
death!\r\n", victim);

}
I would guess that if the person failed in their skill, or were unable
to "flee" into another
direction, that this would just lead onto the real check for POS_DEAD.

What other checks should I use? Is there some other way I should
structure the if statements?


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