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

Function mon_learns_traps

src/mondata.c:1628–1637  ·  view source on GitHub ↗

monster mtmp learns all traps of type ttyp */

Source from the content-addressed store, hash-verified

1626
1627/* monster mtmp learns all traps of type ttyp */
1628void
1629mon_learns_traps(struct monst *mtmp, int ttyp)
1630{
1631 if (ttyp == ALL_TRAPS)
1632 mtmp->mtrapseen = ~0L;
1633 else if (ttyp == NO_TRAP)
1634 mtmp->mtrapseen = 0L;
1635 else
1636 mtmp->mtrapseen |= (1L << (ttyp - 1));
1637}
1638
1639/* monsters see a trap trigger, and remember it */
1640void

Callers 10

mons_see_trapFunction · 0.85
shkinitFunction · 0.85
dotrapFunction · 0.85
mintrapFunction · 0.85
makemonFunction · 0.85
mb_trappedFunction · 0.85
m_teleFunction · 0.85
use_defensiveFunction · 0.85
priestiniFunction · 0.85
mk_roamerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected