Empoignade V2

This commit is contained in:
2025-10-21 02:26:44 +02:00
parent c47fc4f5b6
commit 2cbee42180
28 changed files with 383 additions and 114 deletions

View File

@@ -1,3 +1,4 @@
import { Grammar } from "../grammar.js"
import { RollPartSelect } from "./roll-part-select.mjs"
import { ROLLDIALOG_SECTION } from "./roll-part.mjs"
@@ -12,8 +13,14 @@ export class RollPartCarac extends RollPartSelect {
loadRefs(rollData) {
const refs = this.getRefs(rollData)
const selected = this.getSelected(rollData)
const actor = rollData.active.actor
refs.all = [...this.$getActorCaracs(actor), ...this.$getCaracCompetenceCreature(actor)]
.filter(c => !selected.forced ||
(selected.key ?
Grammar.includesLowerCaseNoAccent(c.label, selected.key)
: c.key == '')
)
refs.caracs = refs.all
this.$selectCarac(rollData)
}