| 906 | } |
| 907 | |
| 908 | int |
| 909 | Armor_off(void) |
| 910 | { |
| 911 | struct obj *otmp = uarm; |
| 912 | boolean was_arti_light = otmp && otmp->lamplit && artifact_light(otmp); |
| 913 | |
| 914 | svc.context.takeoff.mask &= ~W_ARM; |
| 915 | setworn((struct obj *) 0, W_ARM); |
| 916 | svc.context.takeoff.cancelled_don = FALSE; |
| 917 | |
| 918 | /* taking off yellow dragon scales/mail might be fatal; arti_light |
| 919 | comes from gold dragon scales/mail so they don't overlap, but |
| 920 | conceptually the non-fatal change should be done before the |
| 921 | potentially fatal change in case the latter results in bones */ |
| 922 | if (was_arti_light && !artifact_light(otmp)) { |
| 923 | end_burn(otmp, FALSE); |
| 924 | if (!Blind) |
| 925 | pline("%s shining.", Tobjnam(otmp, "stop")); |
| 926 | } |
| 927 | dragon_armor_handling(otmp, FALSE, TRUE); |
| 928 | |
| 929 | return 0; |
| 930 | } |
| 931 | |
| 932 | /* The gone functions differ from the off functions in that if you die from |
| 933 | * taking it off and have life saving, you still die. [Obsolete reference |
no test coverage detected