mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Start on Avoid Death death move
This commit is contained in:
parent
c11a4f617d
commit
e166a408f1
1 changed files with 13 additions and 9 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
import { enrichedFateRoll } from '../../enrichers/FateRollEnricher.mjs';
|
||||||
|
|
||||||
|
|
||||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV2) {
|
export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
@ -40,12 +43,14 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV
|
||||||
|
|
||||||
async handleAvoidDeath() {
|
async handleAvoidDeath() {
|
||||||
console.log("Avoid Death!");
|
console.log("Avoid Death!");
|
||||||
if (game.modules.get('dice-so-nice')?.active) {
|
const target = this.actor.uuid;
|
||||||
|
await enrichedFateRoll({
|
||||||
const { diceSoNice } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance);
|
target,
|
||||||
|
title: "Avoid Death Hope Fate Roll",
|
||||||
const hopeDice = await getDiceSoNicePreset(diceSoNice.hope, 12);
|
label: 'test',
|
||||||
}
|
fateType: "Hope"
|
||||||
|
});
|
||||||
|
console.log("enrichedFateRoll done...");
|
||||||
}
|
}
|
||||||
|
|
||||||
handleRiskItAll() {
|
handleRiskItAll() {
|
||||||
|
|
@ -87,6 +92,8 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV
|
||||||
|
|
||||||
cls.create(msg);
|
cls.create(msg);
|
||||||
|
|
||||||
|
this.close();
|
||||||
|
|
||||||
if (CONFIG.DH.GENERAL.deathMoves.avoidDeath === this.selectedMove) {
|
if (CONFIG.DH.GENERAL.deathMoves.avoidDeath === this.selectedMove) {
|
||||||
this.handleAvoidDeath();
|
this.handleAvoidDeath();
|
||||||
return;
|
return;
|
||||||
|
|
@ -97,8 +104,5 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.close();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue