the #takeoff command - remove worn armor */
| 1830 | |
| 1831 | /* the #takeoff command - remove worn armor */ |
| 1832 | int |
| 1833 | dotakeoff(void) |
| 1834 | { |
| 1835 | struct obj *otmp = (struct obj *) 0; |
| 1836 | |
| 1837 | count_worn_stuff(&otmp, FALSE); |
| 1838 | if (!Narmorpieces && !Naccessories) { |
| 1839 | /* assert( GRAY_DRAGON_SCALES > YELLOW_DRAGON_SCALE_MAIL ); */ |
| 1840 | if (uskin) |
| 1841 | pline_The("%s merged with your skin!", |
| 1842 | uskin->otyp >= GRAY_DRAGON_SCALES |
| 1843 | ? "dragon scales are" |
| 1844 | : "dragon scale mail is"); |
| 1845 | else |
| 1846 | pline("Not wearing any armor or accessories."); |
| 1847 | return ECMD_OK; |
| 1848 | } |
| 1849 | if (Narmorpieces != 1 || ParanoidRemove || gi.item_action_in_progress) |
| 1850 | otmp = getobj("take off", takeoff_ok, GETOBJ_NOFLAGS); |
| 1851 | if (!otmp) |
| 1852 | return ECMD_CANCEL; |
| 1853 | |
| 1854 | return armor_or_accessory_off(otmp); |
| 1855 | } |
| 1856 | |
| 1857 | /* 'i' or 'I[' followed by <invlet> and then 'T'; |
| 1858 | plain dotakeoff() would not give any feedback when picking suit |
no test coverage detected