This commit is contained in:
19
src/services/storyEngine/epilogueComposer.ts
Normal file
19
src/services/storyEngine/epilogueComposer.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { CompanionResolution, EndingState } from '../../types';
|
||||
|
||||
export function buildEpilogueSummary(params: {
|
||||
endingState: EndingState;
|
||||
companionResolutions: CompanionResolution[];
|
||||
}) {
|
||||
const companionText = params.companionResolutions.length > 0
|
||||
? params.companionResolutions
|
||||
.slice(0, 3)
|
||||
.map((resolution) => resolution.summary)
|
||||
.join(' ')
|
||||
: '与你同行的人们各自带着新的立场散入余波里。';
|
||||
|
||||
return [
|
||||
`${params.endingState.title}:${params.endingState.summary}`,
|
||||
params.endingState.worldOutcomeSummary,
|
||||
companionText,
|
||||
].join('\n');
|
||||
}
|
||||
Reference in New Issue
Block a user