| 1154 | } |
| 1155 | |
| 1156 | staticfn void |
| 1157 | break_armor(void) |
| 1158 | { |
| 1159 | struct obj *otmp; |
| 1160 | struct permonst *uptr = gy.youmonst.data; |
| 1161 | |
| 1162 | if (breakarm(uptr)) { |
| 1163 | if ((otmp = uarm) != 0) { |
| 1164 | if (donning(otmp)) |
| 1165 | cancel_don(); |
| 1166 | /* for gold DSM, we don't want Armor_gone() to report that it |
| 1167 | stops shining _after_ we've been told that it is destroyed */ |
| 1168 | if (otmp->lamplit) |
| 1169 | end_burn(otmp, FALSE); |
| 1170 | |
| 1171 | You("break out of your armor!"); |
| 1172 | exercise(A_STR, FALSE); |
| 1173 | (void) Armor_gone(); |
| 1174 | useup(otmp); |
| 1175 | } |
| 1176 | if ((otmp = uarmc) != 0 |
| 1177 | /* mummy wrapping adapts to small and very big sizes */ |
| 1178 | && (otmp->otyp != MUMMY_WRAPPING || !WrappingAllowed(uptr))) { |
| 1179 | if (otmp->otyp == MUMMY_WRAPPING) { |
| 1180 | /* doesn't have a clasp to break open */ |
| 1181 | Your("%s tears apart!", cloak_simple_name(otmp)); |
| 1182 | (void) Cloak_off(); |
| 1183 | useup(otmp); |
| 1184 | } else if (otmp->otyp == ALCHEMY_SMOCK) { |
| 1185 | pline_The("knot on your %s is pulled apart!", cloak_simple_name(otmp)); |
| 1186 | (void) Cloak_off(); |
| 1187 | dropp(otmp); |
| 1188 | } else { |
| 1189 | pline_The("clasp on your %s breaks open!", cloak_simple_name(otmp)); |
| 1190 | (void) Cloak_off(); |
| 1191 | dropp(otmp); |
| 1192 | } |
| 1193 | } |
| 1194 | if (uarmu) { |
| 1195 | Your("shirt rips to shreds!"); |
| 1196 | useup(uarmu); |
| 1197 | } |
| 1198 | } else if (sliparm(uptr)) { |
| 1199 | if ((otmp = uarm) != 0 && racial_exception(&gy.youmonst, otmp) < 1) { |
| 1200 | if (donning(otmp)) |
| 1201 | cancel_don(); |
| 1202 | Your("armor falls around you!"); |
| 1203 | /* [note: _gone() instead of _off() dates to when life-saving |
| 1204 | could force fire resisting armor back on if hero burned in |
| 1205 | hell (3.0, predating Gehennom); the armor isn't actually |
| 1206 | gone here but also isn't available to be put back on] */ |
| 1207 | (void) Armor_gone(); |
| 1208 | dropp(otmp); |
| 1209 | } |
| 1210 | if ((otmp = uarmc) != 0 |
| 1211 | /* mummy wrapping adapts to small and very big sizes */ |
| 1212 | && (otmp->otyp != MUMMY_WRAPPING || !WrappingAllowed(uptr))) { |
| 1213 | if (is_whirly(uptr)) |
no test coverage detected