mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Feature] Countdown Actions (#1302)
* Added countdown actions * Added a CountdownAutomation setting to enable/disable countdown automation * Added Looping * Added characterSpotlight automation * Countdown max as formula to enable random countdowns * Updated compendiums with countdowns * . * Fixed lightmode colouration * Raised system version * Added automation for ActionRolls on countdowns * Added automation on fear to countdowns * Corrected attackAction countdown automation * Added initial countdown upon creating a CountdownAction * Improved ActionCountdown initial name to be 'Start Countdown'
This commit is contained in:
parent
0233979a9f
commit
207220ff7b
54 changed files with 1742 additions and 635 deletions
|
|
@ -44,18 +44,30 @@ export default class CountdownEdit extends HandlebarsApplicationMixin(Applicatio
|
|||
context.ownershipDefaultOptions = CONFIG.DH.GENERAL.basicOwnershiplevels;
|
||||
context.defaultOwnership = this.data.defaultOwnership;
|
||||
context.countdownBaseTypes = CONFIG.DH.GENERAL.countdownBaseTypes;
|
||||
context.countdownTypes = CONFIG.DH.GENERAL.countdownTypes;
|
||||
context.countdownProgressionTypes = CONFIG.DH.GENERAL.countdownProgressionTypes;
|
||||
context.countdownLoopingTypes = CONFIG.DH.GENERAL.countdownLoopingTypes;
|
||||
context.hideNewCountdowns = this.hideNewCountdowns;
|
||||
context.countdowns = Object.keys(this.data.countdowns).reduce((acc, key) => {
|
||||
const countdown = this.data.countdowns[key];
|
||||
const isLooping = countdown.progress.looping !== CONFIG.DH.GENERAL.countdownLoopingTypes.noLooping;
|
||||
const loopTooltip = isLooping
|
||||
? countdown.progress.looping === CONFIG.DH.GENERAL.countdownLoopingTypes.increasing.id
|
||||
? 'DAGGERHEART.UI.Countdowns.increasingLoop'
|
||||
: countdown.progress.looping === CONFIG.DH.GENERAL.countdownLoopingTypes.decreasing.id
|
||||
? 'DAGGERHEART.UI.Countdowns.decreasingLoop'
|
||||
: 'DAGGERHEART.UI.Countdowns.loop'
|
||||
: null;
|
||||
acc[key] = {
|
||||
...countdown,
|
||||
typeName: game.i18n.localize(CONFIG.DH.GENERAL.countdownBaseTypes[countdown.type].name),
|
||||
typeName: game.i18n.localize(CONFIG.DH.GENERAL.countdownBaseTypes[countdown.type].label),
|
||||
progress: {
|
||||
...countdown.progress,
|
||||
typeName: game.i18n.localize(CONFIG.DH.GENERAL.countdownTypes[countdown.progress.type].label)
|
||||
typeName: game.i18n.localize(
|
||||
CONFIG.DH.GENERAL.countdownProgressionTypes[countdown.progress.type].label
|
||||
)
|
||||
},
|
||||
editing: this.editingCountdowns.has(key)
|
||||
editing: this.editingCountdowns.has(key),
|
||||
loopTooltip
|
||||
};
|
||||
|
||||
return acc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue