Compare commits

..

1 Commits

Author SHA1 Message Date
2f667d633b Start SheetV2 & fields 2025-02-01 00:54:15 +01:00
3 changed files with 13 additions and 10 deletions

View File

@ -19,12 +19,10 @@ export class RdDItemRace extends RdDItem {
return false return false
} }
} }
if (code == LIST_CARAC_PERSONNAGE.taille.code) { const carac = RdDCarac.carac(code)
const carac = RdDCarac.carac(code) if (race.isMax(actor, code, value - 1)) {
if (race.isMax(actor, code, value - 1)) { ui.notifications.warn(`${value} est supérieure au maximum de ${carac.label}`)
ui.notifications.warn(`${value} est supérieure au maximum de ${carac.label}`) return false
return false
}
} }
return true return true
} }
@ -61,8 +59,7 @@ export class RdDItemRace extends RdDItem {
if (code == LIST_CARAC_PERSONNAGE.force.code) { if (code == LIST_CARAC_PERSONNAGE.force.code) {
return value >= this.getForceMax(actor) return value >= this.getForceMax(actor)
} }
const pathMax = path.replace(".value", ".max"); const max = foundry.utils.getProperty(this, path) ?? -1
const max = foundry.utils.getProperty(this, pathMax) ?? -1
return (max > 0 && value >= max) return (max > 0 && value >= max)
} }

View File

@ -104,8 +104,8 @@ export class SystemReveDeDragon {
this.RdDHotbar = RdDHotbar this.RdDHotbar = RdDHotbar
this.RdDStatBlockParser = RdDStatBlockParser this.RdDStatBlockParser = RdDStatBlockParser
this.itemClasses = { this.itemClasses = {
monnaie: items.RdDModelMonnaie, monnaie: items.RdDItemMonnaie,
munition: items.RdDModelMunition, munition: items.RdDItemMunition,
armure: RdDItemArmure, armure: RdDItemArmure,
blessure: RdDItemBlessure, blessure: RdDItemBlessure,
gemme: RdDItemGemme, gemme: RdDItemGemme,

View File

@ -742,6 +742,9 @@
"objet": { "objet": {
"templates": ["description", "equipement", "inventaire"] "templates": ["description", "equipement", "inventaire"]
}, },
"monnaie": {
"templates": ["description", "inventaire"]
},
"gemme": { "gemme": {
"templates": ["description", "enchantable", "inventaire", "temporel"], "templates": ["description", "enchantable", "inventaire", "temporel"],
"type": "", "type": "",
@ -750,6 +753,9 @@
"inertie": 0, "inertie": 0,
"enchantabilite": 0 "enchantabilite": 0
}, },
"munition": {
"templates": ["description", "inventaire"]
},
"nourritureboisson": { "nourritureboisson": {
"templates": ["description", "inventaire", "comestible"], "templates": ["description", "inventaire", "comestible"],
"cuisinier": "", "cuisinier": "",