Re: a bug?? - The Fix

From: R. Engur Pisirici (advise26@rorqual.cc.metu.edu.tr)
Date: 09/02/95


 Hi guys,
 I think this code has a bug too.
 Becase,
   In do_flee , there is an exp calculation for flee.So if you change 
like those, then you skip this calculation,

      bye.......

					R. Engur Pisirici

On Sat, 2 Sep 1995, Katzlberger Thomas wrote:

> 
> Hi,
> 
> Here we go ...
> 
>   for (i = 0; i < 6; i++) {
>     attempt = number(0, NUM_OF_DIRS - 1);	/* Select a random  
> direction */
>     if (CAN_GO(ch, attempt) &&
> 	!IS_SET(ROOM_FLAGS(EXIT(ch, attempt)->to_room), ROOM_DEATH)) {
>       act("$n panics, and attempts to flee!", TRUE, ch, 0, 0, TO_ROOM);
>       if (do_simple_move(ch, attempt, TRUE)) {
> 	send_to_char("You flee head over heels.\r\n", ch);
> 	if (FIGHTING(ch)) {
> 	^^^^^^^^^^^^^^^^^^^
> 	BUG BUG BUG BUG BUG
> 
> because do_simple_move will stop_fighting if ch and his
> fighting-partner are no longer in the same room.
> 
> I removed it but inserted at the beginning of the function:
> 
> ACMD(do_flee)
> {
> 	int       i, attempt, loss, hit, level;
> 
> 	if (!FIGHTING(ch))
> 	{
> 		act("$n panics but nobody knows why!", TRUE, ch, 0,  
> 0, TO_ROOM);
> 		send_to_char("Easy! Easy! Don't panic, nobody is  
> fighting you.\r\n", ch);
> 		return;
> 	}
> 
> Cat@NoMUD.
> 
> 
> 



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