The gone functions differ from the off functions in that if you die from * taking it off and have life saving, you still die. [Obsolete reference * to lack of fire resistance being fatal in hell (nethack 3.0) and life * saving putting a removed item back on to prevent that from immediately * repeating.] */
| 936 | * repeating.] |
| 937 | */ |
| 938 | int |
| 939 | Armor_gone(void) |
| 940 | { |
| 941 | struct obj *otmp = uarm; |
| 942 | boolean was_arti_light = otmp && otmp->lamplit && artifact_light(otmp); |
| 943 | |
| 944 | svc.context.takeoff.mask &= ~W_ARM; |
| 945 | setnotworn(uarm); |
| 946 | svc.context.takeoff.cancelled_don = FALSE; |
| 947 | |
| 948 | /* losing yellow dragon scales/mail might be fatal; arti_light |
| 949 | comes from gold dragon scales/mail so they don't overlap, but |
| 950 | conceptually the non-fatal change should be done before the |
| 951 | potentially fatal change in case the latter results in bones */ |
| 952 | if (was_arti_light && !artifact_light(otmp)) { |
| 953 | end_burn(otmp, FALSE); |
| 954 | if (!Blind) |
| 955 | pline("%s shining.", Tobjnam(otmp, "stop")); |
| 956 | } |
| 957 | dragon_armor_handling(otmp, FALSE, FALSE); |
| 958 | |
| 959 | return 0; |
| 960 | } |
| 961 | |
| 962 | staticfn void |
| 963 | Amulet_on(struct obj *amul) |
no test coverage detected