return True if spellcasting is inhibited; only covers a small subset of reasons why casting won't work */
| 684 | /* return True if spellcasting is inhibited; |
| 685 | only covers a small subset of reasons why casting won't work */ |
| 686 | staticfn boolean |
| 687 | rejectcasting(void) |
| 688 | { |
| 689 | /* rejections which take place before selecting a particular spell */ |
| 690 | if (Stunned) { |
| 691 | You("are too impaired to cast a spell."); |
| 692 | return TRUE; |
| 693 | } else if (!can_chant(&gy.youmonst)) { |
| 694 | You("are unable to chant the incantation."); |
| 695 | return TRUE; |
| 696 | } else if (!freehand() && !(uwep && uwep->otyp == QUARTERSTAFF)) { |
| 697 | /* Note: !freehand() occurs when weapon and shield (or two-handed |
| 698 | * weapon) are welded to hands, so "arms" probably doesn't need |
| 699 | * to be makeplural(bodypart(ARM)). |
| 700 | * |
| 701 | * But why isn't lack of free arms (for gesturing) an issue when |
| 702 | * poly'd hero has no limbs? |
| 703 | */ |
| 704 | Your("arms are not free to cast!"); |
| 705 | return TRUE; |
| 706 | } |
| 707 | return FALSE; |
| 708 | } |
| 709 | |
| 710 | /* |
| 711 | * Return TRUE if a spell was picked, with the spell index in the return |