mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
.
This commit is contained in:
parent
60e38e5705
commit
59481d0d77
9 changed files with 52 additions and 21 deletions
|
|
@ -766,8 +766,8 @@ export default class DhCharacter extends DhCreature {
|
|||
}
|
||||
});
|
||||
break;
|
||||
case 'comboStrikes':
|
||||
this.rules.roll.comboDieIndex += 1;
|
||||
case 'dice':
|
||||
this.rules.roll[selection.subType] += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ export default class DhLevelData extends foundry.abstract.DataModel {
|
|||
level: new fields.NumberField({ required: true, integer: true }),
|
||||
optionKey: new fields.StringField({ required: true }),
|
||||
type: new fields.StringField({ required: true, choices: LevelOptionType }),
|
||||
subType: new fields.StringField({ nullable: true }),
|
||||
checkboxNr: new fields.NumberField({ required: true, integer: true }),
|
||||
value: new fields.NumberField({ integer: true }),
|
||||
minCost: new fields.NumberField({ integer: true }),
|
||||
|
|
|
|||
|
|
@ -69,6 +69,10 @@ export class DhLevelOption extends foundry.abstract.DataModel {
|
|||
choices: LevelOptionType,
|
||||
label: 'DAGGERHEART.GENERAL.type'
|
||||
}),
|
||||
subType: new fields.StringField({
|
||||
nullable: true,
|
||||
label: 'DAGGERHEART.GENERAL.subType',
|
||||
}),
|
||||
value: new fields.NumberField({
|
||||
integer: true,
|
||||
label: 'DAGGERHEART.GENERAL.value'
|
||||
|
|
@ -136,13 +140,6 @@ export const CompanionLevelOptionType = {
|
|||
}
|
||||
};
|
||||
|
||||
export const ClassLevelOptionTypes = {
|
||||
comboStrikes: {
|
||||
id: 'comboStrikes',
|
||||
label: 'Increase your Combo Die size',
|
||||
},
|
||||
};
|
||||
|
||||
export const LevelOptionType = {
|
||||
trait: {
|
||||
id: 'trait',
|
||||
|
|
@ -192,7 +189,16 @@ export const LevelOptionType = {
|
|||
id: 'multiclass',
|
||||
label: 'Multiclass'
|
||||
},
|
||||
...ClassLevelOptionTypes,
|
||||
dice: {
|
||||
id: 'dice',
|
||||
label: 'Increase Dice Size',
|
||||
subTypes: {
|
||||
hopeIndex: { key: 'hopeIndex', label: 'DAGGERHEART.GENERAL.hope' },
|
||||
fearIndex: { key: 'fearIndex', label: 'DAGGERHEART.GENERAL.fear' },
|
||||
advantageIndex: { key: 'advantageIndex', label: 'DAGGERHEART.GENERAL.Advantage.full' },
|
||||
comboDieIndex:{ key: 'comboDieIndex', label: 'Combo Die' } // Translation pending actual useage
|
||||
},
|
||||
},
|
||||
...CompanionLevelOptionType
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 }),
|
||||
})
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue