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

Function muse_newcham_mon

src/muse.c:2249–2261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2247/* type of monster to polymorph into; defaults to one suitable for the
2248 current level rather than the totally arbitrary choice of newcham() */
2249staticfn struct permonst *
2250muse_newcham_mon(struct monst *mon)
2251{
2252 struct obj *m_armr;
2253
2254 if ((m_armr = which_armor(mon, W_ARM)) != 0) {
2255 if (Is_dragon_scales(m_armr))
2256 return Dragon_scales_to_pm(m_armr);
2257 else if (Is_dragon_mail(m_armr))
2258 return Dragon_mail_to_pm(m_armr);
2259 }
2260 return rndmonst();
2261}
2262
2263staticfn int
2264mloot_container(

Callers 1

use_miscFunction · 0.85

Calls 2

which_armorFunction · 0.85
rndmonstFunction · 0.85

Tested by

no test coverage detected