Bug: Multi-element guardians only use first element for damage calculation #227
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug Description
For guardian floors with multiple elements (e.g. floor 230 guardian with
['crystal', 'stellar', 'void']), only the first element is used for elemental damage bonus calculations. ThegetFloorElementfunction returnsguardian.element[0], andgetElementalBonusonly checks against a single element.Code Location
src/lib/game/utils/floor-utils.tslines ~22-28:Impact
Medium. Multi-element guardians at floors 230-240 (and procedural guardians with 2+) are no harder than single-element guardians in terms of elemental counter-play. A guardian with
['crystal', 'stellar', 'void']is treated as justcrystal, making spells that counter stellar or void useless against them.Fix Required
Either:
The most balanced approach would be
Math.min(...elements.map(e => getElementalBonus(spellElem, e)))so players get the best counter-play opportunity.Fixed: New getMultiElementBonus() computes elemental bonus across all guardian elements using Math.min, making multi-element guardians properly challenging.