mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Fix chat message display; start moving towards supporting Hope and Fear for Fate roll
This commit is contained in:
parent
fda1581c51
commit
bfd8031ecf
4 changed files with 81 additions and 54 deletions
|
|
@ -119,6 +119,7 @@ export default class DualityRoll extends D20Roll {
|
|||
|
||||
/** @inheritDoc */
|
||||
static fromData(data) {
|
||||
console.log("data", data);
|
||||
data.terms[0].class = foundry.dice.terms.Die.name;
|
||||
data.terms[2].class = foundry.dice.terms.Die.name;
|
||||
return super.fromData(data);
|
||||
|
|
@ -174,6 +175,9 @@ export default class DualityRoll extends D20Roll {
|
|||
|
||||
static async buildEvaluate(roll, config = {}, message = {}) {
|
||||
await super.buildEvaluate(roll, config, message);
|
||||
console.log("roll", config);
|
||||
console.log("config", config);
|
||||
console.log("message", message);
|
||||
|
||||
await setDiceSoNiceForDualityRoll(
|
||||
roll,
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ export default class FateRoll extends D20Roll {
|
|||
|
||||
/** @inheritDoc */
|
||||
static fromData(data) {
|
||||
console.log("data", data);
|
||||
data.terms[0].class = foundry.dice.terms.Die.name;
|
||||
return super.fromData(data);
|
||||
}
|
||||
|
|
@ -59,19 +60,23 @@ export default class FateRoll extends D20Roll {
|
|||
|
||||
static async buildEvaluate(roll, config = {}, message = {}) {
|
||||
await super.buildEvaluate(roll, config, message);
|
||||
console.log("roll", config);
|
||||
console.log("config", config);
|
||||
console.log("message", message);
|
||||
|
||||
await setDiceSoNiceForFateRoll(
|
||||
roll,
|
||||
config.roll.hope.dice
|
||||
config.roll.fate.dice
|
||||
);
|
||||
}
|
||||
|
||||
static postEvaluate(roll, config = {}) {
|
||||
const data = super.postEvaluate(roll, config);
|
||||
|
||||
data.hope = {
|
||||
data.fate = {
|
||||
dice: roll.dHope.denomination,
|
||||
value: roll.dHope.total,
|
||||
fateDie: roll.fateDie
|
||||
};
|
||||
|
||||
return data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue