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

Function munstone

src/muse.c:2883–2903  ·  view source on GitHub ↗

TRUE if the monster ate something */

Source from the content-addressed store, hash-verified

2881
2882/* TRUE if the monster ate something */
2883boolean
2884munstone(struct monst *mon, boolean by_you)
2885{
2886 struct obj *obj;
2887 boolean tinok;
2888
2889 if (resists_ston(mon))
2890 return FALSE;
2891 if (mon->meating || helpless(mon))
2892 return FALSE;
2893 mon->mstrategy &= ~STRAT_WAITFORU;
2894
2895 tinok = mcould_eat_tin(mon);
2896 for (obj = mon->minvent; obj; obj = obj->nobj) {
2897 if (cures_stoning(mon, obj, tinok)) {
2898 mon_consume_unstone(mon, obj, by_you, TRUE);
2899 return TRUE;
2900 }
2901 }
2902 return FALSE;
2903}
2904
2905staticfn void
2906mon_consume_unstone(

Callers 4

hmon_hitmon_misc_objFunction · 0.85
do_stone_monFunction · 0.85
mhitm_ad_stonFunction · 0.85
ohitmonFunction · 0.85

Calls 3

mcould_eat_tinFunction · 0.85
cures_stoningFunction · 0.85
mon_consume_unstoneFunction · 0.85

Tested by

no test coverage detected