diff options
author | Bardur Arantsson <bardur@scientician.net> | 2010-01-08 23:55:16 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2010-01-08 23:55:16 +0100 |
commit | 83feea2b1c606716e51f4739794e29971afa8b34 (patch) | |
tree | 4d3b33e14f037812610ac2958523bed328b8b76e /src | |
parent | cb01def7b71e64136ec58ad2876c8e2ed70ac008 (diff) |
Extra Blows ability applies to barehand combat too. (Doesn't affect standard ToME, but Theme grants Extra Blows to some barehand fighters.)
Diffstat (limited to 'src')
-rw-r--r-- | src/xtra1.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/xtra1.c b/src/xtra1.c index 1a9bb361..eea7227c 100644 --- a/src/xtra1.c +++ b/src/xtra1.c @@ -2315,6 +2315,15 @@ byte calc_mimic() return blow; } +/* Returns the number of extra blows based on abilities. */ +static int get_extra_blows_ability() { + /* Count bonus abilities */ + int num = 0; + if (has_ability(AB_MAX_BLOW1)) num++; + if (has_ability(AB_MAX_BLOW2)) num++; + return num; +} + /* Returns the blow information based on class */ void analyze_blow(int *num, int *wgt, int *mul) { @@ -2323,8 +2332,7 @@ void analyze_blow(int *num, int *wgt, int *mul) *mul = cp_ptr->blow_mul; /* Count bonus abilities */ - if (has_ability(AB_MAX_BLOW1)) (*num)++; - if (has_ability(AB_MAX_BLOW2)) (*num)++; + (*num) += get_extra_blows_ability(); } /* Are all the weapons wielded of the right type ? */ @@ -3653,7 +3661,7 @@ void calc_bonuses(bool silent) { int plev = get_skill(SKILL_HAND); - p_ptr->num_blow = 0; + p_ptr->num_blow = get_extra_blows_ability(); if (plev > 9) p_ptr->num_blow++; if (plev > 19) p_ptr->num_blow++; |