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

Function raceptr

src/mondata.c:1358–1364  ·  view source on GitHub ↗

* Return the permonst ptr for the race of the monster. * Returns correct pointer for non-polymorphed and polymorphed * player. It does not return a pointer to player role character. */

Source from the content-addressed store, hash-verified

1356 * player. It does not return a pointer to player role character.
1357 */
1358const struct permonst *
1359raceptr(struct monst *mtmp)
1360{
1361 if (mtmp == &gy.youmonst && !Upolyd)
1362 return &mons[gu.urace.mnum];
1363 return mtmp->data;
1364}
1365
1366typedef const char *const locoverbs[4];
1367static locoverbs levitate = { "float", "Float", "wobble", "Wobble" },

Callers 1

racial_exceptionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected