20 lines
616 B
TypeScript
20 lines
616 B
TypeScript
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');
|
||
}
|