v11 Fix choix particulière #746
@@ -19,10 +19,12 @@ export class RdDItemRace extends RdDItem {
 | 
				
			|||||||
        return false
 | 
					        return false
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    const carac = RdDCarac.carac(code)
 | 
					    if (code == LIST_CARAC_PERSONNAGE.taille.code) {
 | 
				
			||||||
    if (race.isMax(actor, code, value - 1)) {
 | 
					      const carac = RdDCarac.carac(code)
 | 
				
			||||||
      ui.notifications.warn(`${value} est supérieure au maximum de ${carac.label}`)
 | 
					      if (race.isMax(actor, code, value - 1)) {
 | 
				
			||||||
      return false
 | 
					        ui.notifications.warn(`${value} est supérieure au maximum de ${carac.label}`)
 | 
				
			||||||
 | 
					        return false
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return true
 | 
					    return true
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -59,7 +61,8 @@ 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 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)
 | 
					    return (max > 0 && value >= max)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user