the #remove command - take off ring or other accessory */
| 1871 | |
| 1872 | /* the #remove command - take off ring or other accessory */ |
| 1873 | int |
| 1874 | doremring(void) |
| 1875 | { |
| 1876 | struct obj *otmp = 0; |
| 1877 | |
| 1878 | count_worn_stuff(&otmp, TRUE); |
| 1879 | if (!Naccessories && !Narmorpieces) { |
| 1880 | pline("Not wearing any accessories or armor."); |
| 1881 | return ECMD_OK; |
| 1882 | } |
| 1883 | if (Naccessories != 1 || ParanoidRemove || cmdq_peek(CQ_CANNED)) |
| 1884 | otmp = getobj("remove", remove_ok, GETOBJ_NOFLAGS); |
| 1885 | if (!otmp) |
| 1886 | return ECMD_CANCEL; |
| 1887 | |
| 1888 | return armor_or_accessory_off(otmp); |
| 1889 | } |
| 1890 | |
| 1891 | /* Check if something worn is cursed _and_ unremovable. */ |
| 1892 | int |
nothing calls this directly
no test coverage detected