returns True if hero is fighting without a weapon and without a shield and has sufficient skill in bare-handed/martial arts to attack twice */
| 733 | /* returns True if hero is fighting without a weapon and without a shield and |
| 734 | has sufficient skill in bare-handed/martial arts to attack twice */ |
| 735 | staticfn boolean |
| 736 | double_punch(void) |
| 737 | { |
| 738 | /* note: P_BARE_HANDED_COMBAT and P_MARTIAL_ARTS are equivalent */ |
| 739 | int skl_lvl = P_SKILL(P_BARE_HANDED_COMBAT); |
| 740 | |
| 741 | /* |
| 742 | * Chance to attempt a second bare-handed or martial arts hit: |
| 743 | * restricted (0), [not applicable; no one is restricted] |
| 744 | * unskilled (1) : 0% |
| 745 | * basic (2) : 0% |
| 746 | * skilled (3) : 20% |
| 747 | * expert (4) : 40% |
| 748 | * master (5) : 60% |
| 749 | * grandmaster (6) : 80% |
| 750 | */ |
| 751 | if (!uwep && !uarms && skl_lvl > P_BASIC) |
| 752 | return (skl_lvl - P_BASIC) > rn2(5); |
| 753 | return FALSE; |
| 754 | } |
| 755 | |
| 756 | /* hit target monster; returns TRUE if it still lives */ |
| 757 | staticfn boolean |