Skip to content

Commit

Permalink
Fix: a couple cases of bracers preventing wielding bimanual weapons
Browse files Browse the repository at this point in the history
When applying a mattock or polymorphing a wielded weapon, bracers were not excepted when checking for a shield.
  • Loading branch information
saltwaterterrapin committed Jan 30, 2024
1 parent bdaa457 commit 57eb04d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion doc/evilhack-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3337,4 +3337,5 @@ The following changes to date are:
- Fix: convicts don't feel guilty about stealing
- Fix: push boots off tortles when reverting from polyform
- Require manual suppression of attacks vs. dangerous enemies
- Fix: fixedness knowledge preventing merging of supermaterials
- Fix: fixedness knowledge preventing merging of supermaterials
- Fix: a couple cases of bracers preventing wielding bimanual weapons
2 changes: 1 addition & 1 deletion src/wield.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ const char *verb; /* "rub",&c */
return FALSE;
}
/* check shield */
if (uarms && bimanual(obj)) {
if (uarms && bimanual(obj) && !is_bracer(uarms)) {
You("cannot %s a two-handed %s while wearing a shield.", verb,
(obj->oclass == WEAPON_CLASS) ? "weapon" : "tool");
return FALSE;
Expand Down
3 changes: 2 additions & 1 deletion src/zap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,8 @@ int id;
remove_worn_item(obj, TRUE);
/* if the new form can be worn in the same slot, make it so */
if ((new_wornmask & W_WEP) != 0L) {
if (was_twohanded || !bimanual(otmp) || !uarms)
if (was_twohanded || !bimanual(otmp)
|| !uarms || is_bracer(uarms))
setuwep(otmp);
if (was_twoweap && uwep && !bimanual(uwep))
u.twoweap = TRUE;
Expand Down

0 comments on commit 57eb04d

Please sign in to comment.