generated from nhcarrigan/template
feat: achievement timestamps, companion progress bars, max runestone indicator, and auto-prestige max-runes mode
This commit is contained in:
@@ -479,6 +479,11 @@ interface GameContextValue {
|
||||
*/
|
||||
toggleAutoPrestige: ()=> void;
|
||||
|
||||
/**
|
||||
* Toggle whether auto-prestige waits for maximum runestone yield before firing.
|
||||
*/
|
||||
toggleAutoPrestigeMaxRunestones: ()=> void;
|
||||
|
||||
/**
|
||||
* Toggle the auto-quest setting on/off.
|
||||
*/
|
||||
@@ -1391,15 +1396,27 @@ export const GameProvider = ({
|
||||
|
||||
// Auto-prestige: fire when unlocked, enabled, and threshold is met
|
||||
const autoState = stateReference.current;
|
||||
const autoPrestigeThreshold = autoPrestigeThresholdBase
|
||||
* Math.pow((autoState?.prestige.count ?? 0) + 1, 2.5)
|
||||
* (autoState?.transcendence?.echoPrestigeThresholdMultiplier ?? 1);
|
||||
const autoBaseRunestones = Math.min(
|
||||
Math.floor(
|
||||
Math.cbrt(
|
||||
(autoState?.player.totalGoldEarned ?? 0) / autoPrestigeThreshold,
|
||||
),
|
||||
) * 15,
|
||||
200,
|
||||
);
|
||||
const autoMaxRunestonesMet
|
||||
= autoState?.prestige.autoPrestigeMaxRunestonesOnly !== true
|
||||
|| autoBaseRunestones >= 200;
|
||||
if (
|
||||
!isAutoPrestigingReference.current
|
||||
&& autoState?.prestige.purchasedUpgradeIds.includes("auto_prestige")
|
||||
=== true
|
||||
&& autoState.prestige.autoPrestigeEnabled === true
|
||||
&& autoState.player.totalGoldEarned
|
||||
>= autoPrestigeThresholdBase
|
||||
* Math.pow(autoState.prestige.count + 1, 2.5)
|
||||
* (autoState.transcendence?.echoPrestigeThresholdMultiplier ?? 1)
|
||||
&& autoState.player.totalGoldEarned >= autoPrestigeThreshold
|
||||
&& autoMaxRunestonesMet
|
||||
) {
|
||||
isAutoPrestigingReference.current = true;
|
||||
void prestigeApi({}).
|
||||
@@ -2065,6 +2082,22 @@ export const GameProvider = ({
|
||||
});
|
||||
}, []);
|
||||
|
||||
const toggleAutoPrestigeMaxRunestones = useCallback(() => {
|
||||
setState((previous) => {
|
||||
if (previous === null) {
|
||||
return previous;
|
||||
}
|
||||
return {
|
||||
...previous,
|
||||
prestige: {
|
||||
...previous.prestige,
|
||||
autoPrestigeMaxRunestonesOnly:
|
||||
previous.prestige.autoPrestigeMaxRunestonesOnly !== true,
|
||||
},
|
||||
};
|
||||
});
|
||||
}, []);
|
||||
|
||||
const toggleAutoQuest = useCallback(() => {
|
||||
setState((previous) => {
|
||||
if (previous === null) {
|
||||
@@ -2496,6 +2529,7 @@ export const GameProvider = ({
|
||||
toggleAutoAdventurer,
|
||||
toggleAutoBoss,
|
||||
toggleAutoPrestige,
|
||||
toggleAutoPrestigeMaxRunestones,
|
||||
toggleAutoQuest,
|
||||
transcend,
|
||||
triggerPrestigeToast,
|
||||
@@ -2571,6 +2605,7 @@ export const GameProvider = ({
|
||||
toggleAutoAdventurer,
|
||||
toggleAutoBoss,
|
||||
toggleAutoPrestige,
|
||||
toggleAutoPrestigeMaxRunestones,
|
||||
toggleAutoQuest,
|
||||
transcend,
|
||||
triggerPrestigeToast,
|
||||
|
||||
Reference in New Issue
Block a user