MCPcopy Index your code
hub / github.com/NetHack/NetHack / zaptype

Function zaptype

src/zap.c:88–96  ·  view source on GitHub ↗

convert monster zap/spell/breath value to hero zap/spell/breath value */

Source from the content-addressed store, hash-verified

86
87/* convert monster zap/spell/breath value to hero zap/spell/breath value */
88staticfn int
89zaptype(int type)
90{
91 if (type <= -30 && -39 <= type) /* monster wand zap */
92 type += 30; /* first convert -39..-30 to -9..0 so that abs()
93 * will yield 0..9 (hero wand zap) for it */
94 type = abs(type);
95 return type;
96}
97
98/*
99 * Recognizing unseen wands by zapping: in 3.4.3 and earlier, zapping

Callers 5

zhitmFunction · 0.85
zhituFunction · 0.85
dobuzzFunction · 0.85
zap_over_floorFunction · 0.85
flash_strFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected