strength gain */
| 200 | |
| 201 | /* strength gain */ |
| 202 | void |
| 203 | gainstr(struct obj *otmp, int incr, boolean givemsg) |
| 204 | { |
| 205 | int num = incr; |
| 206 | |
| 207 | if (!num) { |
| 208 | if (ABASE(A_STR) < 18) |
| 209 | num = (rn2(4) ? 1 : rnd(6)); |
| 210 | else if (ABASE(A_STR) < STR18(85)) |
| 211 | num = rnd(10); |
| 212 | else |
| 213 | num = 1; |
| 214 | } |
| 215 | (void) adjattrib(A_STR, (otmp && otmp->cursed) ? -num : num, |
| 216 | givemsg ? -1 : 1); |
| 217 | } |
| 218 | |
| 219 | /* strength loss, may kill you; cause may be poison or monster like 'a' */ |
| 220 | void |