generated from nhcarrigan/template
fix: resolve sync inflation, signature mismatch, CP accuracy, auto-buy cap, unlock hints
- #147: Guard all patch functions with hasChanged before incrementing sync counter to prevent inflation on no-op patches - #148: Clear stale HMAC signature after each boss fight so subsequent auto-saves do not send a mismatched signature - #146: Auto-unlock adventurer-specific upgrades in applyTick when their adventurer count > 0; show recruit hint in upgrade panel - #149: Add Essence/s row to resource bar dropdown - #150: Fix broken auto-quest CP reduce formula; centralise via computePartyCombatPower which applies all multipliers correctly - #151: Cap auto-buy at 100 for non-max-tier adventurers; max tier (highest level unlocked) remains uncapped - #152: Export computePartyCombatPower from tick, applying global upgrades, prestige, equipment, set bonuses, echo, crafted, and companion multipliers; use it in resource bar and boss panel
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
/* eslint-disable react/no-multi-comp -- Sub-component is tightly coupled to the panel */
|
||||
/* eslint-disable max-lines-per-function -- Complex component with many render paths */
|
||||
/* eslint-disable complexity -- UpgradeCard has many conditional render paths for states */
|
||||
/* eslint-disable max-statements -- UpgradePanel builds hints from three sources */
|
||||
/* eslint-disable max-lines -- Upgrade panel with sub-component exceeds line limit */
|
||||
import { type JSX, useState } from "react";
|
||||
import { useGame } from "../../context/gameContext.js";
|
||||
import { cdnImage } from "../../utils/cdn.js";
|
||||
@@ -238,6 +240,22 @@ const UpgradePanel = (): JSX.Element => {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const upgrade of locked) {
|
||||
if (
|
||||
!upgradeUnlockHints.has(upgrade.id)
|
||||
&& upgrade.adventurerId !== undefined
|
||||
) {
|
||||
const adventurerForHint = adventurers.find((a) => {
|
||||
return a.id === upgrade.adventurerId;
|
||||
});
|
||||
if (adventurerForHint !== undefined) {
|
||||
upgradeUnlockHints.set(
|
||||
upgrade.id,
|
||||
`🗡️ Recruit: ${adventurerForHint.name}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleToggle(): void {
|
||||
setShowLocked((current) => {
|
||||
|
||||
Reference in New Issue
Block a user