1
This commit is contained in:
@@ -1609,34 +1609,29 @@ export function createStoryNpcEncounterActions({
|
||||
const closingDialogue = [
|
||||
...nextDialogue,
|
||||
];
|
||||
const progressionResult = buildPostNpcChatProgressionOptions(
|
||||
encounter,
|
||||
playerCharacter,
|
||||
);
|
||||
const shouldUseHostileClosureOptions =
|
||||
shouldUseHostileNpcChatClosureOptions(
|
||||
resolvedChatDirective,
|
||||
Math.min(npcState.affinity, nextAffinity),
|
||||
);
|
||||
const progressionResult = shouldUseHostileClosureOptions
|
||||
? null
|
||||
: buildPostNpcChatProgressionOptions(encounter, playerCharacter);
|
||||
setCurrentStory({
|
||||
text: closingDialogue.map((turn) => turn.text).join('\n'),
|
||||
options: buildNpcChatClosureOptions(
|
||||
encounter,
|
||||
playerCharacter,
|
||||
resolvedChatDirective,
|
||||
nextAffinity,
|
||||
Math.min(npcState.affinity, nextAffinity),
|
||||
),
|
||||
displayMode: 'dialogue',
|
||||
dialogue: closingDialogue,
|
||||
streaming: false,
|
||||
npcAffinityEffect: latestAffinityEffect,
|
||||
deferredOptions: shouldUseHostileNpcChatClosureOptions(
|
||||
resolvedChatDirective,
|
||||
nextAffinity,
|
||||
)
|
||||
? undefined
|
||||
: progressionResult.options,
|
||||
deferredRuntimeState: shouldUseHostileNpcChatClosureOptions(
|
||||
resolvedChatDirective,
|
||||
nextAffinity,
|
||||
)
|
||||
? undefined
|
||||
: (progressionResult.deferredRuntimeState ?? undefined),
|
||||
deferredOptions: progressionResult?.options,
|
||||
deferredRuntimeState:
|
||||
progressionResult?.deferredRuntimeState ?? undefined,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user