Various fixes to select, combobox and feature editor.

This commit is contained in:
2025-08-24 23:35:57 +02:00
parent 658499749d
commit 247b14b2c8
7 changed files with 7067 additions and 78 deletions

10
types/character.d.ts vendored
View File

@@ -9,6 +9,7 @@ export type Category = typeof CATEGORIES[number];
export type SpellElement = typeof SPELL_ELEMENTS[number];
export type FeatureID = string;
export type Resistance = string;
export type Alignment = { loyalty: 'loyal' | 'neutral' | 'chaotic', kindness: 'good' | 'neutral' | 'evil' };
export type Character = {
@@ -37,12 +38,14 @@ export type Character = {
export type CharacterVariables = {
health: number;
mana: number;
exhaustion: number;
sickness: Array<{ id: string, progress: number | true }>;
equipment: Array<string>;
};
export type CharacterConfig = {
peoples: RaceConfig[],
peoples: RaceConfig[];
resistances: Record<Resistance, { name: string, statistic: MainStat }>;
training: Record<MainStat, Record<TrainingLevel, FeatureID[]>>;
abilities: Record<Ability, AbilityConfig>;
spells: SpellConfig[];
@@ -129,6 +132,11 @@ export type CompiledCharacter = {
speed: number | false;
capacity: number | false;
initiative: number;
exhaust: number;
itempower: number;
action: number;
reaction: number;
variables: CharacterVariables,