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

View File

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

View File

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