fix: 은퇴 명예 기록과 유산 수명주기 정합성을 복원한다
은퇴·사망·통일의 저장 순서와 명예의 전당 및 명장일람 판정을 Ref 흐름에 맞춘다. 유산 행동을 인증된 daemon transaction으로 통합하고 중복 지급·고유 아이템·로그·오류 경계를 회귀 테스트한다.
This commit is contained in:
@@ -20,7 +20,7 @@ const STAT_KEYS = ['leadership', 'strength', 'intel'] as const;
|
||||
const DEX_KEYS = ['dex1', 'dex2', 'dex3', 'dex4', 'dex5'] as const;
|
||||
|
||||
type CentennialStatKey = (typeof STAT_KEYS)[number];
|
||||
type CentennialDexKey = (typeof DEX_KEYS)[number];
|
||||
export type CentennialDexKey = (typeof DEX_KEYS)[number];
|
||||
|
||||
export interface CentennialAllStarTarget {
|
||||
uniqueName: string;
|
||||
@@ -670,3 +670,14 @@ export const reconcileCentennialDexConversion = (
|
||||
|
||||
export const centennialRecordableValue = (current: number, granted: number): number =>
|
||||
Math.max(0, current - Math.max(0, granted));
|
||||
|
||||
/**
|
||||
* Ref CentennialAllStarGrowthService::recordableRawValue. Event-provided
|
||||
* mastery is useful during the season, but must not enter permanent ranking,
|
||||
* Hall of Fame, or inheritance records.
|
||||
*/
|
||||
export const readCentennialRecordableDexterity = (meta: Record<string, unknown>, key: CentennialDexKey): number => {
|
||||
const current = asNumber(meta[key], 0);
|
||||
const granted = asNumber(asRecord(asRecord(meta[CENTENNIAL_ALL_STAR_AUX_KEY]).granted)[key], 0);
|
||||
return centennialRecordableValue(current, granted);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user