Skip to content

Improved Curse Logic and Added More Config Options#25

Open
ali-afk wants to merge 9 commits intosomeaddons:1.20.1from
ali-afk:1.20.1
Open

Improved Curse Logic and Added More Config Options#25
ali-afk wants to merge 9 commits intosomeaddons:1.20.1from
ali-afk:1.20.1

Conversation

@ali-afk
Copy link

@ali-afk ali-afk commented Feb 20, 2025

Notable changes:

  • Added the 'curseChanceScales' bool to config to determine whther scaling occurs.
  • Scaling now has improved (non-linear logic).
  • Added the 'maxCurseChance' bool to config (cannot exceed 100).
  • Added the new 'curseEveryXLevels' int to config, guarantees a curse every X levels, disabled if 0.
  • Made sure new logic does not break anything.
  • Made sure new cuseEveryXLevels option subtracts from the levelsAdded variable to prevent cursing more than once per level.
  • Fixed and clarified many typos in the config.
  • Made config and curse logic look acleaner all around (opinionated).
  • Made sure to document how everything works in code.
  • Made sure new config options do not exceed certain ranges.
  • CURSE LEVEL CAN NOW BE INCREMENTED IF ROLLED AGAIN (used to be flagged as incompatible).

Add maxCurseChance int to config, default is 75.
Fix some typos in config descriptions.
Move entries around for easier reading.
Changed curse logic to reflect curseEveryXLevels override.
Make config look neater.
Add debug logging to new configs
Fix config typos.
…er now.

- Make some one-line if-statements in parts of code easier to read.
- Clarify curseEveryXLevels config description.
…se it is flagged incompatible by isCompatibleWithAll()

- Fix bug in enchantManually() where curse with previous level was not removed when level was incremented.
- Make sure guaranteedCursesToApply are not counted as part of newLevel in rollAndApplyCurseTo()
- Better curse scaling logic: faster in the beginning, slower later on.
- Clarified config to reflect scaling logic changes.
- Add KintsugiRemixEnchantmentMenuMixin for [Kintsugi](https://github.com/avivbeeri/kintsugi "Go to GitHub") mod compat, [Curseforge](https://www.curseforge.com/minecraft/mc-mods/kintsugi "Go to Curseforge")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant