called from moveloop() */
| 666 | |
| 667 | /* called from moveloop() */ |
| 668 | void |
| 669 | age_spells(void) |
| 670 | { |
| 671 | int i; |
| 672 | /* |
| 673 | * The time relative to the hero (a pass through move |
| 674 | * loop) causes all spell knowledge to be decremented. |
| 675 | * The hero's speed, rest status, conscious status etc. |
| 676 | * does not alter the loss of memory. |
| 677 | */ |
| 678 | for (i = 0; i < MAXSPELL && spellid(i) != NO_SPELL; i++) |
| 679 | if (spellknow(i)) |
| 680 | decrnknow(i); |
| 681 | return; |
| 682 | } |
| 683 | |
| 684 | /* return True if spellcasting is inhibited; |
| 685 | only covers a small subset of reasons why casting won't work */ |