diff --git a/module/dice/dualityRoll.mjs b/module/dice/dualityRoll.mjs index 813c913b..2d686f05 100644 --- a/module/dice/dualityRoll.mjs +++ b/module/dice/dualityRoll.mjs @@ -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, diff --git a/module/dice/fateRoll.mjs b/module/dice/fateRoll.mjs index 783691a8..14b76c7e 100644 --- a/module/dice/fateRoll.mjs +++ b/module/dice/fateRoll.mjs @@ -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; diff --git a/module/enrichers/FateRollEnricher.mjs b/module/enrichers/FateRollEnricher.mjs index 997315eb..2fa8abb6 100644 --- a/module/enrichers/FateRollEnricher.mjs +++ b/module/enrichers/FateRollEnricher.mjs @@ -19,7 +19,6 @@ function getFateMessage(roll, flavor) { data-title="${label}" data-label="${dataLabel}" data-hope="${roll?.hope ?? 'd12'}" - data-fear="${roll?.fear ?? 'd12'}" ${label} `; diff --git a/templates/ui/chat/parts/roll-part.hbs b/templates/ui/chat/parts/roll-part.hbs index 8e88015f..20fbfb84 100644 --- a/templates/ui/chat/parts/roll-part.hbs +++ b/templates/ui/chat/parts/roll-part.hbs @@ -29,58 +29,77 @@
- {{#if roll.hope}} -
- -
- {{#if roll.hope.rerolled.any}}{{/if}} - {{roll.hope.value}} -
-
-
- -
- {{#if roll.fear.rerolled.any}}{{/if}} - {{roll.fear.value}} -
-
- {{#if roll.advantage.type}} -
- {{#if (eq roll.advantage.type 1)}} - -
{{roll.advantage.value}}
- {{else}} - -
{{roll.advantage.value}}
- {{/if}} -
- {{/if}} - {{#if roll.rally.dice}} -
- -
{{roll.rally.value}}
-
- {{/if}} - {{#each roll.extra}} - {{#each results}} - {{#unless discarded}} -
- -
{{result}}
-
- {{/unless}} - {{/each}} - {{/each}} - {{else}} - {{#each roll.dice}} - {{#each results}} -
-
- {{result}} -
+ {{#if roll.fate}} + {{#if (eq roll.fate.fateDie "Hope")}} +
+ +
+ {{roll.fate.value}}
+
+ {{/if}} + {{#if (eq roll.fate.fateDie "Fear")}} +
+ +
+ {{roll.fate.value}} +
+
+ {{/if}} + {{else}} + {{#if roll.hope}} +
+ +
+ {{#if roll.hope.rerolled.any}}{{/if}} + {{roll.hope.value}} +
+
+
+ +
+ {{#if roll.fear.rerolled.any}}{{/if}} + {{roll.fear.value}} +
+
+ {{#if roll.advantage.type}} +
+ {{#if (eq roll.advantage.type 1)}} + +
{{roll.advantage.value}}
+ {{else}} + +
{{roll.advantage.value}}
+ {{/if}} +
+ {{/if}} + {{#if roll.rally.dice}} +
+ +
{{roll.rally.value}}
+
+ {{/if}} + {{#each roll.extra}} + {{#each results}} + {{#unless discarded}} +
+ +
{{result}}
+
+ {{/unless}} + {{/each}} {{/each}} - {{/each}} + {{else}} + {{#each roll.dice}} + {{#each results}} +
+
+ {{result}} +
+
+ {{/each}} + {{/each}} + {{/if}} {{/if}}
@@ -89,4 +108,4 @@
{{/unless}} - \ No newline at end of file +