Skip to content

Commit

Permalink
Fix: Your dagger also slips from your hand (but a knife was wielded).
Browse files Browse the repository at this point in the history
There's a function called weapon_descr() which uses the skill used to
train a particular weapon as its descriptor. With the fairly recent
changes/merges of various weapons and skills, this now lead to some of
those descriptions being incorrect. This commit fixes those errors.
  • Loading branch information
k21971 committed Jul 9, 2024
1 parent 1942c6d commit 7ceb1d5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/evilhack-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3540,3 +3540,5 @@ The following changes to date are:
- Fix: passive AD_MAGM damage when attacking the Oracle (player or
another monster)
- Fix: make autoall_menu apply to the 'D' drop menu as well as the loot menu
- Fix: Your dagger also slips from your hand (but a knife was wielded)

18 changes: 18 additions & 0 deletions src/weapon.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,24 @@ struct obj *obj;
if (obj->otyp == DWARVISH_MATTOCK)
descr = "mattock";
break;
case P_DAGGER:
if (obj->otyp == KNIFE)
descr = "knife";
if (obj->otyp == SCALPEL)
descr = "scalpel";
break;
case P_MACE:
if (obj->otyp == MORNING_STAR
|| obj->otyp == ORCISH_MORNING_STAR)
descr = "morning star";
if (obj->otyp == ROD)
descr = "rod";
break;
case P_SABER:
if (obj->otyp == SCIMITAR
|| obj->otyp == ORCISH_SCIMITAR)
descr = "scimitar";
break;
default:
break;
}
Expand Down

0 comments on commit 7ceb1d5

Please sign in to comment.