MCPcopy Create free account
hub / github.com/NetHack/NetHack / eating_conducts

Function eating_conducts

src/eat.c:575–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575void
576eating_conducts(struct permonst *pd)
577{
578 int ll_conduct = 0;
579
580 if (!u.uconduct.food++) {
581 livelog_printf(LL_CONDUCT, "ate for the first time - %s",
582 pd->pmnames[NEUTRAL]);
583 ll_conduct++;
584 }
585 if (!vegan(pd)) {
586 if (!u.uconduct.unvegan++ && !ll_conduct) {
587 livelog_printf(LL_CONDUCT,
588 "consumed animal products (%s) for the first time",
589 pd->pmnames[NEUTRAL]);
590 ll_conduct++;
591 }
592 }
593 if (!vegetarian(pd)) {
594 if (!u.uconduct.unvegetarian && !ll_conduct)
595 livelog_printf(LL_CONDUCT, "tasted meat (%s) for the first time",
596 pd->pmnames[NEUTRAL]);
597 violated_vegetarian();
598 }
599}
600
601/* handle side-effects of mind flayer's tentacle attack */
602int

Callers 3

gulpumFunction · 0.85
eat_brainsFunction · 0.85
consume_tinFunction · 0.85

Calls 2

livelog_printfFunction · 0.85
violated_vegetarianFunction · 0.85

Tested by

no test coverage detected