| 702 | } |
| 703 | |
| 704 | staticfn int |
| 705 | Shield_on(void) |
| 706 | { |
| 707 | /* no shield currently requires special handling when put on, but we |
| 708 | keep this uncommented in case somebody adds a new one which does |
| 709 | [the magical shields are handled by setting u.uprops[*].extrinsic |
| 710 | in setworn() called by armor_or_accessory_on() before Shield_on()] */ |
| 711 | switch (uarms->otyp) { |
| 712 | case SMALL_SHIELD: |
| 713 | case SHIELD_OF_DRAIN_RESISTANCE: |
| 714 | case SHIELD_OF_SHOCK_RESISTANCE: |
| 715 | case ELVEN_SHIELD: |
| 716 | case URUK_HAI_SHIELD: |
| 717 | case ORCISH_SHIELD: |
| 718 | case DWARVISH_ROUNDSHIELD: |
| 719 | case LARGE_SHIELD: |
| 720 | case SHIELD_OF_REFLECTION: |
| 721 | break; |
| 722 | default: |
| 723 | impossible(unknown_type, c_shield, uarms->otyp); |
| 724 | } |
| 725 | if (!uarms->known) { |
| 726 | uarms->known = 1; /* shield's +/- evident because of status line AC */ |
| 727 | update_inventory(); |
| 728 | } |
| 729 | return 0; |
| 730 | } |
| 731 | |
| 732 | int |
| 733 | Shield_off(void) |
no test coverage detected