called after eating (and after drinking fruit juice) */
| 3286 | |
| 3287 | /* called after eating (and after drinking fruit juice) */ |
| 3288 | void |
| 3289 | lesshungry(int num) |
| 3290 | { |
| 3291 | /* See comments in newuhs() for discussion on force_save_hs */ |
| 3292 | boolean iseating = (go.occupation == eatfood) || gf.force_save_hs; |
| 3293 | |
| 3294 | debugpline1("lesshungry(%d)", num); |
| 3295 | u.uhunger += num; |
| 3296 | if (u.uhunger >= 2000) { |
| 3297 | if (!iseating || svc.context.victual.canchoke) { |
| 3298 | if (iseating) { |
| 3299 | choke(svc.context.victual.piece); |
| 3300 | reset_eat(); |
| 3301 | } else { |
| 3302 | choke((go.occupation == opentin) ? svc.context.tin.tin : 0); |
| 3303 | /* no reset_eat() */ |
| 3304 | } |
| 3305 | } |
| 3306 | } else { |
| 3307 | /* Have lesshungry() report when you're nearly full so all eating |
| 3308 | * warns when you're about to choke. |
| 3309 | */ |
| 3310 | if (u.uhunger >= 1500 && !Hunger |
| 3311 | && (!svc.context.victual.eating |
| 3312 | || (svc.context.victual.eating |
| 3313 | && !svc.context.victual.fullwarn))) { |
| 3314 | pline("You're having a hard time getting all of it down."); |
| 3315 | gn.nomovemsg = "You're finally finished."; |
| 3316 | if (!svc.context.victual.eating) { |
| 3317 | gm.multi = -2; |
| 3318 | } else { |
| 3319 | svc.context.victual.fullwarn = 1; |
| 3320 | if (svc.context.victual.canchoke |
| 3321 | && (svc.context.victual.reqtime |
| 3322 | - svc.context.victual.usedtime) > 1) { |
| 3323 | /* food with one bite left will not survive a stop */ |
| 3324 | if (!paranoid_query(ParanoidEating, "Continue eating?")) { |
| 3325 | reset_eat(); |
| 3326 | gn.nomovemsg = (char *) 0; |
| 3327 | } |
| 3328 | } |
| 3329 | } |
| 3330 | } |
| 3331 | } |
| 3332 | newuhs(FALSE); |
| 3333 | } |
| 3334 | |
| 3335 | staticfn int |
| 3336 | unfaint(void) |
no test coverage detected