Mercurial > hg > early-roguelike
comparison rogue4/fight.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 |
comparison
equal
deleted
inserted
replaced
303:e06ebc407615 | 304:e52a8a7ad4c5 |
---|---|
135 * If a rust monster hits, you lose armor, unless | 135 * If a rust monster hits, you lose armor, unless |
136 * that armor is leather or there is a magic ring | 136 * that armor is leather or there is a magic ring |
137 */ | 137 */ |
138 if (cur_armor != NULL && cur_armor->o_ac < 9 | 138 if (cur_armor != NULL && cur_armor->o_ac < 9 |
139 && cur_armor->o_which != LEATHER) | 139 && cur_armor->o_which != LEATHER) |
140 { | |
140 if (ISWEARING(R_SUSTARM)) | 141 if (ISWEARING(R_SUSTARM)) |
141 msg("The rust vanishes instantly"); | 142 msg("The rust vanishes instantly"); |
142 else | 143 else |
143 { | 144 { |
144 cur_armor->o_ac++; | 145 cur_armor->o_ac++; |
145 if (!terse) | 146 if (!terse) |
146 msg("your armor appears to be weaker now. Oh my!"); | 147 msg("your armor appears to be weaker now. Oh my!"); |
147 else | 148 else |
148 msg("your armor weakens"); | 149 msg("your armor weakens"); |
149 } | 150 } |
151 } | |
150 when 'E': | 152 when 'E': |
151 /* | 153 /* |
152 * The gaze of the floating eye hypnotizes you | 154 * The gaze of the floating eye hypnotizes you |
153 */ | 155 */ |
154 if (on(player, ISBLIND)) | 156 if (on(player, ISBLIND)) |
165 when 'A': | 167 when 'A': |
166 /* | 168 /* |
167 * Ants have poisonous bites | 169 * Ants have poisonous bites |
168 */ | 170 */ |
169 if (!save(VS_POISON)) | 171 if (!save(VS_POISON)) |
172 { | |
170 if (!ISWEARING(R_SUSTSTR)) | 173 if (!ISWEARING(R_SUSTSTR)) |
171 { | 174 { |
172 chg_str(-1); | 175 chg_str(-1); |
173 if (!terse) | 176 if (!terse) |
174 msg("you feel a sting in your arm and now feel weaker"); | 177 msg("you feel a sting in your arm and now feel weaker"); |
175 else | 178 else |
176 msg("a sting has weakened you"); | 179 msg("a sting has weakened you"); |
177 } | 180 } |
178 else | 181 else |
182 { | |
179 if (!terse) | 183 if (!terse) |
180 msg("a sting momentarily weakens you"); | 184 msg("a sting momentarily weakens you"); |
181 else | 185 else |
182 msg("sting has no effect"); | 186 msg("sting has no effect"); |
187 } | |
188 } | |
183 when 'W': | 189 when 'W': |
184 case 'V': | 190 case 'V': |
185 /* | 191 /* |
186 * Wraiths might drain energy levels, and Vampires | 192 * Wraiths might drain energy levels, and Vampires |
187 * can steal max_hp | 193 * can steal max_hp |