diff --git a/db.sqlite b/db.sqlite index ee2ea2e..a792716 100644 Binary files a/db.sqlite and b/db.sqlite differ diff --git a/db.sqlite-shm b/db.sqlite-shm index 6a16c43..fe9ac28 100644 Binary files a/db.sqlite-shm and b/db.sqlite-shm differ diff --git a/db.sqlite-wal b/db.sqlite-wal index 40e1d6f..e69de29 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 115e33b..49cd285 100644 --- a/shared/character-config.json +++ b/shared/character-config.json @@ -356,7 +356,7 @@ "category": "value", "operation": "add", "property": "transformation", - "value": 2 + "value": 1 }, { "category": "value", @@ -398,890 +398,870 @@ ], "6": [ { - "description": "+1 point de statistique.\n+3 PV max.\n+3 mana max." + "description": "+1 point de statistique.\n+3 PV max.\n+3 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 3 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 3 + } + ] }, { - "description": "+1 point de statistique.\n+3 points de compétences.\n+1 sort maitrisé." + "description": "+1 point de statistique.\n+3 points de compétences.\n+1 sort maitrisé.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 3 + }, + { + "category": "value", + "operation": "add", + "property": "spellslots", + "value": 1 + } + ] } ], "7": [ { - "description": "+2 points de statistiques.\n+3 PV max.\n+5 mana max." + "description": "+2 points de statistiques.\n+3 PV max.\n+5 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 3 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 5 + } + ] }, { - "description": "+2 points de statistiques.\n+5 PV max.\n+2 mana max." + "description": "+2 points de statistiques.\n+5 PV max.\n+2 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 5 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 2 + } + ] } ], "8": [ { - "description": "+3 points de statistiques." + "description": "+3 points de statistiques.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 3 + } + ] }, { - "description": "+1 point de statistique.\n+6 PV max.\n+6 mana max.\n+1 sort maitrisé." + "description": "+1 point de statistique.\n+6 PV max.\n+6 mana max.\n+1 sort maitrisé.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "spellslots", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 6 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 6 + } + ] } ], "9": [ { - "description": "+1 point de statistique.\n+3 PV max.\n+5 mana max." + "description": "+1 point de statistique.\n+3 PV max.\n+5 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 3 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 5 + } + ] }, { - "description": "+1 point de statistique.\n+2 points de compétences.\n+2 PV max." + "description": "+1 point de statistique.\n+2 points de compétences.\n+2 PV max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 2 + } + ] } ], "10": [ { - "description": "+2 points de statistiques." + "description": "+2 points de statistiques.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 2 + } + ] }, { - "description": "+1 point de statistique.\n+1 transformation par jour.\n+2 points de compétences." + "description": "+1 point de statistique.\n+1 transformation par jour.\n+2 points de compétences.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "transformation", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 2 + } + ] }, { - "description": "+1 au modifieur de votre choix.\n+1 point de compétence." + "description": "+1 au modifieur de votre choix.\n+1 point de compétence.", + "effect": [ + { + "category": "choice", + "id": "af9da6ba23129e4ed7adc181b71ea5f8", + "options": [ + { + "text": "Force", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/strength" + }, + { + "text": "Dextérité", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/dexterity" + }, + { + "text": "Constitution", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/constitution" + }, + { + "text": "Intelligence", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/intelligence" + }, + { + "text": "Curiosité", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/curiosity" + }, + { + "text": "Charisme", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/charisma" + }, + { + "text": "Psyché", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/psyche" + } + ] + }, + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 1 + } + ] } ], "11": [ { - "description": "+1 point de statistique.\n+7 PV max.\n+1 mana max." + "description": "+1 point de statistique.\n+7 PV max.\n+1 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 7 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 1 + } + ] }, { - "description": "+1 point de statistique.\n+2 PV max.\n+5 mana max." + "description": "+1 point de statistique.\n+2 PV max.\n+5 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 5 + } + ] }, { - "description": "+1 point de statistique.\n+2 points de compétences." + "description": "+1 point de statistique.\n+2 points de compétences.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 2 + } + ] } ], "12": [ { - "description": "+2 points de statistiques.\n+1 sort maitrisé." + "description": "+2 points de statistiques.\n+1 sort maitrisé.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "spellslots", + "value": 1 + } + ] }, { - "description": "+2 points de statistiques.\n+8 PV max." + "description": "+2 points de statistiques.\n+8 PV max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 8 + } + ] }, { - "description": "+2 points de statistiques.\n+7 mana max." + "description": "+2 points de statistiques.\n+7 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 7 + } + ] } ], "13": [ { - "description": "+1 point de statistique.\n+1 point de compétence.\n+2 PV max.\n+2 mana max." + "description": "+1 point de statistique.\n+1 point de compétence.\n+2 PV max.\n+2 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 2 + } + ] }, { - "description": "+1 point de statistique.\n+1 transformation par jour.\n+4 PV max.\n+4 mana max." + "description": "+1 point de statistique.\n+1 transformation par jour.\n+4 PV max.\n+4 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "transformation", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 4 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 4 + } + ] } ], "14": [ { - "description": "+3 points de statistiques.\n+3 PV max.\n+5 mana max." + "description": "+3 points de statistiques.\n+3 PV max.\n+5 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 3 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 3 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 5 + } + ] }, { - "description": "+3 points de statistiques.\n+6 PV max.\n+1 mana max." + "description": "+3 points de statistiques.\n+6 PV max.\n+1 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 3 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 6 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 1 + } + ] } ], "15": [ { - "description": "+1 point de statistique." + "description": "+1 point de statistique.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + } + ] }, { - "description": "+1 point de compétence.\n+5 PV max.\n+5 mana max." + "description": "+1 point de compétence.\n+5 PV max.\n+5 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 5 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 5 + } + ] } ], "16": [ { - "description": "+1 point de statistique.\n+3 PV max.\n+5 mana max." + "description": "+1 point de statistique.\n+3 PV max.\n+5 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 3 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 5 + } + ] }, { - "description": "+1 point de statistique.\n+5 PV max.\n+2 mana max." + "description": "+1 point de statistique.\n+5 PV max.\n+2 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 5 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 2 + } + ] } ], "17": [ { - "description": "+2 points de statistiques.\n+1 point de compétence.\n+1 sort maitrisé." + "description": "+2 points de statistiques.\n+1 point de compétence.\n+1 sort maitrisé.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "spellslots", + "value": 1 + } + ] }, { - "description": "+1 point de statistique.\n+1 transformation par jour.\n+2 points de compétences.\n+1 sort maitrisé." + "description": "+1 point de statistique.\n+1 transformation par jour.\n+2 points de compétences.\n+1 sort maitrisé.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "transformation", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "spellslots", + "value": 1 + } + ] }, { - "description": "+1 point de statistique.\n+1 point de compétence.\n+7 PV max.\n+5 mana max." + "description": "+1 point de statistique.\n+1 point de compétence.\n+7 PV max.\n+5 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 7 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 5 + } + ] } ], "18": [ { - "description": "+1 point de statistique.\n+6 PV max.\n+1 mana max." + "description": "+1 point de statistique.\n+6 PV max.\n+1 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 6 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 1 + } + ] }, { - "description": "+1 point de statistique.\n+2 PV max.\n+5 mana max." + "description": "+1 point de statistique.\n+2 PV max.\n+5 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 5 + } + ] } ], "19": [ { - "description": "+2 points de statistiques.\n+2 points de compétences.\n+6 PV max.\n+3 mana max." + "description": "+2 points de statistiques.\n+2 points de compétences.\n+6 PV max.\n+3 mana max.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 6 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 3 + } + ] }, { - "description": "+2 points de statistiques.\n+2 PV max.\n+5 mana max.\n+1 sort maitrisé." + "description": "+2 points de statistiques.\n+2 PV max.\n+5 mana max.\n+1 sort maitrisé.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "spellslots", + "value": 1 + }, + { + "category": "value", + "operation": "add", + "property": "health", + "value": 2 + }, + { + "category": "value", + "operation": "add", + "property": "mana", + "value": 5 + } + ] } ], "20": [ { - "description": "+2 points de statistiques." - }, - { - "description": "+1 au modifieur de votre choix.\n+1 point de compétence." - } - ] - } - }, - { - "name": "Peuple de Quploth", - "description": "Quploth est la région du monde abritant le plus de marchands et charlatans. Dû à la sur-désertification de leurs terres, ils ont appris à vivre en troquant les richesses. Leurs cités, denses et prospères, sont peu nombreuses et suscitent un tourisme culturel croissant.", - "options": { - "1": [ - { - "training": 35, - "health": 14 - } - ], - "2": [ - { - "training": 1, - "health": 3, - "mana": 2 - }, - { - "health": 6, - "mana": 3, - "abilities": 1 - } - ], - "3": [ - { - "training": 2, - "health": 3, - "mana": 1, - "abilities": 1 - } - ], - "4": [ - { - "training": 1, - "health": 4, - "mana": 2, - "abilities": 2 - } - ], - "5": [ - { - "training": 1, - "health": 4, - "mana": 2, - "abilities": 2 - }, - { - "training": 1, - "shaping": 1, - "health": 8, - "mana": 4 - }, - { - "training": 2, - "health": 7, - "mana": 2 - } - ], - "6": [ - { - "training": 1, - "health": 3, - "mana": 3 - }, - { - "training": 1, - "abilities": 3, - "spellslots": 1 - } - ], - "7": [ - { - "training": 2, - "health": 3, - "mana": 5 - }, - { - "training": 2, - "health": 5, - "mana": 2 - } - ], - "8": [ - { - "training": 3 - }, - { - "training": 1, - "health": 6, - "mana": 6, - "spellslots": 1 - } - ], - "9": [ - { - "training": 1, - "health": 3, - "mana": 5 - }, - { - "training": 1, - "health": 2, - "abilities": 2 - } - ], - "10": [ - { - "training": 2 - }, - { - "training": 1, - "shaping": 1, - "abilities": 2 - }, - { - "modifier": 1, - "abilities": 1 - } - ], - "11": [ - { - "training": 1, - "health": 7, - "mana": 1 - }, - { - "training": 1, - "health": 2, - "mana": 5 - }, - { - "training": 1, - "abilities": 2 - } - ], - "12": [ - { - "training": 2, - "spellslots": 1 - }, - { - "training": 2, - "health": 8 - }, - { - "training": 2, - "mana": 7 - } - ], - "13": [ - { - "training": 1, - "health": 2, - "mana": 2, - "abilities": 1 - }, - { - "training": 1, - "shaping": 1, - "health": 4, - "mana": 4 - } - ], - "14": [ - { - "training": 3, - "health": 3, - "mana": 5 - }, - { - "training": 3, - "health": 6, - "mana": 1 - } - ], - "15": [ - { - "training": 1 - }, - { - "health": 5, - "mana": 5, - "abilities": 1 - } - ], - "16": [ - { - "training": 1, - "health": 3, - "mana": 5 - }, - { - "training": 1, - "health": 5, - "mana": 2 - } - ], - "17": [ - { - "training": 2, - "abilities": 1, - "spellslots": 1 - }, - { - "training": 1, - "shaping": 1, - "abilities": 2, - "spellslots": 1 - }, - { - "training": 1, - "health": 7, - "mana": 5, - "abilities": 1 - } - ], - "18": [ - { - "training": 1, - "health": 6, - "mana": 1 - }, - { - "training": 1, - "health": 2, - "mana": 5 - } - ], - "19": [ - { - "training": 2, - "health": 6, - "mana": 3, - "abilities": 2 - }, - { - "training": 2, - "health": 2, - "mana": 5, - "spellslots": 1 - } - ], - "20": [ - { - "training": 2 - }, - { - "modifier": 1, - "abilities": 1 - } - ] - } - }, - { - "name": "Peuple de Fernom", - "description": "Le Fernom est la nation la plus influente du monde. La cité de Fernom est communément appelée la Capitale Dolme. Ses citoyens sont équilibrés et peuvent avoir une grande variété de gameplay et de progression.", - "options": { - "1": [ - { - "training": 35, - "health": 14 - } - ], - "2": [ - { - "training": 1, - "health": 3, - "mana": 2 - }, - { - "health": 6, - "mana": 3, - "abilities": 1 - } - ], - "3": [ - { - "training": 2, - "health": 3, - "mana": 1, - "abilities": 1 - } - ], - "4": [ - { - "training": 1, - "health": 4, - "mana": 2, - "abilities": 2 - } - ], - "5": [ - { - "training": 1, - "health": 4, - "mana": 2, - "abilities": 2 - }, - { - "training": 1, - "shaping": 1, - "health": 8, - "mana": 4 - }, - { - "training": 2, - "health": 7, - "mana": 2 - } - ], - "6": [ - { - "training": 1, - "health": 3, - "mana": 3 - }, - { - "training": 1, - "abilities": 3, - "spellslots": 1 - } - ], - "7": [ - { - "training": 2, - "health": 3, - "mana": 5 - }, - { - "training": 2, - "health": 5, - "mana": 2 - } - ], - "8": [ - { - "training": 3 - }, - { - "training": 1, - "health": 6, - "mana": 6, - "spellslots": 1 - } - ], - "9": [ - { - "training": 1, - "health": 3, - "mana": 5 - }, - { - "training": 1, - "health": 2, - "abilities": 2 - } - ], - "10": [ - { - "training": 2 - }, - { - "training": 1, - "shaping": 1, - "abilities": 2 - }, - { - "modifier": 1, - "abilities": 1 - } - ], - "11": [ - { - "training": 1, - "health": 7, - "mana": 1 - }, - { - "training": 1, - "health": 2, - "mana": 5 - }, - { - "training": 1, - "abilities": 2 - } - ], - "12": [ - { - "training": 2, - "spellslots": 1 - }, - { - "training": 2, - "health": 8 - }, - { - "training": 2, - "mana": 7 - } - ], - "13": [ - { - "training": 1, - "health": 2, - "mana": 2, - "abilities": 1 - }, - { - "training": 1, - "shaping": 1, - "health": 4, - "mana": 4 - } - ], - "14": [ - { - "training": 3, - "health": 3, - "mana": 5 - }, - { - "training": 3, - "health": 6, - "mana": 1 - } - ], - "15": [ - { - "training": 1 - }, - { - "health": 5, - "mana": 5, - "abilities": 1 - } - ], - "16": [ - { - "training": 1, - "health": 3, - "mana": 5 - }, - { - "training": 1, - "health": 5, - "mana": 2 - } - ], - "17": [ - { - "training": 2, - "abilities": 1, - "spellslots": 1 - }, - { - "training": 1, - "shaping": 1, - "abilities": 2, - "spellslots": 1 - }, - { - "training": 1, - "health": 7, - "mana": 5, - "abilities": 1 - } - ], - "18": [ - { - "training": 1, - "health": 6, - "mana": 1 - }, - { - "training": 1, - "health": 2, - "mana": 5 - } - ], - "19": [ - { - "training": 2, - "health": 6, - "mana": 3, - "abilities": 2 - }, - { - "training": 2, - "health": 2, - "mana": 5, - "spellslots": 1 - } - ], - "20": [ - { - "training": 2 - }, - { - "modifier": 1, - "abilities": 1 - } - ] - } - }, - { - "name": "Peuple salinéen", - "description": "L'empire salinéen, maitre du continent d'Eredan, a toujours vécu dans la croyance d'une usurpation des dieux, soutenue par l'Avatar originel Narserus qui est loué comme le dieu absolu dont les pouvoirs ont été volés.", - "options": { - "1": [ - { - "training": 35, - "health": 14 - } - ], - "2": [ - { - "training": 1, - "health": 3, - "mana": 2 - }, - { - "health": 6, - "mana": 3, - "abilities": 1 - } - ], - "3": [ - { - "training": 2, - "health": 3, - "mana": 1, - "abilities": 1 - } - ], - "4": [ - { - "training": 1, - "health": 4, - "mana": 2, - "abilities": 2 - } - ], - "5": [ - { - "training": 1, - "health": 4, - "mana": 2, - "abilities": 2 - }, - { - "training": 1, - "shaping": 1, - "health": 8, - "mana": 4 - }, - { - "training": 2, - "health": 7, - "mana": 2 - } - ], - "6": [ - { - "training": 1, - "health": 3, - "mana": 3 - }, - { - "training": 1, - "abilities": 3, - "spellslots": 1 - } - ], - "7": [ - { - "training": 2, - "health": 3, - "mana": 5 - }, - { - "training": 2, - "health": 5, - "mana": 2 - } - ], - "8": [ - { - "training": 3 - }, - { - "training": 1, - "health": 6, - "mana": 6, - "spellslots": 1 - } - ], - "9": [ - { - "training": 1, - "health": 3, - "mana": 5 - }, - { - "training": 1, - "health": 2, - "abilities": 2 - } - ], - "10": [ - { - "training": 2 - }, - { - "training": 1, - "shaping": 1, - "abilities": 2 - }, - { - "modifier": 1, - "abilities": 1 - } - ], - "11": [ - { - "training": 1, - "health": 7, - "mana": 1 - }, - { - "training": 1, - "health": 2, - "mana": 5 - }, - { - "training": 1, - "abilities": 2 - } - ], - "12": [ - { - "training": 2, - "spellslots": 1 - }, - { - "training": 2, - "health": 8 - }, - { - "training": 2, - "mana": 7 - } - ], - "13": [ - { - "training": 1, - "health": 2, - "mana": 2, - "abilities": 1 - }, - { - "training": 1, - "shaping": 1, - "health": 4, - "mana": 4 - } - ], - "14": [ - { - "training": 3, - "health": 3, - "mana": 5 - }, - { - "training": 3, - "health": 6, - "mana": 1 - } - ], - "15": [ - { - "training": 1 - }, - { - "health": 5, - "mana": 5, - "abilities": 1 - } - ], - "16": [ - { - "training": 1, - "health": 3, - "mana": 5 - }, - { - "training": 1, - "health": 5, - "mana": 2 - } - ], - "17": [ - { - "training": 2, - "abilities": 1, - "spellslots": 1 - }, - { - "training": 1, - "shaping": 1, - "abilities": 2, - "spellslots": 1 - }, - { - "training": 1, - "health": 7, - "mana": 5, - "abilities": 1 - } - ], - "18": [ - { - "training": 1, - "health": 6, - "mana": 1 - }, - { - "training": 1, - "health": 2, - "mana": 5 - } - ], - "19": [ - { - "training": 2, - "health": 6, - "mana": 3, - "abilities": 2 - }, - { - "training": 2, - "health": 2, - "mana": 5, - "spellslots": 1 - } - ], - "20": [ - { - "training": 2 - }, - { - "modifier": 1, - "abilities": 1 + "description": "+2 points de statistiques.", + "effect": [ + { + "category": "value", + "operation": "add", + "property": "training", + "value": 2 + } + ] + }, + { + "description": "+1 au modifieur de votre choix.\n+1 point de compétence.", + "effect": [ + { + "category": "choice", + "id": "e0c5f6f0c61026b887678873ed5cb386", + "options": [ + { + "text": "Force", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/strength" + }, + { + "text": "Dextérité", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/dexterity" + }, + { + "text": "Constitution", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/constitution" + }, + { + "text": "Intelligence", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/intelligence" + }, + { + "text": "Curiosité", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/curiosity" + }, + { + "text": "Charisme", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/charisma" + }, + { + "text": "Psyché", + "category": "value", + "operation": "add", + "value": 1, + "property": "modifier/psyche" + } + ] + }, + { + "category": "value", + "operation": "add", + "property": "ability", + "value": 1 + } + ] } ] } diff --git a/shared/character.util.ts b/shared/character.util.ts index 30bd6e7..311cad9 100644 --- a/shared/character.util.ts +++ b/shared/character.util.ts @@ -701,15 +701,15 @@ class LevelPicker implements BuilderTab } } }}); - this._pointsInput = dom("input", { class: `w-14 mx-4 text-light-70 dark:text-dark-70 tabular-nums bg-light-10 dark:bg-dark-10 appearance-none outline-none px-3 py-1 focus:shadow-raw transition-[box-shadow] border bg-light-20 bg-dark-20 border-light-20 dark:border-dark-20`, attributes: { type: "number", disabled: true }}); + this._pointsInput = dom("input", { class: `w-14 mx-4 text-light-70 dark:text-dark-70 tabular-nums bg-light-10 dark:bg-dark-10 appearance-none outline-none ps-3 pe-1 py-1 focus:shadow-raw transition-[box-shadow] border bg-light-20 bg-dark-20 border-light-20 dark:border-dark-20`, attributes: { type: "number", disabled: true }}); this._healthText = text("0"), this._manaText = text("0"); this._options = Object.entries(config.peoples[this._builder.character.people!]!.options).map( (level) => [ div("w-full flex h-px", [div("border-t border-dashed border-light-50 dark:border-dark-50 w-full"), dom('span', { class: "relative left-4" }, [ text(level[0]) ])]), - div("flex flex-row gap-4 justify-center", level[1].map((option, j) => dom("div", { class: ["flex border border-light-50 dark:border-dark-50 px-4 py-2 w-[400px]", { 'hover:border-light-70 dark:hover:border-dark-70 cursor-pointer': (level[0] as any as Level) <= this._builder.character.level, '!border-accent-blue bg-accent-blue bg-opacity-20': this._builder.character.leveling[level[0] as any as Level] === j }], listeners: { click: e => { + div("flex flex-row gap-4 justify-center", level[1].map((option, j) => dom("div", { class: ["flex border border-light-50 dark:border-dark-50 px-4 py-2 w-[400px] relative", { 'hover:border-light-70 dark:hover:border-dark-70 cursor-pointer': (level[0] as any as Level) <= this._builder.character.level, '!border-accent-blue bg-accent-blue bg-opacity-20': this._builder.character.leveling[level[0] as any as Level] === j }], listeners: { click: e => { this._builder.toggleLevelOption(parseInt(level[0]) as Level, j); this.update(); - }}}, [ dom('span', { class: "text-wrap whitespace-pre", text: option.description }) ]))) + }}}, [ dom('span', { class: "text-wrap whitespace-pre", text: option.description }), option.effect.some(e => e.category === 'choice') ? div('absolute -bottom-px -right-px border border-light-50 dark:border-dark-50 bg-light-10 dark:bg-dark-10 hover:border-light-70 dark:hover:border-dark-70 flex p-1 justify-center items-center', [ icon('radix-icons:gear') ]) : undefined ]))) ]); this._content = [ div("flex flex-1 gap-12 px-2 py-4 justify-center items-center", [ @@ -1023,10 +1023,10 @@ class AspectPicker implements BuilderTab ]) ])); - const filterSwitch = dom("div", { class: `group mx-3 w-12 h-6 select-none transition-all border border-light-35 dark:border-dark-35 bg-light-20 dark:bg-dark-20 outline-none data-[state=checked]:bg-light-35 dark:data-[state=checked]:bg-dark-35 hover:border-light-50 dark:hover:border-dark-50 focus:shadow-raw focus:shadow-light-40 dark:focus:shadow-dark-40 data-[disabled]:bg-light-20 dark:data-[disabled]:bg-dark-20 data-[disabled]:border-light-20 dark:data-[disabled]:border-dark-20 relative py-[2px]`, attributes: { "data-state": this._filter ? "ckecked" : "unchecked" }, listeners: { + const filterSwitch = dom("div", { class: `group mx-3 w-12 h-6 select-none transition-all border border-light-35 dark:border-dark-35 bg-light-20 dark:bg-dark-20 outline-none data-[state=checked]:bg-light-35 dark:data-[state=checked]:bg-dark-35 hover:border-light-50 dark:hover:border-dark-50 focus:shadow-raw focus:shadow-light-40 dark:focus:shadow-dark-40 data-[disabled]:bg-light-20 dark:data-[disabled]:bg-dark-20 data-[disabled]:border-light-20 dark:data-[disabled]:border-dark-20 relative py-[2px]`, attributes: { "data-state": this._filter ? "checked" : "unchecked" }, listeners: { click: (e: Event) => { this._filter = !this._filter; - filterSwitch.setAttribute('data-state', this._filter ? "ckecked" : "unchecked"); + filterSwitch.setAttribute('data-state', this._filter ? "checked" : "unchecked"); this.update(); } }}, [ div('block w-[18px] h-[18px] translate-x-[2px] will-change-transform transition-transform bg-light-50 dark:bg-dark-50 group-data-[state=checked]:translate-x-[26px] group-data-[disabled]:bg-light-30 dark:group-data-[disabled]:bg-dark-30 group-data-[disabled]:border-light-30 dark:group-data-[disabled]:border-dark-30') ]); diff --git a/types/character.d.ts b/types/character.d.ts index c61c542..f9f9b5a 100644 --- a/types/character.d.ts +++ b/types/character.d.ts @@ -101,7 +101,7 @@ export type FeatureItem = FeatureEffect | { amount: number; exclusive: boolean; //Disallow to pick the same option twice }; - options: FeatureEffect[]; + options: Array; } export type Feature = { name?: string;