fix: 은퇴 명예 기록과 유산 수명주기 정합성을 복원한다

은퇴·사망·통일의 저장 순서와 명예의 전당 및 명장일람 판정을 Ref 흐름에 맞춘다.

유산 행동을 인증된 daemon transaction으로 통합하고 중복 지급·고유 아이템·로그·오류 경계를 회귀 테스트한다.
This commit is contained in:
2026-08-24 03:38:12 +00:00
parent 95cf68dffd
commit 4fc20de8d4
33 changed files with 4160 additions and 1166 deletions
+52
View File
@@ -79,6 +79,33 @@ export interface TurnDaemonSelectPoolReservation {
candidates: TurnDaemonSelectPoolCandidate[];
}
export type TurnDaemonInheritanceAction =
| {
action: 'buyHiddenBuff';
buffType:
| 'warAvoidRatio'
| 'warCriticalRatio'
| 'warMagicTrialProb'
| 'domesticSuccessProb'
| 'domesticFailProb'
| 'warAvoidRatioOppose'
| 'warCriticalRatioOppose'
| 'warMagicTrialProbOppose';
level: number;
}
| { action: 'setNextSpecialWar'; specialKey: string }
| { action: 'resetSpecialWar' }
| { action: 'resetTurnTime' }
| {
action: 'resetStat';
leadership: number;
strength: number;
intel: number;
inheritBonusStat?: [number, number, number];
}
| { action: 'buyRandomUnique' }
| { action: 'checkOwner'; targetGeneralId: number };
export type TurnDaemonCommand =
| {
type: 'run';
@@ -266,6 +293,12 @@ export type TurnDaemonCommand =
specialWar?: string | null;
};
}
| {
type: 'inheritanceAction';
requestId?: string;
userId: string;
input: TurnDaemonInheritanceAction;
}
| {
type: 'adjustGeneralIcon';
requestId?: string;
@@ -635,6 +668,25 @@ export type TurnDaemonCommandResult =
generalId: number;
reason: string;
}
| {
type: 'inheritanceAction';
ok: true;
action: TurnDaemonInheritanceAction['action'];
generalId: number;
remainPoint: number;
nextTurnTimeBase?: number;
nextTurnTimeLabel?: string;
stats?: { leadership: number; strength: number; intel: number };
ownerName?: string;
targetName?: string;
}
| {
type: 'inheritanceAction';
ok: false;
action: TurnDaemonInheritanceAction['action'];
code: 'BAD_REQUEST' | 'FORBIDDEN' | 'PRECONDITION_FAILED' | 'INTERNAL_SERVER_ERROR';
reason: string;
}
| {
type: 'adjustGeneralIcon';
ok: true;