Mercurial > hg > early-roguelike
comparison urogue/newlvl.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 | 13b482bd9e66 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 303:e06ebc407615 | 304:e52a8a7ad4c5 | 
|---|---|
| 262 | 262 | 
| 263 if (rnd(3) == 0) | 263 if (rnd(3) == 0) | 
| 264 turn_off(player, BLESSMAP); | 264 turn_off(player, BLESSMAP); | 
| 265 } | 265 } | 
| 266 | 266 | 
| 267 if (player.t_ctype == C_THIEF || on(player, BLESSGOLD) && rnd(5) == 0) | 267 if (player.t_ctype == C_THIEF || (on(player, BLESSGOLD) && rnd(5) == 0)) | 
| 268 { | 268 { | 
| 269 read_scroll(&player, S_GFIND, ISNORMAL); | 269 read_scroll(&player, S_GFIND, ISNORMAL); | 
| 270 | 270 | 
| 271 if (rnd(3) == 0) | 271 if (rnd(3) == 0) | 
| 272 turn_off(player, BLESSGOLD); | 272 turn_off(player, BLESSGOLD); | 
| 273 } | 273 } | 
| 274 | 274 | 
| 275 if (player.t_ctype == C_RANGER || on(player, BLESSFOOD) && rnd(5) == 0) | 275 if (player.t_ctype == C_RANGER || | 
| 276 (on(player, BLESSFOOD) && rnd(5) == 0)) | |
| 276 { | 277 { | 
| 277 read_scroll(&player, S_FOODDET, ISNORMAL); | 278 read_scroll(&player, S_FOODDET, ISNORMAL); | 
| 278 | 279 | 
| 279 if (rnd(3) == 0) | 280 if (rnd(3) == 0) | 
| 280 turn_off(player, BLESSFOOD); | 281 turn_off(player, BLESSFOOD); | 
| 281 } | 282 } | 
| 282 | 283 | 
| 283 if (player.t_ctype == C_MAGICIAN || player.t_ctype == C_ILLUSION || | 284 if (player.t_ctype == C_MAGICIAN || player.t_ctype == C_ILLUSION || | 
| 284 on(player, BLESSMAGIC) && rnd(5) == 0) | 285 (on(player, BLESSMAGIC) && rnd(5) == 0)) | 
| 285 { | 286 { | 
| 286 quaff(&player, P_TREASDET, ISNORMAL); | 287 quaff(&player, P_TREASDET, ISNORMAL); | 
| 287 | 288 | 
| 288 if (rnd(3) == 0) | 289 if (rnd(3) == 0) | 
| 289 turn_off(player, BLESSMAGIC); | 290 turn_off(player, BLESSMAGIC); | 
| 290 } | 291 } | 
| 291 | 292 | 
| 292 if (player.t_ctype == C_DRUID || on(player, BLESSMONS) && rnd(5) == 0) | 293 if (player.t_ctype == C_DRUID || (on(player, BLESSMONS) && rnd(5) == 0)) | 
| 293 { | 294 { | 
| 294 quaff(&player, P_MONSTDET, ISNORMAL); | 295 quaff(&player, P_MONSTDET, ISNORMAL); | 
| 295 | 296 | 
| 296 if (rnd(3) == 0) | 297 if (rnd(3) == 0) | 
| 297 turn_off(player, BLESSMONS); | 298 turn_off(player, BLESSMONS); | 
| 303 | 304 | 
| 304 if (is_wearing(R_AGGR)) | 305 if (is_wearing(R_AGGR)) | 
| 305 aggravate(); | 306 aggravate(); | 
| 306 | 307 | 
| 307 if (is_wearing(R_ADORNMENT) || | 308 if (is_wearing(R_ADORNMENT) || | 
| 308 cur_armor != NULL && cur_armor->o_which == MITHRIL) | 309 (cur_armor != NULL && cur_armor->o_which == MITHRIL)) | 
| 309 { | 310 { | 
| 310 int greed = FALSE; | 311 int greed = FALSE; | 
| 311 | 312 | 
| 312 for (item = mlist; item != NULL; item = next(item)) | 313 for (item = mlist; item != NULL; item = next(item)) | 
| 313 { | 314 { | 
