Weird.
The related code is in act.offensive.c. Maybe the command is looking at the wrong list or something.
Code:
EVENTFUNC(event_whirlwind)
{
struct char_data *ch, *tch;
struct mud_event_data *pMudEvent;
struct list_data *room_list;
int count;
/* This is just a dummy check, but we'll do it anyway */
if (event_obj == NULL)
return 0;
/* For the sake of simplicity, we will place the event data in easily
* referenced pointers */
pMudEvent = (struct mud_event_data *) event_obj;
ch = (struct char_data *) pMudEvent->pStruct;
/* When using a list, we have to make sure to allocate the list as it
* uses dynamic memory */
room_list = create_list();
/* We search through the "next_in_room", and grab all NPCs and add them
* to our list */
for (tch = world[IN_ROOM(ch)].people; tch; tch = tch->next_in_room)
if (IS_NPC(tch))
add_to_list(tch, room_list);
/* If our list is empty or has "0" entries, we free it from memory and
* close off our event */
if (room_list->iSize == 0) {
free_list(room_list);
send_to_char(ch, "There is no one in the room to whirlwind!\r\n");
return 0;
}
/* We spit out some ugly colour, making use of the new colour options,
* to let the player know they are performing their whirlwind strike */
send_to_char(ch, "\t[f313]You deliver a vicious \t[f014]\t[b451]WHIRLWIND!!!\tn\r\n");
/* Lets grab some a random NPC from the list, and hit() them up */
for (count = dice(1, 4); count > 0; count--) {
tch = random_from_list(room_list);
hit(ch, tch, TYPE_UNDEFINED);
}
/* Now that our attack is done, let's free out list */
free_list(room_list);
/* The "return" of the event function is the time until the event is called
* again. If we return 0, then the event is freed and removed from the list, but
* any other numerical response will be the delay until the next call */
if (GET_SKILL(ch, SKILL_WHIRLWIND) < rand_number(1, 101)) {
send_to_char(ch, "You stop spinning.\r\n");
return 0;
} else
return 1.5 * PASSES_PER_SEC;
}