comparison arogue5/monsters.c @ 311:28e22fb35989

Fix one more batch of compiler warnings. A few of these were potential bugs.
author John "Elwin" Edwards
date Tue, 04 May 2021 21:03:47 -0400
parents e52a8a7ad4c5
children
comparison
equal deleted inserted replaced
310:827441d05b3e 311:28e22fb35989
768 } 768 }
769 769
770 /* 770 /*
771 * Every time he sees mean monster, it might start chasing him 771 * Every time he sees mean monster, it might start chasing him
772 */ 772 */
773 if (on(*tp, ISMEAN) && 773 if ((on(*tp, ISMEAN) &&
774 off(*tp, ISHELD) && 774 off(*tp, ISHELD) &&
775 off(*tp, ISRUN) && 775 off(*tp, ISRUN) &&
776 rnd(100) > 33 && 776 rnd(100) > 33 &&
777 (!is_stealth(&player) || (on(*tp, ISUNIQUE) && rnd(100) > 95)) && 777 (!is_stealth(&player) || (on(*tp, ISUNIQUE) && rnd(100) > 95)) &&
778 (off(player, ISINVIS) || on(*tp, CANSEE)) || 778 (off(player, ISINVIS) || on(*tp, CANSEE))) ||
779 (trp != NULL && (trp->r_flags & ISTREAS))) { 779 (trp != NULL && (trp->r_flags & ISTREAS))) {
780 tp->t_dest = &hero; 780 tp->t_dest = &hero;
781 turn_on(*tp, ISRUN); 781 turn_on(*tp, ISRUN);
782 turn_off(*tp, ISDISGUISE); 782 turn_off(*tp, ISDISGUISE);
783 } 783 }