@@ -710,6 +710,48 @@ function buildAnchorLine(label: string, content: string) {
|
||||
return content ? `${label}:${content}` : '';
|
||||
}
|
||||
|
||||
export function buildCustomWorldCreatorIntentFoundationText(
|
||||
intent: CustomWorldCreatorIntent | null | undefined,
|
||||
) {
|
||||
if (!hasMeaningfulCustomWorldCreatorIntent(intent)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const relationshipSeed = intent?.keyCharacters[0];
|
||||
const relationshipText = relationshipSeed
|
||||
? [
|
||||
relationshipSeed.name,
|
||||
relationshipSeed.role,
|
||||
relationshipSeed.relationToPlayer
|
||||
? `与玩家 ${relationshipSeed.relationToPlayer}`
|
||||
: '',
|
||||
relationshipSeed.hiddenHook ? `暗线 ${relationshipSeed.hiddenHook}` : '',
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' · ')
|
||||
: '';
|
||||
const playerOpeningText = [intent?.playerPremise || '', intent?.openingSituation || '']
|
||||
.filter(Boolean)
|
||||
.join(';');
|
||||
const themeToneText = [
|
||||
intent?.themeKeywords.join('、') || '',
|
||||
intent?.toneDirectives.join('、') || '',
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' / ');
|
||||
|
||||
return [
|
||||
buildAnchorLine('世界一句话', intent?.worldHook || ''),
|
||||
buildAnchorLine('玩家开局', playerOpeningText),
|
||||
buildAnchorLine('主题气质', themeToneText),
|
||||
buildAnchorLine('核心冲突', intent?.coreConflicts.join(';') || ''),
|
||||
buildAnchorLine('关键关系', relationshipText),
|
||||
buildAnchorLine('标志元素', intent?.iconicElements.join('、') || ''),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join('\n');
|
||||
}
|
||||
|
||||
export function buildCustomWorldCreatorIntentDisplayText(
|
||||
intent: CustomWorldCreatorIntent | null | undefined,
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user