Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show accurate armor/dmg #7427

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add hotkey for showing base stat
qndel committed Sep 23, 2024
commit d1e8442eab9894e210213ab8831840f2f575ed1f
7 changes: 7 additions & 0 deletions Source/diablo.cpp
Original file line number Diff line number Diff line change
@@ -1792,6 +1792,13 @@ void InitKeymapActions()
SDLK_RCTRL,
nullptr,
[] { ToggleItemLabelHighlight(); });
sgOptions.Keymapper.AddAction(
"Show Base Stats",
N_("Show item base stats"),
N_("Shows item base armor/damage without including bonuses"),
SDLK_LCTRL,
[] { showItemBaseStats = true; },
[] { showItemBaseStats = false; });
sgOptions.Keymapper.AddAction(
"Toggle Automap",
N_("Toggle automap"),
3 changes: 2 additions & 1 deletion Source/items.cpp
Original file line number Diff line number Diff line change
@@ -58,6 +58,7 @@ bool ShowUniqueItemInfoBox;
CornerStoneStruct CornerStone;
bool UniqueItemFlags[128];
int MaxGold = GOLD_MAX_LIMIT;
bool showItemBaseStats = false;

/** Maps from item_cursor_graphic to in-memory item type. */
int8_t ItemCAnimTbl[] = {
@@ -4110,7 +4111,7 @@ void PrintItemDetails(const Item &item)
}
if (item._iClass == ICLASS_ARMOR) {
int realAC = item._iAC;
if (item._iIdentified) {
if (!showItemBaseStats && item._iIdentified) {
realAC += GetBonusAC(item);
}
if (item._iMaxDur == DUR_INDESTRUCTIBLE)
1 change: 1 addition & 0 deletions Source/items.h
Original file line number Diff line number Diff line change
@@ -483,6 +483,7 @@ extern int8_t dItem[MAXDUNX][MAXDUNY];
extern bool ShowUniqueItemInfoBox;
extern CornerStoneStruct CornerStone;
extern DVL_API_FOR_TEST bool UniqueItemFlags[128];
extern bool showItemBaseStats;

uint8_t GetOutlineColor(const Item &item, bool checkReq);
bool IsItemAvailable(int i);