Skip to content

Commit

Permalink
Dark elven bracers and dual wielding/two-handed weapons.
Browse files Browse the repository at this point in the history
If we're going to properly express how bracers are worn (a pair of),
then their functionality should be addressed as well.

Bracers are worn on the forearms, and do not protude outwards like
wearing a typical shield would. Therefore, dual-wielding and
two-weaponing should be allowed while wearing a pair of them. Also
because of their nature, shield bashing shouldn't be allowed and has
been removed for bracers. Shield skill can still be trained up while
wearing them and the wearer can enjoy the extra AC benefits from the
skill.
  • Loading branch information
k21971 committed Aug 14, 2023
1 parent a2d2d5d commit 68500d4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions doc/evilhack-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3078,4 +3078,5 @@ The following changes to date are:
- Fix: Silver dragon scaled armor was not granting cold resistance
- Fix: bracers are plural, not singular
- Fix: a couple places where traps could spawn on top of altars
- Dark elven bracers and dual wielding/two-handed weapons

4 changes: 2 additions & 2 deletions src/do_wear.c
Original file line number Diff line number Diff line change
Expand Up @@ -2344,14 +2344,14 @@ boolean noisy;
if (noisy)
already_wearing(an(c_shield));
err++;
} else if (uwep && bimanual(uwep)) {
} else if (uwep && otmp->otyp != DARK_ELVEN_BRACERS && bimanual(uwep)) {
if (noisy)
You("cannot wear a shield while wielding a two-handed %s.",
is_sword(uwep) ? c_sword : (uwep->otyp == BATTLE_AXE)
? c_axe
: c_weapon);
err++;
} else if (u.twoweap) {
} else if (u.twoweap && otmp->otyp != DARK_ELVEN_BRACERS) {
if (noisy)
You("cannot wear a shield while wielding two weapons.");
err++;
Expand Down
5 changes: 3 additions & 2 deletions src/uhitm.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ struct attack *uattk;
&& P_SKILL(P_MARTIAL_ARTS) == P_GRAND_MASTER
&& !(multi < 0 || u.umortality > oldumort
|| !malive || m_at(x, y) != mon)) {
if (wearshield) {
if (wearshield && uarms->otyp != DARK_ELVEN_BRACERS) {
if (!rn2(8))
pline("Your extra attack is ineffective while wearing %s.",
an(xname(wearshield)));
Expand Down Expand Up @@ -967,7 +967,8 @@ struct attack *uattk;
/* random shield bash if wearing a shield and are skilled
in using shields */
if (bash_chance
&& wearshield && P_SKILL(P_SHIELD) >= P_BASIC
&& wearshield && uarms->otyp != DARK_ELVEN_BRACERS
&& P_SKILL(P_SHIELD) >= P_BASIC
&& !(multi < 0 || u.umortality > oldumort
|| u.uinwater || !malive || m_at(x, y) != mon)) {
tmp = find_roll_to_hit(mon, uattk->aatyp, wearshield, &attknum,
Expand Down
4 changes: 2 additions & 2 deletions src/wield.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ struct obj *wep;
} else if (wep->otyp == CORPSE && cant_wield_corpse(wep)) {
/* hero must have been life-saved to get here; use a turn */
res++; /* corpse won't be wielded */
} else if (uarms && bimanual(wep)) {
} else if (uarms && uarms->otyp != DARK_ELVEN_BRACERS && bimanual(wep)) {
You("cannot wield a two-handed %s while wearing a shield.",
is_sword(wep) ? "sword" : wep->otyp == BATTLE_AXE ? "axe"
: "weapon");
Expand Down Expand Up @@ -730,7 +730,7 @@ can_twoweapon()
} else if (bimanual(uwep) || bimanual(uswapwep)) {
otmp = bimanual(uwep) ? uwep : uswapwep;
pline("%s isn't one-handed.", Yname2(otmp));
} else if (uarms)
} else if (uarms && uarms->otyp != DARK_ELVEN_BRACERS)
You_cant("use two weapons while wearing a shield.");
/* Allow two-weaponing with an artifact, but not if they are of opposite alignements.
* As expected, neutral artifacts don't care */
Expand Down

0 comments on commit 68500d4

Please sign in to comment.