generated from nhcarrigan/template
bug: auto-buy purchases cheapest adventurer rather than most powerful affordable one #150
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?
Description
When multiple adventurers are affordable, auto-buy selects the one with the lowest cost rather than the most powerful (highest tier) one the player can afford.
Example
Expected Behaviour
Auto-buy should prioritise purchasing the most powerful (highest combat power or highest tier) adventurer the player can afford, not the cheapest one. Buying weaker adventurers when stronger ones are available at the same approximate cost is not optimal.
Resolution
Fixed in commit
4c297f1— the sort key was changed fromadventurerB.combatPower - adventurerA.combatPowertoadventurerB.level - adventurerA.level, ensuring the highest-tier affordable unlocked adventurer is always purchased first.✨ This issue was created with help from Hikari~ 🌸