Looks like there could be other things updating position also that have to be handled if you want them stunned in combat.
Code:
void update_pos(struct char_data *victim)
{
if ((GET_HIT(victim) > 0) && (GET_POS(victim) > POS_STUNNED))
return;
+ if(affected_by_spell(victim, SPELL_FAERIE_FIRE)) {
+ send_to_room(IN_ROOM(victim), "%s is still stunned because of faerie fire\r\n", GET_NAME(victim));
+ return;
+ }
else if (GET_HIT(victim) > 0)
GET_POS(victim) = POS_STANDING;
else if (GET_HIT(victim) <= -11)
GET_POS(victim) = POS_DEAD;
else if (GET_HIT(victim) <= -6)
GET_POS(victim) = POS_MORTALLYW;
else if (GET_HIT(victim) <= -3)
GET_POS(victim) = POS_INCAP;
else
GET_POS(victim) = POS_STUNNED;
}
There is a switch statement in damage() that provides the consciousness message, so it works at least up to there.
Code:
500H 95V 82V > um
Your pummel wastes Helm.
500H 95V 82V >
Helm parries your attack!
-> Helm is still stunned because of faerie fire
Your pierce LIQUIDATES Helm!!
-> Helm is stunned, but will probably regain consciousness again.
Your pierce slaughters Helm.
** Helm has a few scratches. **
500H 95V 82V >
Helm's crush misses you.
Helm's crush misses you.
Helm's crush misses you.
You strike a critical blow!
Your pierce ANNIHILATES Helm!
Your pierce OBLITERATES Helm!
Your pierce massacres Helm.
** Helm has a few scratches. **
after that, there is this inside of damage which could be a culprit also because stop_fighting updates position to standing...
/* stop someone from fighting if they're stunned or worse */
if (GET_POS(victim) <= POS_STUNNED && FIGHTING(victim) != NULL)
stop_fighting(victim);