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

Function temperature_shift

src/makemon.c:1640–1648  ·  view source on GitHub ↗

return larger value if monster prefers the level temperature */

Source from the content-addressed store, hash-verified

1638
1639/* return larger value if monster prefers the level temperature */
1640staticfn int
1641temperature_shift(struct permonst *ptr)
1642{
1643 if (svl.level.flags.temperature
1644 && pm_resistance(ptr, (svl.level.flags.temperature > 0)
1645 ? MR_FIRE : MR_COLD))
1646 return 3;
1647 return 0;
1648}
1649
1650/* select a random monster type */
1651struct permonst *

Callers 1

rndmonst_adjFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected