comparison srogue/monsters.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 e7aab31362af
children 28e22fb35989
comparison
equal deleted inserted replaced
303:e06ebc407615 304:e52a8a7ad4c5
100 mp = &monsters[type]; /* point to this monsters structure */ 100 mp = &monsters[type]; /* point to this monsters structure */
101 tp->t_type = mp->m_show; 101 tp->t_type = mp->m_show;
102 tp->t_indx = type; 102 tp->t_indx = type;
103 tp->t_pos = *cp; 103 tp->t_pos = *cp;
104 tp->t_room = roomin(cp); 104 tp->t_room = roomin(cp);
105 tp->t_oldch = mvwinch(cw, cp->y, cp->x); 105 tp->t_oldch = mvwinch(cw, cp->y, cp->x) & A_CHARTEXT;
106 tp->t_nomove = 0; 106 tp->t_nomove = 0;
107 tp->t_nocmd = 0; 107 tp->t_nocmd = 0;
108 mvwaddch(mw, cp->y, cp->x, tp->t_type); 108 mvwaddch(mw, cp->y, cp->x, tp->t_type);
109 109
110 /* 110 /*
259 } 259 }
260 /* 260 /*
261 * Hide invisible monsters 261 * Hide invisible monsters
262 */ 262 */
263 if ((tp->t_flags & ISINVIS) && pl_off(CANSEE)) 263 if ((tp->t_flags & ISINVIS) && pl_off(CANSEE))
264 ch = mvinch(y, x); 264 ch = mvinch(y, x) & A_CHARTEXT;
265 /* 265 /*
266 * Let greedy ones guard gold 266 * Let greedy ones guard gold
267 */ 267 */
268 if (on(*tp, ISGREED) && off(*tp, ISRUN)) { 268 if (on(*tp, ISGREED) && off(*tp, ISRUN)) {
269 if (rp != NULL && rp->r_goldval) { 269 if (rp != NULL && rp->r_goldval) {
282 genocide(void) 282 genocide(void)
283 { 283 {
284 reg struct linked_list *ip, *nip; 284 reg struct linked_list *ip, *nip;
285 reg struct thing *mp; 285 reg struct thing *mp;
286 struct monster *mm; 286 struct monster *mm;
287 reg int i, ii, c; 287 reg int i, c;
288 288
289 if (levcount == 0) { 289 if (levcount == 0) {
290 mpos = 0; 290 mpos = 0;
291 msg("You cannot genocide Asmodeus !!"); 291 msg("You cannot genocide Asmodeus !!");
292 return; 292 return;