Mercurial > hg > early-roguelike
diff urogue/command.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 | 4573b355cdc1 |
children | c03d0b87211c |
line wrap: on
line diff
--- a/urogue/command.c Sat Mar 20 22:36:52 2021 -0400 +++ b/urogue/command.c Wed Apr 14 18:55:33 2021 -0400 @@ -33,7 +33,9 @@ static int fight_to_death; /* Flags if we are fighting to death */ static coord dir; /* Last direction specified */ +#ifdef WIZARD object *obj; +#endif char ch; int ntimes = 1; /* Number of player moves */ coord nullcoord; @@ -579,10 +581,12 @@ * If he ran into something to take, let him pick it up. */ if (take != 0) + { if (!moving) pick_up(take); else show_floor(); + } if (!running) door_stop = FALSE; } /* end while */ @@ -676,10 +680,11 @@ } } } - } + } - /* Time to enforce weapon and armor restrictions */ - if (rnd(9999) == 0) + /* Time to enforce weapon and armor restrictions */ + if (rnd(9999) == 0) + { if (((cur_weapon == NULL) || (wield_ok(&player, cur_weapon, NOMESSAGE))) && ((cur_armor == NULL) || @@ -774,6 +779,7 @@ death(death_cause); } } + } if (rnd(500000) == 0) { @@ -1038,6 +1044,7 @@ while (strp->h_ch) { if (strp->h_desc == 0) + { if (!wizard) break; else @@ -1045,6 +1052,7 @@ strp++; continue; } + } if (strp->h_ch == helpch) { @@ -1071,6 +1079,7 @@ while (strp->h_ch) { if (strp->h_desc == 0) + { if (!wizard) break; else @@ -1078,6 +1087,7 @@ strp++; continue; } + } mvwaddstr(hw, cnt % 23, cnt > 22 ? 40 : 0, unctrl(strp->h_ch)); waddstr(hw, strp->h_desc);