mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Risk It All - critical roll - clear all stress and HP
This commit is contained in:
parent
ef6afc6e66
commit
47f161a19b
2 changed files with 15 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
context.roll = this.roll;
|
context.roll = this.roll;
|
||||||
context.rollType = this.roll?.constructor.name;
|
context.rollType = this.roll?.constructor.name;
|
||||||
context.rallyDie = this.roll.rallyChoices;
|
context.rallyDie = this.roll.rallyChoices;
|
||||||
const experiences = this.config.data?.system.experiences || {};
|
const experiences = this.config.data?.system?.experiences || {};
|
||||||
context.experiences = Object.keys(experiences).map(id => ({
|
context.experiences = Object.keys(experiences).map(id => ({
|
||||||
id,
|
id,
|
||||||
...experiences[id]
|
...experiences[id]
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,20 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV
|
||||||
|
|
||||||
if (config.roll.isCritical) {
|
if (config.roll.isCritical) {
|
||||||
console.log("Clear all stress and HP");
|
console.log("Clear all stress and HP");
|
||||||
|
await this.actor.update(
|
||||||
|
{
|
||||||
|
system: {
|
||||||
|
resources: {
|
||||||
|
hitPoints: {
|
||||||
|
value: 0
|
||||||
|
},
|
||||||
|
stress: {
|
||||||
|
value: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue