| 1 | // The bundle's entry (referee/sgs.mjs): the upstream engine with this project's table, check, room and the upstream AI. |
| 2 | import { allCharacters } from '../src/engine/data/characters'; |
| 3 | import { skillInfo } from './table'; |
| 4 | |
| 5 | export { play } from './play'; |
| 6 | export { room } from './room'; |
| 7 | export { Heuristic, UpstreamHeuristic, Table, skillInfo } from './table'; |
| 8 | |
| 9 | /** Every general with its faction, health and skills (the upstream's own skill texts): referee/generals.json. */ |
| 10 | export async function catalog(): Promise<Record<string, object>> { |
| 11 | const out: Record<string, object> = {}; |
| 12 | for (const c of allCharacters) { |
| 13 | out[c.name] = { faction: c.faction, maxHealth: c.maxHealth, gender: c.gender, skills: await skillInfo(c.skills.map((s) => s.name)) }; |
| 14 | } |
| 15 | return out; |
| 16 | } |
