Compare commits

..

2 Commits

3 changed files with 10 additions and 13 deletions

View File

@ -19,10 +19,12 @@ export class RdDItemRace extends RdDItem {
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
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
}
}
return true
}
@ -59,7 +61,8 @@ export class RdDItemRace extends RdDItem {
if (code == LIST_CARAC_PERSONNAGE.force.code) {
return value >= this.getForceMax(actor)
}
const max = foundry.utils.getProperty(this, path) ?? -1
const pathMax = path.replace(".value", ".max");
const max = foundry.utils.getProperty(this, pathMax) ?? -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.RdDItemMonnaie,
munition: items.RdDItemMunition,
monnaie: items.RdDModelMonnaie,
munition: items.RdDModelMunition,
armure: RdDItemArmure,
blessure: RdDItemBlessure,
gemme: RdDItemGemme,

View File

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