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

Function temp_givit

src/eat.c:991–997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

989}
990
991staticfn boolean
992temp_givit(int type, struct permonst *ptr)
993{
994 int chance = (type == STONE_RES) ? 6 : (type == ACID_RES) ? 3 : 0;
995
996 return chance ? (ptr->mlevel > rn2(chance)) : FALSE;
997}
998
999/* givit() tries to give you an intrinsic based on the monster's level
1000 * and what type of intrinsic it is trying to give you.

Callers 1

givitFunction · 0.85

Calls 1

rn2Function · 0.85

Tested by

no test coverage detected