diff urogue/move.c @ 304:e52a8a7ad4c5

Fix many compiler warnings. There should only be two changes in behavior: arogue7/fight.c, arogue7/fight.c: a to-hit bonus is now correctly applied to characters who are not monks instead of monks who are not empty-handed. urogue/fight.c: fixed an interaction with the "debug" macro that could cause the wrong message to be displayed.
author John "Elwin" Edwards
date Wed, 14 Apr 2021 18:55:33 -0400
parents c495a4f288c6
children
line wrap: on
line diff
--- a/urogue/move.c	Sat Mar 20 22:36:52 2021 -0400
+++ b/urogue/move.c	Wed Apr 14 18:55:33 2021 -0400
@@ -222,7 +222,7 @@
 
     if ((rnd(100) < 80 && on(player, ISHUH)) ||
         (is_wearing(R_DELUSION) && rnd(100) < 25) ||
-        on(player, STUMBLER) && rnd(40) == 0)
+        (on(player, STUMBLER) && rnd(40) == 0))
         player.t_nxtpos = rndmove(&player);
     else
     {
@@ -768,10 +768,10 @@
         if (((is_wearing(R_LEVITATION) || on(player, CANFLY)) &&
             (ch != FIRETRAP ||
                  (ch == FIRETRAP && !(tp->tr_flags & ISFOUND))))
-            || (moving && (tp->tr_flags & ISFOUND) && rnd(100) <
+            || ((moving && (tp->tr_flags & ISFOUND) && rnd(100) <
               thief_bonus + 2 * pstats.s_dext + 5 * pstats.s_lvl) &&
             (ch == BEARTRAP || ch == MAZETRAP || ch == TRAPDOOR
-             || ch == ARROWTRAP || ch == DARTTRAP))
+             || ch == ARROWTRAP || ch == DARTTRAP)))
         {
             static char trname[1024];
             msg(tr_name(ch,trname));
@@ -1070,6 +1070,7 @@
                         th->t_stats.s_hpt -= roll(1, 4);
 
                     if (orig_hp == th->t_stats.s_hpt)
+                    {
                         if (can_see)
                             msg("The dart has not effect!");
                         else if (th->t_stats.s_hpt < 0)
@@ -1082,6 +1083,7 @@
 
                             killed(NULL, mitem, NOMESSAGE, NOPOINTS);
                         }
+                    }
                 }
             }
             else