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,33 @@
import { Grammar } from "../grammar.js"
import { ReglesOptionnelles } from "../settings/regles-optionnelles.js"
import { RollPartCheckbox } from "./roll-part-checkbox.mjs"
export const PART_ASTROLOGIQUE = "astrologique"
export class RollPartAstrologique extends RollPartCheckbox {
get code() { return PART_ASTROLOGIQUE }
get useCheckboxTemplate() { return false }
visible(rollData) {
return this.$isUsingAstrologie() && (
this.isJetChance(rollData)
|| this.isLancementRituel(rollData)
)
}
isLancementRituel(rollData) {
return false
}
isJetChance(rollData) {
return Grammar.includesLowerCaseNoAccent(rollData.current.carac.key, 'chance')
}
$isUsingAstrologie() {
return ReglesOptionnelles.isUsing("astrologie")
}
getCheckboxLabel(rollData) { return "Astrologique" }
getCheckboxValue(rollData) { return rollData.active.actor.ajustementAstrologique() }
}