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;
|
return adventurer.unlocked && next.resources.gold >= cost;
|
||||||
}).
|
}).
|
||||||
sort((adventurerA, adventurerB) => {
|
sort((adventurerA, adventurerB) => {
|
||||||
const costA
|
return adventurerB.combatPower - adventurerA.combatPower;
|
||||||
= adventurerA.baseCost * Math.pow(1.15, adventurerA.count);
|
|
||||||
const costB
|
|
||||||
= adventurerB.baseCost * Math.pow(1.15, adventurerB.count);
|
|
||||||
return costB - costA;
|
|
||||||
});
|
});
|
||||||
if (bestAdventurer !== undefined) {
|
if (bestAdventurer !== undefined) {
|
||||||
const purchaseCost
|
const purchaseCost
|
||||||
|
|||||||
Reference in New Issue
Block a user