Nouvelle fenêtre de jets de dés

This commit is contained in:
2025-09-05 01:09:32 +02:00
parent 652c435833
commit 1ff32697f4
134 changed files with 4025 additions and 400 deletions

View File

@@ -0,0 +1,30 @@
import { RdDCarac } from "../rdd-carac.js"
import { RollPartCheckbox } from "./roll-part-checkbox.mjs"
const ETAT = "etat"
export class RollPartEtat extends RollPartCheckbox {
get code() { return ETAT }
visible(rollData) {
const selectedCarac = rollData.current.carac?.key ?? ''
if (selectedCarac == '') {
return false
}
if (RdDCarac.isChance(selectedCarac)) {
return false
}
if (RdDCarac.isReve(selectedCarac)) {
if ((rollData.current.comp?.key ?? '') == '') {
return false
}
}
return this.getCheckboxValue(rollData) != 0
}
getCheckboxLabel(rollData) { return "État général" }
getCheckboxValue(rollData) {
return rollData.active.actor.getEtatGeneral({ ethylisme: true })
}
}