diff --git a/db.sqlite b/db.sqlite index c15aae5..ba9eab2 100644 Binary files a/db.sqlite and b/db.sqlite differ diff --git a/db.sqlite-shm b/db.sqlite-shm index fe9ac28..da6eab5 100644 Binary files a/db.sqlite-shm and b/db.sqlite-shm differ diff --git a/db.sqlite-wal b/db.sqlite-wal index e69de29..0b84fef 100644 Binary files a/db.sqlite-wal and b/db.sqlite-wal differ diff --git a/shared/character-config.json b/shared/character-config.json index d87ff51..2fde7a5 100644 --- a/shared/character-config.json +++ b/shared/character-config.json @@ -186,248 +186,168 @@ "options": { "1": [ { - "training": 35, - "health": 14 + "description": "+35 points de statistiques.\n+14 PV max." } ], "2": [ { - "training": 1, - "health": 3, - "mana": 2 + "description": "+1 point de statistique.\n+3 PV max.\n+2 mana max." }, { - "health": 6, - "mana": 3, - "abilities": 1 + "description": "+1 point de compétence.\n+6 PV max.\n+3 mana max." } ], "3": [ { - "training": 2, - "health": 3, - "mana": 1, - "abilities": 1 + "description": "+2 points de statistiques.\n+1 point de compétence.\n+3 PV max.\n+1 mana max." } ], "4": [ { - "training": 1, - "health": 4, - "mana": 2, - "abilities": 2 + "description": "+1 point de statistique.\n+2 points de compétences.\n+4 PV max.\n+2 mana max." } ], "5": [ { - "training": 1, - "health": 4, - "mana": 2, - "abilities": 2 + "description": "+1 point de statistique.\n+2 points de compétences.\n+4 PV max.\n+2 mana max." }, { - "training": 1, - "shaping": 1, - "health": 8, - "mana": 4 + "description": "+1 point de statistique.\n+1 transformation par jour.\n+8 PV max.\n+4 mana max." }, { - "training": 2, - "health": 7, - "mana": 2 + "description": "+2 points de statistiques.\n+7 PV max.\n+2 mana max." } ], "6": [ { - "training": 1, - "health": 3, - "mana": 3 + "description": "+1 point de statistique.\n+3 PV max.\n+3 mana max." }, { - "training": 1, - "abilities": 3, - "spellslots": 1 + "description": "+1 point de statistique.\n+3 points de compétences.\n+1 sort maitrisé." } ], "7": [ { - "training": 2, - "health": 3, - "mana": 5 + "description": "+2 points de statistiques.\n+3 PV max.\n+5 mana max." }, { - "training": 2, - "health": 5, - "mana": 2 + "description": "+2 points de statistiques.\n+5 PV max.\n+2 mana max." } ], "8": [ { - "training": 3 + "description": "+3 points de statistiques." }, { - "training": 1, - "health": 6, - "mana": 6, - "spellslots": 1 + "description": "+1 point de statistique.\n+6 PV max.\n+6 mana max.\n+1 sort maitrisé." } ], "9": [ { - "training": 1, - "health": 3, - "mana": 5 + "description": "+1 point de statistique.\n+3 PV max.\n+5 mana max." }, { - "training": 1, - "health": 2, - "abilities": 2 + "description": "+1 point de statistique.\n+2 points de compétences.\n+2 PV max." } ], "10": [ { - "training": 2 + "description": "+2 points de statistiques." }, { - "training": 1, - "shaping": 1, - "abilities": 2 + "description": "+1 point de statistique.\n+1 transformation par jour.\n+2 points de compétences." }, { - "modifier": 1, - "abilities": 1 + "description": "+1 au modifieur de votre choix.\n+1 point de compétence." } ], "11": [ { - "training": 1, - "health": 7, - "mana": 1 + "description": "+1 point de statistique.\n+7 PV max.\n+1 mana max." }, { - "training": 1, - "health": 2, - "mana": 5 + "description": "+1 point de statistique.\n+2 PV max.\n+5 mana max." }, { - "training": 1, - "abilities": 2 + "description": "+1 point de statistique.\n+2 points de compétences." } ], "12": [ { - "training": 2, - "spellslots": 1 + "description": "+2 points de statistiques.\n+1 sort maitrisé." }, { - "training": 2, - "health": 8 + "description": "+2 points de statistiques.\n+8 PV max." }, { - "training": 2, - "mana": 7 + "description": "+2 points de statistiques.\n+7 mana max." } ], "13": [ { - "training": 1, - "health": 2, - "mana": 2, - "abilities": 1 + "description": "+1 point de statistique.\n+1 point de compétence.\n+2 PV max.\n+2 mana max." }, { - "training": 1, - "shaping": 1, - "health": 4, - "mana": 4 + "description": "+1 point de statistique.\n+1 transformation par jour.\n+4 PV max.\n+4 mana max." } ], "14": [ { - "training": 3, - "health": 3, - "mana": 5 + "description": "+3 points de statistiques.\n+3 PV max.\n+5 mana max." }, { - "training": 3, - "health": 6, - "mana": 1 + "description": "+3 points de statistiques.\n+6 PV max.\n+1 mana max." } ], "15": [ { - "training": 1 + "description": "+1 point de statistique." }, { - "health": 5, - "mana": 5, - "abilities": 1 + "description": "+1 point de compétence.\n+5 PV max.\n+5 mana max." } ], "16": [ { - "training": 1, - "health": 3, - "mana": 5 + "description": "+1 point de statistique.\n+3 PV max.\n+5 mana max." }, { - "training": 1, - "health": 5, - "mana": 2 + "description": "+1 point de statistique.\n+5 PV max.\n+2 mana max." } ], "17": [ { - "training": 2, - "abilities": 1, - "spellslots": 1 + "description": "+2 points de statistiques.\n+1 point de compétence.\n+1 sort maitrisé." }, { - "training": 1, - "shaping": 1, - "abilities": 2, - "spellslots": 1 + "description": "+1 point de statistique.\n+1 transformation par jour.\n+2 points de compétences.\n+1 sort maitrisé." }, { - "training": 1, - "health": 7, - "mana": 5, - "abilities": 1 + "description": "+1 point de statistique.\n+1 point de compétence.\n+7 PV max.\n+5 mana max." } ], "18": [ { - "training": 1, - "health": 6, - "mana": 1 + "description": "+1 point de statistique.\n+6 PV max.\n+1 mana max." }, { - "training": 1, - "health": 2, - "mana": 5 + "description": "+1 point de statistique.\n+2 PV max.\n+5 mana max." } ], "19": [ { - "training": 2, - "health": 6, - "mana": 3, - "abilities": 2 + "description": "+2 points de statistiques.\n+2 points de compétences.\n+6 PV max.\n+3 mana max." }, { - "training": 2, - "health": 2, - "mana": 5, - "spellslots": 1 + "description": "+2 points de statistiques.\n+2 PV max.\n+5 mana max.\n+1 sort maitrisé." } ], "20": [ { - "training": 2 + "description": "+2 points de statistiques." }, { - "modifier": 1, - "abilities": 1 + "description": "+1 au modifieur de votre choix.\n+1 point de compétence." } ] } diff --git a/shared/character.util.ts b/shared/character.util.ts index dd90652..adffc22 100644 --- a/shared/character.util.ts +++ b/shared/character.util.ts @@ -4,6 +4,7 @@ import characterConfig from './character-config.json'; import { button, loading } from "./proses"; import { div, dom, icon, text } from "./dom.util"; import { popper } from "./floating.util"; +import { clamp } from "./general.util"; const config = characterConfig as CharacterConfig; @@ -182,6 +183,7 @@ export class CharacterBuilder ]; this._stepsContent = [ new PeoplePicker(this), + new LevelPicker(this), ]; this._content = div('flex-1 outline-none max-w-full w-full overflow-y-auto'); this._container.appendChild(div('flex flex-1 flex-col justify-start items-center px-8 w-full h-full overflow-y-hidden', [ @@ -301,7 +303,7 @@ export class CharacterBuilder } }) } - private updateLevel(level: Level) + updateLevel(level: Level) { this._character.level = level; @@ -320,7 +322,7 @@ export class CharacterBuilder } } } - private toggleLevelOption(level: Level, choice: number) + toggleLevelOption(level: Level, choice: number) { if(level > this._character.level) //Cannot add more level options than the current level return; @@ -355,7 +357,7 @@ export class CharacterBuilder this.add(config.peoples[this._character.people!]!.options[level][choice]!); } } - private toggleTrainingOption(stat: MainStat, level: TrainingLevel, option: number) + toggleTrainingOption(stat: MainStat, level: TrainingLevel, option: number) { } @@ -422,17 +424,6 @@ class PeoplePicker implements BuilderTab constructor(builder: CharacterBuilder) { - /* -