comparison rogue4/pack.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 1b73a8641b37
children
comparison
equal deleted inserted replaced
303:e06ebc407615 304:e52a8a7ad4c5
100 } 100 }
101 /* 101 /*
102 * Check for and deal with scare monster scrolls 102 * Check for and deal with scare monster scrolls
103 */ 103 */
104 if (obj->o_type == SCROLL && obj->o_which == S_SCARE) 104 if (obj->o_type == SCROLL && obj->o_which == S_SCARE)
105 {
105 if (obj->o_flags & ISFOUND) 106 if (obj->o_flags & ISFOUND)
106 { 107 {
107 detach(lvl_obj, obj); 108 detach(lvl_obj, obj);
108 mvaddch(hero.y, hero.x, floor); 109 mvaddch(hero.y, hero.x, floor);
109 chat(hero.y, hero.x) = floor; 110 chat(hero.y, hero.x) = floor;
110 msg("the scroll turns to dust as you pick it up"); 111 msg("the scroll turns to dust as you pick it up");
111 return; 112 return;
112 } 113 }
113 else 114 else
114 obj->o_flags |= ISFOUND; 115 obj->o_flags |= ISFOUND;
116 }
115 117
116 inpack++; 118 inpack++;
117 if (from_floor) 119 if (from_floor)
118 { 120 {
119 detach(lvl_obj, obj); 121 detach(lvl_obj, obj);
254 * Add something to characters pack. 256 * Add something to characters pack.
255 */ 257 */
256 void 258 void
257 pick_up(char ch) 259 pick_up(char ch)
258 { 260 {
259 register THING *obj, *mp; 261 register THING *obj;
260 262
261 switch (ch) 263 switch (ch)
262 { 264 {
263 case GOLD: 265 case GOLD:
264 if ((obj = find_obj(hero.y, hero.x)) == NULL) 266 if ((obj = find_obj(hero.y, hero.x)) == NULL)