Skip to content

Commit

Permalink
Tweak enchanter cost calculation to properly implement high-max-level…
Browse files Browse the repository at this point in the history
… discount
  • Loading branch information
Robotgiggle committed Jan 1, 2025
1 parent ef69885 commit 0461425
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public static int getRequiredExperienceForEnchantment(int enchantability, Enchan
default -> rarityCost = 80;
}

float levelCost = level + ((float) level / enchantment.getMaxLevel()); // the higher the level, the pricier. But not as bad for enchantments with high max levels
float levelCost = level * ((float) level / enchantment.getMaxLevel()); // the higher the level, the pricier. But not as bad for enchantments with high max levels
float specialMulti = enchantment.isTreasure() ? 2.0F : enchantment.isCursed() ? 1.5F : 1.0F;
float selectionAvailabilityMod = 1.0F;
if (!(enchantment instanceof SpectrumEnchantment)) {
Expand Down

0 comments on commit 0461425

Please sign in to comment.