Skip to content

Commit 8eb450e

Browse files
Fix leftover price scaling
1 parent 32250c1 commit 8eb450e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

main.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ class Mod : GenericMod {
202202

203203
if (category == 15)
204204
{
205-
*price *= GetItemLevel(item);
205+
*price *= *price;
206+
*price *= 2 * (1 + GetRegionDistance(item->region));
206207
}
207208
}
208209

@@ -230,6 +231,11 @@ class Mod : GenericMod {
230231
return;
231232
}
232233

234+
if (item->category < 3 || item->category > 9)
235+
{
236+
return;
237+
}
238+
233239
this->OnCreatureCanEquipItem(game->GetPlayer(), item, wearable);
234240
}
235241

@@ -246,8 +252,8 @@ class Mod : GenericMod {
246252
// ##### PLAYER ######
247253
// Defense
248254
m_PlayerScaling.insert_or_assign(STAT_TYPE::HEALTH, 5);
249-
m_PlayerScaling.insert_or_assign(STAT_TYPE::ARMOR, 0.5f);
250-
m_PlayerScaling.insert_or_assign(STAT_TYPE::RESISTANCE, 0.5f);
255+
m_PlayerScaling.insert_or_assign(STAT_TYPE::ARMOR, 1);
256+
m_PlayerScaling.insert_or_assign(STAT_TYPE::RESISTANCE, 1);
251257

252258
// Offense
253259
m_PlayerScaling.insert_or_assign(STAT_TYPE::ATK_POWER, 1);
@@ -262,8 +268,8 @@ class Mod : GenericMod {
262268
// ##### CREATURE ######
263269
// Defense
264270
m_CreatureScaling.insert_or_assign(STAT_TYPE::HEALTH, 20);
265-
m_CreatureScaling.insert_or_assign(STAT_TYPE::ARMOR, 0);
266-
m_CreatureScaling.insert_or_assign(STAT_TYPE::RESISTANCE, 0);
271+
m_CreatureScaling.insert_or_assign(STAT_TYPE::ARMOR, 0.1f);
272+
m_CreatureScaling.insert_or_assign(STAT_TYPE::RESISTANCE, 0.1f);
267273

268274
// Offense
269275
m_CreatureScaling.insert_or_assign(STAT_TYPE::ATK_POWER, 1);

0 commit comments

Comments
 (0)