generated from nhcarrigan/template
fix: auto-adventurer sorts by combat power instead of current cost (#97)
This commit is contained in:
@@ -1094,11 +1094,7 @@ export const GameProvider = ({
|
||||
return adventurer.unlocked && next.resources.gold >= cost;
|
||||
}).
|
||||
sort((adventurerA, adventurerB) => {
|
||||
const costA
|
||||
= adventurerA.baseCost * Math.pow(1.15, adventurerA.count);
|
||||
const costB
|
||||
= adventurerB.baseCost * Math.pow(1.15, adventurerB.count);
|
||||
return costB - costA;
|
||||
return adventurerB.combatPower - adventurerA.combatPower;
|
||||
});
|
||||
if (bestAdventurer !== undefined) {
|
||||
const purchaseCost
|
||||
|
||||
Reference in New Issue
Block a user