mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +01:00
First PR
This commit is contained in:
parent
7178148c80
commit
fad34ae975
26 changed files with 688 additions and 371 deletions
|
|
@ -18,7 +18,8 @@ export default class DHDualityRoll extends foundry.abstract.TypeDataModel {
|
|||
return {
|
||||
title: new fields.StringField(),
|
||||
origin: new fields.StringField({ required: true }),
|
||||
roll: new fields.StringField({}),
|
||||
// roll: new fields.StringField({}),
|
||||
roll: new fields.DataField({}),
|
||||
modifiers: new fields.ArrayField(
|
||||
new fields.SchemaField({
|
||||
value: new fields.NumberField({ integer: true }),
|
||||
|
|
@ -28,8 +29,10 @@ export default class DHDualityRoll extends foundry.abstract.TypeDataModel {
|
|||
),
|
||||
hope: diceField(),
|
||||
fear: diceField(),
|
||||
advantageState: new fields.NumberField({ integer: true }),
|
||||
advantage: diceField(),
|
||||
disadvantage: diceField(),
|
||||
// advantage: diceField(),
|
||||
// disadvantage: diceField(),
|
||||
targets: new fields.ArrayField(
|
||||
new fields.SchemaField({
|
||||
id: new fields.StringField({}),
|
||||
|
|
@ -65,12 +68,13 @@ export default class DHDualityRoll extends foundry.abstract.TypeDataModel {
|
|||
}
|
||||
|
||||
get total() {
|
||||
const advantage = this.advantage.value
|
||||
? this.advantage.value
|
||||
: this.disadvantage.value
|
||||
? -this.disadvantage.value
|
||||
: 0;
|
||||
return this.diceTotal + advantage + this.modifierTotal.value;
|
||||
// const advantage = this.advantage.value
|
||||
// ? this.advantage.value
|
||||
// : this.disadvantage.value
|
||||
// ? -this.disadvantage.value
|
||||
// : 0;
|
||||
// return this.diceTotal + advantage + this.modifierTotal.value;
|
||||
return this.roll.total;
|
||||
}
|
||||
|
||||
get diceTotal() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue