the #twoweapon command */
| 842 | |
| 843 | /* the #twoweapon command */ |
| 844 | int |
| 845 | dotwoweapon(void) |
| 846 | { |
| 847 | /* You can always toggle it off */ |
| 848 | if (u.twoweap) { |
| 849 | You("switch to your primary weapon."); |
| 850 | set_twoweap(FALSE); /* u.twoweap = FALSE */ |
| 851 | update_inventory(); |
| 852 | return ECMD_OK; |
| 853 | } |
| 854 | |
| 855 | /* May we use two weapons? */ |
| 856 | if (can_twoweapon()) { |
| 857 | /* Success! */ |
| 858 | You("begin two-weapon combat."); |
| 859 | set_twoweap(TRUE); /* u.twoweap = TRUE */ |
| 860 | update_inventory(); |
| 861 | return (rnd(20) > ACURR(A_DEX)) ? ECMD_TIME : ECMD_OK; |
| 862 | } |
| 863 | return ECMD_OK; |
| 864 | } |
| 865 | |
| 866 | /*** Functions to empty a given slot ***/ |
| 867 | /* These should be used only when the item can't be put back in |
nothing calls this directly
no test coverage detected