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.
This commit is contained in:
John "Elwin" Edwards 2021-04-14 18:55:33 -04:00
parent 6f21b5b88a
commit 6c3cd116ff
122 changed files with 374 additions and 280 deletions

View file

@ -222,7 +222,7 @@ do_move(int dy, int dx)
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 @@ be_trapped(struct thing *th, coord tc)
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 @@ be_trapped(struct thing *th, coord tc)
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 @@ be_trapped(struct thing *th, coord tc)
killed(NULL, mitem, NOMESSAGE, NOPOINTS);
}
}
}
}
else