returns one of spe_Unknown, spe_Fresh, spe_GoingStale, spe_Forgotten */
| 2360 | |
| 2361 | /* returns one of spe_Unknown, spe_Fresh, spe_GoingStale, spe_Forgotten */ |
| 2362 | int |
| 2363 | known_spell(short otyp) |
| 2364 | { |
| 2365 | int i, k; |
| 2366 | |
| 2367 | for (i = 0; (i < MAXSPELL) && (spellid(i) != NO_SPELL); i++) |
| 2368 | if (spellid(i) == otyp) { |
| 2369 | k = spellknow(i); |
| 2370 | return (k > KEEN / 10) ? spe_Fresh |
| 2371 | : (k > 0) ? spe_GoingStale |
| 2372 | : spe_Forgotten; |
| 2373 | } |
| 2374 | return spe_Unknown; |
| 2375 | } |
| 2376 | |
| 2377 | /* return index for spell otyp, or UNKNOWN_SPELL if not found */ |
| 2378 | int |
no outgoing calls
no test coverage detected