forked from public/foundryvtt-reve-de-dragon
Support de races
L'item "race" permet de paramétrer des ajustements de caracs, des min/max de taille, et une limite de force. Ajouter une race à un acteur enlève la/les races précédentes et ajoute les modificateurs de caracs de la nouvelle race. Enlever une race enlève les modificateurs de caracs de la race aux caractéristiques
This commit is contained in:
@ -37,8 +37,39 @@ const TABLE_CARACTERISTIQUES_DERIVEES = {
|
||||
32: { xp: 180, niveau: 11, poids: "1501-2000", poidsMin: 1501, poidsMax: 2000, plusdom: +11, sconst: 10, sust: 17 }
|
||||
};
|
||||
|
||||
export const LIST_CARAC = {
|
||||
'taille': { code: 'taille', label: 'Taille', isCarac: true, path: 'system.carac.taille.value' },
|
||||
'apparence': { code: 'apparence', label: 'Apparence', isCarac: true, path: 'system.carac.apparence.value' },
|
||||
'constitution': { code: 'constitution', label: 'Constitution', isCarac: true, path: 'system.carac.constitution.value' },
|
||||
'force': { code: 'force', label: 'Force', isCarac: true, path: 'system.carac.force.value' },
|
||||
'agilite': { code: 'agilite', label: 'Agilité', isCarac: true, path: 'system.carac.agilite.value' },
|
||||
'dexterite': { code: 'dexterite', label: 'Dextérité', isCarac: true, path: 'system.carac.dexterite.value' },
|
||||
'vue': { code: 'vue', label: 'Vue', isCarac: true, path: 'system.carac.vue.value' },
|
||||
'ouie': { code: 'ouie', label: 'Ouïe', isCarac: true, path: 'system.carac.ouie.value' },
|
||||
'odoratgout': { code: 'odoratgout', label: 'Odorat-Goût', isCarac: true, path: 'system.carac.odoratgout.value' },
|
||||
'volonte': { code: 'volonte', label: 'Volonté', isCarac: true, path: 'system.carac.volonte.value' },
|
||||
'intellect': { code: 'intellect', label: 'Intellect', isCarac: true, path: 'system.carac.intellect.value' },
|
||||
'empathie': { code: 'empathie', label: 'Empathie', isCarac: true, path: 'system.carac.empathie.value' },
|
||||
'reve': { code: 'reve', label: 'Rêve', isCarac: true, path: 'system.carac.reve.value' },
|
||||
'chance': { code: 'chance', label: 'Chance', isCarac: true, path: 'system.carac.chance.value' },
|
||||
'protection': { code: 'protection', label: 'Protection naturelle', isCarac: false, path: 'system.attributs.protection.value' },
|
||||
'beaute': { code: 'beaute', label: 'Beauté', isCarac: false, path: 'system.background.beaute.value' }
|
||||
}
|
||||
|
||||
export class RdDCarac {
|
||||
|
||||
static carac(code) {
|
||||
return LIST_CARAC[code]
|
||||
}
|
||||
|
||||
static label(code) {
|
||||
return RdDCarac.carac(code)?.label ?? '---'
|
||||
}
|
||||
|
||||
static caracs(filter = it => it.isCarac) {
|
||||
return Object.values(LIST_CARAC).filter(filter)
|
||||
}
|
||||
|
||||
static isAgiliteOuDerobee(selectedCarac) {
|
||||
return selectedCarac?.label.match(/(Agilité|Dérobée)/);
|
||||
}
|
||||
|
Reference in New Issue
Block a user