mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 04:31:07 +01:00
[Feature] ActiveEffect Default Hope/Fear dice (#1522)
* Added ActiveEffect rules for default hope and fear dice * . * Raised system version
This commit is contained in:
parent
d282a81594
commit
3c9ef75645
9 changed files with 180 additions and 16 deletions
|
|
@ -725,6 +725,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
})
|
||||
};
|
||||
const result = await this.document.diceRoll(config);
|
||||
if (!result) return;
|
||||
|
||||
/* This could be avoided by baking config.costs into config.resourceUpdates. Didn't feel like messing with it at the time */
|
||||
const costResources = result.costs
|
||||
|
|
|
|||
|
|
@ -496,6 +496,8 @@ export const diceTypes = {
|
|||
d20: 'd20'
|
||||
};
|
||||
|
||||
export const dieFaces = [4, 6, 8, 10, 12, 20];
|
||||
|
||||
export const multiplierTypes = {
|
||||
prof: 'Proficiency',
|
||||
cast: 'Spellcast',
|
||||
|
|
|
|||
|
|
@ -280,6 +280,24 @@ export default class DhCharacter extends BaseDataActor {
|
|||
})
|
||||
})
|
||||
}),
|
||||
dualityRoll: new fields.SchemaField({
|
||||
defaultHopeDice: new fields.NumberField({
|
||||
nullable: false,
|
||||
required: true,
|
||||
integer: true,
|
||||
choices: CONFIG.DH.GENERAL.dieFaces,
|
||||
initial: 12,
|
||||
label: 'DAGGERHEART.ACTORS.Character.defaultHopeDice'
|
||||
}),
|
||||
defaultFearDice: new fields.NumberField({
|
||||
nullable: false,
|
||||
required: true,
|
||||
integer: true,
|
||||
choices: CONFIG.DH.GENERAL.dieFaces,
|
||||
initial: 12,
|
||||
label: 'DAGGERHEART.ACTORS.Character.defaultFearDice'
|
||||
})
|
||||
}),
|
||||
runeWard: new fields.BooleanField({ initial: false }),
|
||||
burden: new fields.SchemaField({
|
||||
ignore: new fields.BooleanField()
|
||||
|
|
|
|||
|
|
@ -130,9 +130,12 @@ export default class DualityRoll extends D20Roll {
|
|||
this.terms = [this.terms[0], this.terms[1], this.terms[2]];
|
||||
return;
|
||||
}
|
||||
this.terms[0] = new foundry.dice.terms.Die({ faces: 12 });
|
||||
|
||||
const { defaultHopeDice, defaultFearDice } = this.data.rules.dualityRoll;
|
||||
|
||||
this.terms[0] = new foundry.dice.terms.Die({ faces: defaultHopeDice });
|
||||
this.terms[1] = new foundry.dice.terms.OperatorTerm({ operator: '+' });
|
||||
this.terms[2] = new foundry.dice.terms.Die({ faces: 12 });
|
||||
this.terms[2] = new foundry.dice.terms.Die({ faces: defaultFearDice });
|
||||
}
|
||||
|
||||
applyAdvantage() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue