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

Function mon_to_stone

src/mon.c:3747–3763  ·  view source on GitHub ↗

changes the monster into a stone monster of the same type this should only be called when poly_when_stoned() is true */

Source from the content-addressed store, hash-verified

3745/* changes the monster into a stone monster of the same type
3746 this should only be called when poly_when_stoned() is true */
3747void
3748mon_to_stone(struct monst *mtmp)
3749{
3750 if (mtmp->data->mlet == S_GOLEM) {
3751 /* it's a golem, and not a stone golem */
3752 if (canseemon(mtmp))
3753 pline_mon(mtmp, "%s solidifies...", Monnam(mtmp));
3754 if (newcham(mtmp, &mons[PM_STONE_GOLEM], NO_NC_FLAGS)) {
3755 if (canseemon(mtmp))
3756 pline("Now it's %s.", an(pmname(mtmp->data, Mgender(mtmp))));
3757 } else {
3758 if (canseemon(mtmp))
3759 pline("... and returns to normal.");
3760 }
3761 } else
3762 impossible("Can't polystone %s!", a_monnam(mtmp));
3763}
3764
3765boolean
3766vamp_stone(struct monst *mtmp)

Callers 6

do_stone_monFunction · 0.85
mdisplacemFunction · 0.85
mdamagemFunction · 0.85
m_consume_objFunction · 0.85
minstapetrifyFunction · 0.85
passiveumFunction · 0.85

Calls 10

canseemonFunction · 0.85
pline_monFunction · 0.85
MonnamFunction · 0.85
newchamFunction · 0.85
anFunction · 0.85
pmnameFunction · 0.85
MgenderFunction · 0.85
a_monnamFunction · 0.85
plineFunction · 0.70
impossibleFunction · 0.70

Tested by

no test coverage detected