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

Function seffect_create_monster

src/read.c:1607–1624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1605}
1606
1607staticfn void
1608seffect_create_monster(struct obj **sobjp)
1609{
1610 struct obj *sobj = *sobjp;
1611 boolean sblessed = sobj->blessed;
1612 boolean scursed = sobj->cursed;
1613 boolean confused = (Confusion != 0);
1614
1615 if (create_critters(1 + ((confused || scursed) ? 12 : 0)
1616 + ((sblessed || rn2(73)) ? 0 : rnd(4)),
1617 confused ? &mons[PM_ACID_BLOB]
1618 : (struct permonst *) 0,
1619 FALSE))
1620 gk.known = TRUE;
1621 /* no need to flush monsters; we ask for identification only if the
1622 * monsters are not visible
1623 */
1624}
1625
1626staticfn void
1627seffect_enchant_weapon(struct obj **sobjp)

Callers 1

seffectsFunction · 0.85

Calls 3

create_crittersFunction · 0.85
rn2Function · 0.85
rndFunction · 0.85

Tested by

no test coverage detected