mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Merge fae7efd023 into 0b343c9f52
This commit is contained in:
commit
54b0cda45a
20 changed files with 647 additions and 155 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { diceTypes, getDiceSoNicePresets, range } from '../config/generalConfig.mjs';
|
||||
import { diceTypes, getDiceSoNicePresets, getDiceSoNicePreset, range } from '../config/generalConfig.mjs';
|
||||
import Tagify from '@yaireo/tagify';
|
||||
|
||||
export const capitalize = string => {
|
||||
|
|
@ -69,6 +69,20 @@ export const setDiceSoNiceForDualityRoll = async (rollResult, advantageState, ho
|
|||
}
|
||||
};
|
||||
|
||||
export const setDiceSoNiceForHopeFateRoll = async (rollResult, hopeFaces) => {
|
||||
if (!game.modules.get('dice-so-nice')?.active) return;
|
||||
const { diceSoNice } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance);
|
||||
const diceSoNicePresets = await getDiceSoNicePreset(diceSoNice.hope, hopeFaces);
|
||||
rollResult.dice[0].options = diceSoNicePresets;
|
||||
};
|
||||
|
||||
export const setDiceSoNiceForFearFateRoll = async (rollResult, fearFaces) => {
|
||||
if (!game.modules.get('dice-so-nice')?.active) return;
|
||||
const { diceSoNice } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance);
|
||||
const diceSoNicePresets = await getDiceSoNicePreset(diceSoNice.fear, fearFaces);
|
||||
rollResult.dice[0].options = diceSoNicePresets;
|
||||
};
|
||||
|
||||
export const chunkify = (array, chunkSize, mappingFunc) => {
|
||||
var chunkifiedArray = [];
|
||||
for (let i = 0; i < array.length; i += chunkSize) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue