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

@ -159,7 +159,8 @@ do_zap(void)
rnd_pos(&rooms[rm], &tp->t_pos);
} until (winat(tp->t_pos.y, tp->t_pos.x) == FLOOR);
tp->t_room = roomin(&tp->t_pos);
tp->t_oldch = mvinch(tp->t_pos.y, tp->t_pos.x);
tp->t_oldch = mvinch(tp->t_pos.y, tp->t_pos.x) &
A_CHARTEXT;
if (see_monst(tp))
mvaddch(tp->t_pos.y, tp->t_pos.x, tp->t_disguise);
else if (on(player, SEEMONST))
@ -175,7 +176,8 @@ do_zap(void)
tp->t_pos.x = hero.x + delta.x;
if (tp->t_pos.y != y || tp->t_pos.x != x)
tp->t_oldch = mvinch(tp->t_pos.y, tp->t_pos.x);
tp->t_oldch = mvinch(tp->t_pos.y, tp->t_pos.x) &
A_CHARTEXT;
}
moat(y, x) = NULL;
moat(tp->t_pos.y, tp->t_pos.x) = tp;
@ -423,10 +425,12 @@ def:
if (!save(VS_MAGIC))
{
if ((pstats.s_hpt -= roll(6, 6)) <= 0)
{
if (start == &hero)
death('b');
else
death(moat(start->y, start->x)->t_type);
}
used = TRUE;
if (terse)
msg("the %s hits", name);