New Toaster class, Ability and Resistance removed from config file and choices improvement

This commit is contained in:
2025-08-31 23:52:11 +02:00
parent 17bc232602
commit c93cc4078c
24 changed files with 699 additions and 684 deletions

11
types/character.d.ts vendored
View File

@@ -1,4 +1,4 @@
import type { MAIN_STATS, ABILITIES, LEVELS, TRAINING_LEVELS, SPELL_TYPES, CATEGORIES, SPELL_ELEMENTS, ALIGNMENTS } from "#shared/character.util";
import type { MAIN_STATS, ABILITIES, LEVELS, TRAINING_LEVELS, SPELL_TYPES, CATEGORIES, SPELL_ELEMENTS, ALIGNMENTS, RESISTANCES } from "#shared/character.util";
export type MainStat = typeof MAIN_STATS[number];
export type Ability = typeof ABILITIES[number];
@@ -8,10 +8,10 @@ export type SpellType = typeof SPELL_TYPES[number];
export type Category = typeof CATEGORIES[number];
export type SpellElement = typeof SPELL_ELEMENTS[number];
export type Alignment = typeof ALIGNMENTS[number];
export type Resistance = typeof RESISTANCES[number];
export type FeatureID = string;
export type i18nID = string;
export type Resistance = string;
export type Character = {
id: number;
@@ -51,9 +51,7 @@ type ItemState = {
};
export type CharacterConfig = {
peoples: Record<string, RaceConfig>;
resistances: Record<Resistance, { name: string, statistic: MainStat }>;
training: Record<MainStat, Record<TrainingLevel, FeatureID[]>>;
abilities: Record<Ability, AbilityConfig>;
spells: SpellConfig[];
aspects: AspectConfig[];
features: Record<FeatureID, Feature>;
@@ -108,11 +106,6 @@ export type SpellConfig = {
concentration: boolean;
tags?: string[];
};
export type AbilityConfig = {
max: [MainStat, MainStat];
name: string;
description: string;
};
export type RaceConfig = {
id: string;
name: string;