Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonomov committed Nov 23, 2023
1 parent 23e33cd commit 1dabafc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Note: You'll need access to the data from the original game. If you don't have a
* Cain charges 500 [100] gold to identify items.
* Wirt charges 50 extra gold for every 5 clvls to show his item for sale.
* The maximum store price:
* Adria, Griswold and Pepin: 10,000 [140,000]
* Adria, Griswold and Pepin: 10,000 (20,000 for magical items) [140,000]
* Wirt: 75,000 [135,000]
* Maximum affix qlvl:
* Adria: 2×ilvl-1 [2×ilvl]
Expand Down
8 changes: 4 additions & 4 deletions Source/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,7 @@ void SpawnOnePremium(Item &premiumItem, int plvl, const Player &player)
GetItemBonus(player, premiumItem, plvl / 2, plvl, true, !gbIsHellfire);

if (!gbIsHellfire) {
if (premiumItem._iIvalue <= 10000) {
if (premiumItem._iIvalue <= 20000) {
break;
}
} else {
Expand Down Expand Up @@ -4264,7 +4264,7 @@ void SpawnSmith(int lvl)
{
constexpr int PinnedItemCount = 0;

int maxValue = 10000;
int maxValue = 20000;
int maxItems = 20;
if (gbIsHellfire) {
maxValue = 200000;
Expand Down Expand Up @@ -4336,7 +4336,7 @@ void SpawnWitch(int lvl)
const int pinnedBookCount = gbIsHellfire ? GenerateRnd(MaxPinnedBookCount) : 0;
const int reservedItems = gbIsHellfire ? 10 : 17;
const int itemCount = GenerateRnd(WITCH_ITEMS - reservedItems) + 9;
const int maxValue = gbIsHellfire ? 200000 : 10000;
const int maxValue = gbIsHellfire ? 200000 : 20000;

for (int i = 0; i < WITCH_ITEMS; i++) {
Item &item = witchitem[i];
Expand Down Expand Up @@ -4384,7 +4384,7 @@ void SpawnWitch(int lvl)
maxlvl = 2 * lvl - 1;
if (maxlvl != -1)
GetItemBonus(*MyPlayer, item, maxlvl / 2, maxlvl, true, true);
} while (item._iIvalue > maxValue);
} while (item._iIvalue > maxValue || (item._iMiscId == IMISC_BOOK && item._iIvalue > 10000));

item._iCreateInfo = lvl | CF_WITCH;
item._iIdentified = true;
Expand Down
4 changes: 2 additions & 2 deletions Source/loadsave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -937,12 +937,12 @@ bool IsShopPriceValid(const Item &item)
if (!gbIsHellfire && (item._iCreateInfo & CF_BOY) != 0 && item._iIvalue > boyPriceLimit)
return false;

const int premiumPriceLimit = 10000;
const int premiumPriceLimit = 20000;
if (!gbIsHellfire && (item._iCreateInfo & CF_SMITHPREMIUM) != 0 && item._iIvalue > premiumPriceLimit)
return false;

const uint16_t smithOrWitch = CF_SMITH | CF_WITCH;
const int smithAndWitchPriceLimit = gbIsHellfire ? 200000 : 10000;
const int smithAndWitchPriceLimit = gbIsHellfire ? 200000 : 20000;
if ((item._iCreateInfo & smithOrWitch) != 0 && item._iIvalue > smithAndWitchPriceLimit)
return false;

Expand Down

0 comments on commit 1dabafc

Please sign in to comment.