Skip to content

Fix element upgrade bonus values shifted up one level for +1 to +9 - #162

Open
muzsor wants to merge 1 commit into
Frostiae:mainfrom
muzsor:fix/element-upgrade-bonus-shift
Open

Fix element upgrade bonus values shifted up one level for +1 to +9#162
muzsor wants to merge 1 commit into
Frostiae:mainfrom
muzsor:fix/element-upgrade-bonus-shift

Conversation

@muzsor

@muzsor muzsor commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Hello!

This pull request fixes the elementAttack / elementAttackStrong / elementDefense columns in UpgradeBonus.json being shifted one level upward for upgrade levels 1–9.

The columns were dropped in c098a6b and restored in f53e238, but off by one — each level received the value of the level above it. Level 10 kept its correct cap values, so +9 and +10 currently give identical element bonuses.

Impact on the auto-attack element factor in getElementDamageFactorAutoAttack (vs a monster, defenseLevel = 1, attacker element strong against the target):

Weapon element Correct (pre-c098a6b) Current Diff
+1 +7.00% +7.43% +0.43
+5 +10.48% +12.09% +1.61
+9 +18.62% +21.39% +2.77
+10 +21.39% +21.39%

elementDefense mirrors elementAttack, so weak-side penalties are too deep as well. The fix restores all three columns for levels 1–9; level 10 and the padded 11–20 rows are untouched (lookups clamp at Math.min(level, 10)).

Verified against the pre-c098a6b data (2fffc01): levels 1–10 now match field-by-field and the computed element factors reproduce the pre-shift behavior exactly.

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