88 lines
2.4 KiB
TypeScript
88 lines
2.4 KiB
TypeScript
import type {
|
|
QuestNarrativeBinding,
|
|
QuestNarrativeType,
|
|
QuestObjectiveKind,
|
|
QuestReward,
|
|
QuestStatus,
|
|
QuestStep,
|
|
ScenePresetInfo,
|
|
} from '../types';
|
|
import type {QuestGenerationContext} from './aiTypes';
|
|
|
|
export type QuestUrgency = 'low' | 'medium' | 'high';
|
|
export type QuestIntimacy = 'transactional' | 'cooperative' | 'trust_based';
|
|
export type QuestRewardTheme = 'currency' | 'resource' | 'relationship' | 'intel' | 'rare_item';
|
|
export type QuestFailPolicy = 'never' | 'leave_scene' | 'issuer_hostile' | 'time_window';
|
|
|
|
export type QuestSceneSnapshot = Pick<
|
|
ScenePresetInfo,
|
|
'id' | 'name' | 'npcs' | 'treasureHints'
|
|
> & {
|
|
description?: ScenePresetInfo['description'];
|
|
};
|
|
|
|
export interface QuestIntent {
|
|
title: string;
|
|
description: string;
|
|
summary: string;
|
|
narrativeType: QuestNarrativeType;
|
|
dramaticNeed: string;
|
|
issuerGoal: string;
|
|
playerHook: string;
|
|
worldReason: string;
|
|
recommendedObjectiveKinds: QuestObjectiveKind[];
|
|
urgency: QuestUrgency;
|
|
intimacy: QuestIntimacy;
|
|
rewardTheme: QuestRewardTheme;
|
|
followupHooks: string[];
|
|
}
|
|
|
|
export interface QuestContract {
|
|
id: string;
|
|
issuerNpcId: string;
|
|
issuerNpcName: string;
|
|
sceneId: string | null;
|
|
questArchetype: QuestNarrativeType;
|
|
title: string;
|
|
description: string;
|
|
summary: string;
|
|
steps: QuestStep[];
|
|
reward: QuestReward;
|
|
rewardText: string;
|
|
narrativeBinding: QuestNarrativeBinding;
|
|
failPolicy: QuestFailPolicy;
|
|
}
|
|
|
|
export interface QuestOpportunity {
|
|
shouldOffer: boolean;
|
|
reason: string;
|
|
suggestedIssuerNpcId?: string;
|
|
suggestedThreatType?: 'hostile_npc' | 'treasure' | 'relationship' | 'travel';
|
|
}
|
|
|
|
export type QuestProgressSignal =
|
|
| {kind: 'hostile_npc_defeated'; sceneId?: string | null; hostileNpcId: string}
|
|
| {kind: 'treasure_inspected'; sceneId?: string | null}
|
|
| {kind: 'npc_spar_completed'; npcId: string}
|
|
| {kind: 'npc_talk_completed'; npcId: string}
|
|
| {kind: 'scene_reached'; sceneId: string}
|
|
| {kind: 'item_delivered'; npcId: string; itemId: string; quantity: number};
|
|
|
|
export interface QuestCompilationRequest {
|
|
issuerNpcId: string;
|
|
issuerNpcName: string;
|
|
roleText: string;
|
|
scene: QuestSceneSnapshot | null;
|
|
worldType: QuestGenerationContext['worldType'];
|
|
context?: QuestGenerationContext;
|
|
origin?: QuestNarrativeBinding['origin'];
|
|
}
|
|
|
|
export interface QuestPreviewRequest extends QuestCompilationRequest {
|
|
currentQuests?: Array<{
|
|
id: string;
|
|
issuerNpcId: string;
|
|
status: QuestStatus;
|
|
}>;
|
|
}
|