base nutrition of a food-class object; this used to include a variation of the code that is now in adj_victual_nutrition() and was moved due to its affect on weight() */
| 322 | of the code that is now in adj_victual_nutrition() and was moved due to |
| 323 | its affect on weight() */ |
| 324 | unsigned |
| 325 | obj_nutrition(struct obj *otmp) |
| 326 | { |
| 327 | unsigned nut = (otmp->otyp == CORPSE) ? mons[otmp->corpsenm].cnutrit |
| 328 | : otmp->globby ? otmp->owt |
| 329 | : (unsigned) objects[otmp->otyp].oc_nutrition; |
| 330 | |
| 331 | return nut; |
| 332 | } |
| 333 | |
| 334 | /* nutrition increment for next byte; this used to be factored into |
| 335 | victual.piece->oeaten but that produced weight change if hero |
no outgoing calls
no test coverage detected