You've already forked obsidian-visualiser
Spell selection in creator + rebalancing
This commit is contained in:
@@ -4,10 +4,33 @@ export type Level = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14
|
||||
export type TrainingLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
||||
export type SpellType = "precision" | "knowledge" | "instinct" | "arts";
|
||||
export type Category = "action" | "reaction" | "freeaction" | "misc";
|
||||
export type SpellElement = "fire" | "ice" | "thunder" | "earth" | "arcana" | "air" | "nature" | "light" | "psyche";
|
||||
export type Resistance = keyof CompiledCharacter["resistance"];
|
||||
|
||||
export type DoubleIndex<T extends number | string> = [T, number];
|
||||
|
||||
export const mainStatTexts: Record<MainStat, string> = {
|
||||
"strength": "Force",
|
||||
"dexterity": "Dextérité",
|
||||
"constitution": "Constitution",
|
||||
"intelligence": "Intelligence",
|
||||
"curiosity": "Curiosité",
|
||||
"charisma": "Charisme",
|
||||
"psyche": "Psyché",
|
||||
}
|
||||
export const elementTexts: Record<SpellElement, { class: string, text: string }> = {
|
||||
fire: { class: 'text-light-red dark:text-dark-red', text: 'Feu' },
|
||||
ice: { class: 'text-light-blue dark:text-dark-blue', text: 'Glace' },
|
||||
thunder: { class: 'text-light-yellow dark:text-dark-yellow', text: 'Foudre' },
|
||||
earth: { class: 'text-light-orange dark:text-dark-orange', text: 'Terre' },
|
||||
arcana: { class: 'text-light-purple dark:text-dark-purple', text: 'Arcane' },
|
||||
air: { class: 'text-light-green dark:text-dark-green', text: 'Air' },
|
||||
nature: { class: 'text-light-green dark:text-dark-green', text: 'Nature' },
|
||||
light: { class: 'text-light-yellow dark:text-dark-yellow', text: 'Lumière' },
|
||||
psyche: { class: 'text-light-purple dark:text-dark-purple', text: 'Psy' },
|
||||
}
|
||||
export const spellTypeTexts: Record<SpellType, string> = { "instinct": "Instinct", "knowledge": "Savoir", "precision": "Précision" };
|
||||
|
||||
export type Progression = {
|
||||
training: Record<MainStat, DoubleIndex<TrainingLevel>[]>;
|
||||
race: {
|
||||
@@ -41,7 +64,7 @@ export type SpellConfig = {
|
||||
type: SpellType;
|
||||
cost: number;
|
||||
speed: "action" | "reaction" | number;
|
||||
elements: Array<"fire" | "ice" | "thunder" | "earth" | "arcana" | "air" | "nature" | "light" | "psyche">;
|
||||
elements: Array<SpellElement>;
|
||||
effect: string;
|
||||
tags?: string[];
|
||||
};
|
||||
@@ -69,6 +92,7 @@ export type RaceOption = {
|
||||
shaping?: number;
|
||||
modifier?: number;
|
||||
abilities?: number;
|
||||
spellslots?: number;
|
||||
};
|
||||
export type Feature = {
|
||||
text?: string;
|
||||
@@ -113,6 +137,7 @@ export type TrainingOption = {
|
||||
spellrank?: SpellType;
|
||||
defense?: Array<keyof CompiledCharacter["defense"]>;
|
||||
resistance?: [Resistance, "attack" | "defense"][];
|
||||
spell?: string;
|
||||
|
||||
//Used during character creation, not used by compiler
|
||||
modifier?: number;
|
||||
@@ -137,6 +162,7 @@ export type CompiledCharacter = {
|
||||
aspect: string;
|
||||
speed: number | false;
|
||||
initiative: number;
|
||||
spells: string[];
|
||||
|
||||
defense: {
|
||||
static: number;
|
||||
Reference in New Issue
Block a user