[Feature] Roll Rules Standardization (#1818)

* Moved default hope/fear/advantage/disadvantage under system/rules/roll and changed them to be dice indexs

* .

* .

* .
This commit is contained in:
WBHarry 2026-04-21 16:13:12 +02:00 committed by GitHub
parent 7af3f07a26
commit 2c994ac78c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 132 additions and 83 deletions

View file

@ -90,6 +90,7 @@ export class DhLevelup extends foundry.abstract.DataModel {
checkboxSelections: new fields.NumberField({ required: true, integer: true }),
minCost: new fields.NumberField({ required: true, integer: true }),
type: new fields.StringField({ required: true, choices: LevelOptionType }),
subType: new fields.StringField({ nullable: true }),
value: new fields.NumberField({ integer: true }),
amount: new fields.NumberField({ integer: true })
})
@ -242,7 +243,7 @@ export class DhLevelup extends foundry.abstract.DataModel {
const checkboxes = [...Array(option.checkboxSelections).keys()].flatMap(index => {
const checkboxNr = index + 1;
const checkboxData = selections[tierKey]?.[optionKey]?.[checkboxNr];
const checkbox = { ...option, checkboxNr, tier: tierKey };
const checkbox = { ...option, checkboxNr, tier: tierKey, option: optionKey };
if (checkboxData) {
checkbox.level = checkboxData.level;
@ -343,7 +344,8 @@ export class DhLevelupLevel extends foundry.abstract.DataModel {
value: new fields.StringField(),
data: new fields.ArrayField(new fields.StringField()),
secondaryData: new fields.TypedObjectField(new fields.StringField()),
type: new fields.StringField({ required: true })
type: new fields.StringField({ required: true }),
subType: new fields.StringField({ nullable: true }),
})
)
)