fix: unify guardian system references across pact-utils, SpireSummaryTab, PactDebug, and PactDebugSection
- pact-utils.ts: Replace GUARDIANS[floor] with getGuardianForFloor() so pact multipliers work for extended guardians (floors 110+) - SpireSummaryTab.tsx: Use getGuardianForFloor()/getAllGuardianFloors() instead of static GUARDIANS constant; update type annotations to GuardianDef - PactDebug.tsx: Use unified guardian lookup; add null guards for getGuardianForFloor return type - PactDebugSection.tsx: Use unified guardian lookup; add null guards for getGuardianForFloor return type
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// ─── Pact Utility Functions ───────────────────────────────────────────────────
|
||||
|
||||
import { GUARDIANS } from '../constants';
|
||||
import { getGuardianForFloor } from '../data/guardian-encounters';
|
||||
|
||||
export function computePactMultiplier(state: {
|
||||
signedPacts: number[];
|
||||
@@ -12,7 +12,7 @@ export function computePactMultiplier(state: {
|
||||
|
||||
let baseMult = 1.0;
|
||||
for (const floor of signedPacts) {
|
||||
const guardian = GUARDIANS[floor];
|
||||
const guardian = getGuardianForFloor(floor);
|
||||
if (guardian) {
|
||||
baseMult *= guardian.damageMultiplier;
|
||||
}
|
||||
@@ -43,7 +43,7 @@ export function computePactInsightMultiplier(state: {
|
||||
|
||||
let mult = 1.0;
|
||||
for (const floor of signedPacts) {
|
||||
const guardian = GUARDIANS[floor];
|
||||
const guardian = getGuardianForFloor(floor);
|
||||
if (guardian) {
|
||||
mult *= guardian.insightMultiplier;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user