convert monster zap/spell/breath value to hero zap/spell/breath value */
| 86 | |
| 87 | /* convert monster zap/spell/breath value to hero zap/spell/breath value */ |
| 88 | staticfn int |
| 89 | zaptype(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 |
no outgoing calls
no test coverage detected