pokerogue/src/data/mystery-encounters/mystery-encounter-dialogue.ts
Sirz Benjie 408b66f913
[Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495)
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-03-09 14:13:25 -07:00

74 lines
2 KiB
TypeScript

import type { TextStyle } from "#app/ui/text";
export class TextDisplay {
speaker?: string;
text: string;
style?: TextStyle;
}
export class OptionTextDisplay {
buttonLabel: string;
buttonTooltip?: string;
disabledButtonLabel?: string;
disabledButtonTooltip?: string;
secondOptionPrompt?: string;
selected?: TextDisplay[];
style?: TextStyle;
}
export class EncounterOptionsDialogue {
title?: string;
description?: string;
query?: string;
/** Options array with minimum 2 options */
options?: [...OptionTextDisplay[]];
}
/**
* Example MysteryEncounterDialogue object:
*
{
intro: [
{
text: "this is a rendered as a message window (no title display)"
},
{
speaker: "John"
text: "this is a rendered as a dialogue window (title "John" is displayed above text)"
}
],
encounterOptionsDialogue: {
title: "This is the title displayed at top of encounter description box",
description: "This is the description in the middle of encounter description box",
query: "This is an optional question displayed at the bottom of the description box (keep it short)",
options: [
{
buttonLabel: "Option #1 button label (keep these short)",
selected: [ // Optional dialogue windows displayed when specific option is selected and before functional logic for the option is executed
{
text: "You chose option #1 message"
},
{
speaker: "John"
text: "So, you've chosen option #1! It's time to d-d-d-duel!"
}
]
},
{
buttonLabel: "Option #2"
}
],
},
outro: [
{
text: "This message will be displayed at the very end of the encounter (i.e. post battle, post reward, etc.)"
}
],
}
*
*/
export default class MysteryEncounterDialogue {
intro?: TextDisplay[];
encounterOptionsDialogue?: EncounterOptionsDialogue;
outro?: TextDisplay[];
}