Ending selector, VN sequences

This commit is contained in:
2025-02-08 15:36:11 -08:00
parent 047248adb6
commit 3631144f3c
13 changed files with 470 additions and 22 deletions

View File

@ -1,4 +1,4 @@
import {Skill, SkillData, SkillGoverning, Stat} from "./datatypes.ts";
import {Skill, SkillData, SkillGoverning, SkillScoring, Stat} from "./datatypes.ts";
import {getPlayerProgress} from "./playerprogress.ts";
class SkillsTable {
@ -60,16 +60,41 @@ type Difficulty = 0 | 1 | 2 | 3
type GoverningTemplate = {
stats: Stat[],
note: string
scoring: SkillScoring,
}
type Track = "bat" | "stealth" | "charm" | "stare" | "party" | "lore"
let templates: Record<Track, GoverningTemplate> = {
bat: { stats: ["AGI", "AGI", "PSI"], note: "Cheaper with AGI and PSI." },
stealth: { stats: ["AGI", "AGI", "INT"], note: "Cheaper with AGI and INT." },
charm: { stats: ["CHA", "PSI", "PSI"], note: "Cheaper with CHA and PSI." },
stare: { stats: ["PSI", "PSI"], note: "Cheaper with PSI." },
party: { stats: ["CHA", "CHA", "PSI"], note: "Cheaper with CHA and PSI." },
lore: { stats: ["INT", "INT", "CHA"], note: "Cheaper with INT and CHA." },
bat: {
stats: ["AGI", "AGI", "PSI"],
note: "Cheaper with AGI and PSI.",
scoring: {bat: 1},
},
stealth: {
stats: ["AGI", "AGI", "INT"],
note: "Cheaper with AGI and INT.",
scoring: {stealth: 1},
},
charm: {
stats: ["CHA", "PSI", "PSI"],
note: "Cheaper with CHA and PSI.",
scoring: {charm: 1},
},
stare: {
stats: ["PSI", "PSI"],
note: "Cheaper with PSI.",
scoring: {stare: 1},
},
party: {
stats: ["CHA", "CHA", "PSI"],
note: "Cheaper with CHA and PSI.",
scoring: {party: 1},
},
lore: {
stats: ["INT", "INT", "CHA"],
note: "Cheaper with INT and CHA.",
scoring: {lore: 1},
},
}
function governing(track: Track, difficulty: Difficulty): SkillGoverning {
@ -89,6 +114,7 @@ function governing(track: Track, difficulty: Difficulty): SkillGoverning {
target: target,
cost: cost,
note: template.note,
scoring: template.scoring,
}
}