Re: [code] [question] [newbie] Mob Attacks

From: Count Zero (count.zero@panacom.com)
Date: 03/02/97


Ok.. got this to work, pretty much stock, by defining

struct char_data *vict;

in the header of perform_violence...

>   for (vict = world[ch->in_room].people; vict; vict = vict->next_in_room)
>     if (FIGHTING(vict) == ch && !number(0, 4))
>       break;
>   if (!vict)
>     vict = FIGHTING(ch);
> 
> That scans the room and picks someone fighting the mob at random to
> attack.


but I notice that it seems to be random with a HEAVY bent towards whomever
the mob is currently attacking...  ie: in a test with two combatants the
mob only hit the non-leader once out of 6 rounds... or so... and this seems
to be the standard over several fights...   not sure exacaly how to fix or
change that.. or if there is even anything to fix... (Maybe it is picking
truely at random and just happens to pick the same char 5 out of 6 times
(there were only two characters attacking the mob...) hehe)

Thanks for the info... and any suggestions on improving this further are
welcome... 

-Count Zero-





+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
|    Or send 'info circle' to majordomo@cspo.queensu.ca     |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST