mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Merged with v14-Dev
This commit is contained in:
commit
4332a1ba7a
613 changed files with 4618 additions and 2996 deletions
|
|
@ -11,3 +11,4 @@ export * as settingsConfig from './settingsConfig.mjs';
|
|||
export * as systemConfig from './system.mjs';
|
||||
export * as itemBrowserConfig from './itemBrowserConfig.mjs';
|
||||
export * as triggerConfig from './triggerConfig.mjs';
|
||||
export * as resourceConfig from './resourceConfig.mjs';
|
||||
|
|
|
|||
|
|
@ -35,6 +35,12 @@ export const actionTypes = {
|
|||
icon: 'fa-ghost',
|
||||
tooltip: 'DAGGERHEART.ACTIONS.TYPES.summon.tooltip'
|
||||
},
|
||||
transform: {
|
||||
id: 'transform',
|
||||
name: 'DAGGERHEART.ACTIONS.TYPES.transform.name',
|
||||
icon: 'fa-dragon',
|
||||
tooltip: 'DAGGERHEART.ACTIONS.TYPES.transform.tooltip'
|
||||
},
|
||||
effect: {
|
||||
id: 'effect',
|
||||
name: 'DAGGERHEART.ACTIONS.TYPES.effect.name',
|
||||
|
|
|
|||
|
|
@ -55,24 +55,6 @@ export const abilities = {
|
|||
}
|
||||
};
|
||||
|
||||
export const scrollingTextResource = {
|
||||
hitPoints: {
|
||||
label: 'DAGGERHEART.GENERAL.HitPoints.plural',
|
||||
reversed: true
|
||||
},
|
||||
stress: {
|
||||
label: 'DAGGERHEART.GENERAL.stress',
|
||||
reversed: true
|
||||
},
|
||||
hope: {
|
||||
label: 'DAGGERHEART.GENERAL.hope'
|
||||
},
|
||||
armor: {
|
||||
label: 'DAGGERHEART.GENERAL.armor',
|
||||
reversed: true
|
||||
}
|
||||
};
|
||||
|
||||
export const featureProperties = {
|
||||
agility: {
|
||||
name: 'DAGGERHEART.CONFIG.Traits.agility.name',
|
||||
|
|
|
|||
|
|
@ -245,8 +245,8 @@ export const defaultRestOptions = {
|
|||
type: 'friendly'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
hitPoints: {
|
||||
applyTo: healingTypes.hitPoints.id,
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -255,7 +255,7 @@ export const defaultRestOptions = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -279,8 +279,8 @@ export const defaultRestOptions = {
|
|||
type: 'self'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
stress: {
|
||||
applyTo: healingTypes.stress.id,
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -289,7 +289,7 @@ export const defaultRestOptions = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -314,8 +314,8 @@ export const defaultRestOptions = {
|
|||
type: 'friendly'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
armor: {
|
||||
applyTo: healingTypes.armor.id,
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -324,7 +324,7 @@ export const defaultRestOptions = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -348,8 +348,8 @@ export const defaultRestOptions = {
|
|||
type: 'self'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
hope: {
|
||||
applyTo: healingTypes.hope.id,
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -358,7 +358,7 @@ export const defaultRestOptions = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
prepareWithFriends: {
|
||||
|
|
@ -372,8 +372,8 @@ export const defaultRestOptions = {
|
|||
type: 'self'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
hope: {
|
||||
applyTo: healingTypes.hope.id,
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -382,7 +382,7 @@ export const defaultRestOptions = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -409,8 +409,8 @@ export const defaultRestOptions = {
|
|||
type: 'friendly'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
hitPoints: {
|
||||
applyTo: healingTypes.hitPoints.id,
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -419,7 +419,7 @@ export const defaultRestOptions = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -443,8 +443,8 @@ export const defaultRestOptions = {
|
|||
type: 'self'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
stress: {
|
||||
applyTo: healingTypes.stress.id,
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -453,7 +453,7 @@ export const defaultRestOptions = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -478,8 +478,8 @@ export const defaultRestOptions = {
|
|||
type: 'friendly'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
armor: {
|
||||
applyTo: healingTypes.armor.id,
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -488,7 +488,7 @@ export const defaultRestOptions = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -512,8 +512,8 @@ export const defaultRestOptions = {
|
|||
type: 'self'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
hope: {
|
||||
applyTo: healingTypes.hope.id,
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -522,7 +522,7 @@ export const defaultRestOptions = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
prepareWithFriends: {
|
||||
|
|
@ -536,8 +536,8 @@ export const defaultRestOptions = {
|
|||
type: 'self'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
hope: {
|
||||
applyTo: healingTypes.hope.id,
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -546,7 +546,7 @@ export const defaultRestOptions = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -634,7 +634,95 @@ export const diceSetNumbers = {
|
|||
flat: 'Flat'
|
||||
};
|
||||
|
||||
export const getDiceSoNicePreset = async (type, faces) => {
|
||||
export const diceSoNiceSFXClasses = {
|
||||
PlayAnimationBright: {
|
||||
id: 'PlayAnimationBright',
|
||||
label: 'DICESONICE.PlayAnimationBright'
|
||||
},
|
||||
PlayAnimationDark: {
|
||||
id: 'PlayAnimationDark',
|
||||
label: 'DICESONICE.PlayAnimationDark'
|
||||
},
|
||||
PlayAnimationOutline: {
|
||||
id: 'PlayAnimationOutline',
|
||||
label: 'DICESONICE.PlayAnimationOutline'
|
||||
},
|
||||
PlayAnimationImpact: {
|
||||
id: 'PlayAnimationImpact',
|
||||
label: 'DICESONICE.PlayAnimationImpact'
|
||||
},
|
||||
// PlayConfettiStrength1: {
|
||||
// id: 'PlayConfettiStrength1',
|
||||
// label: 'DICESONICE.PlayConfettiStrength1'
|
||||
// },
|
||||
// PlayConfettiStrength2: {
|
||||
// id: 'PlayConfettiStrength2',
|
||||
// label: 'DICESONICE.PlayConfettiStrength2'
|
||||
// },
|
||||
// PlayConfettiStrength3: {
|
||||
// id: 'PlayConfettiStrength3',
|
||||
// label: 'DICESONICE.PlayConfettiStrength3'
|
||||
// },
|
||||
PlayAnimationThormund: {
|
||||
id: 'PlayAnimationThormund',
|
||||
label: 'DICESONICE.PlayAnimationThormund'
|
||||
},
|
||||
PlayAnimationParticleSpiral: {
|
||||
id: 'PlayAnimationParticleSpiral',
|
||||
label: 'DICESONICE.PlayAnimationParticleSpiral'
|
||||
},
|
||||
PlayAnimationParticleSparkles: {
|
||||
id: 'PlayAnimationParticleSparkles',
|
||||
label: 'DICESONICE.PlayAnimationParticleSparkles'
|
||||
},
|
||||
PlayAnimationParticleVortex: {
|
||||
id: 'PlayAnimationParticleVortex',
|
||||
label: 'DICESONICE.PlayAnimationParticleVortex'
|
||||
},
|
||||
PlaySoundEpicWin: {
|
||||
id: 'PlaySoundEpicWin',
|
||||
label: 'DICESONICE.PlaySoundEpicWin'
|
||||
},
|
||||
PlaySoundEpicFail: {
|
||||
id: 'PlaySoundEpicFail',
|
||||
label: 'DICESONICE.PlaySoundEpicFail'
|
||||
}
|
||||
// "PlaySoundCustom",
|
||||
// "PlayMacro"
|
||||
};
|
||||
|
||||
export const daggerheartDiceAnimationEvents = {
|
||||
critical: {
|
||||
id: 'critical',
|
||||
label: 'DAGGERHEART.CONFIG.DaggerheartDiceAnimationEvents.critical.name'
|
||||
},
|
||||
higher: {
|
||||
id: 'higher',
|
||||
label: 'DAGGERHEART.CONFIG.DaggerheartDiceAnimationEvents.higher.name'
|
||||
}
|
||||
};
|
||||
|
||||
const getDiceSoNiceSFX = sfxOptions => {
|
||||
const diceSoNice = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance).diceSoNiceData;
|
||||
const criticalAnimationData = diceSoNice.sfx.critical;
|
||||
if (sfxOptions.critical && criticalAnimationData.class) {
|
||||
return {
|
||||
specialEffect: criticalAnimationData.class,
|
||||
options: {}
|
||||
};
|
||||
}
|
||||
|
||||
if (sfxOptions.higher && sfxOptions.data.higher) {
|
||||
return {
|
||||
specialEffect: sfxOptions.data.higher.class,
|
||||
options: {}
|
||||
};
|
||||
}
|
||||
|
||||
return {};
|
||||
};
|
||||
|
||||
export const getDiceSoNicePreset = async (type, faces, sfxOptions = {}) => {
|
||||
const system = game.dice3d.DiceFactory.systems.get(type.system).dice.get(faces);
|
||||
if (!system) {
|
||||
ui.notifications.error(
|
||||
|
|
@ -657,16 +745,33 @@ export const getDiceSoNicePreset = async (type, faces) => {
|
|||
appearance: {
|
||||
...system.appearance,
|
||||
...type
|
||||
}
|
||||
},
|
||||
sfx: getDiceSoNiceSFX(sfxOptions)
|
||||
};
|
||||
};
|
||||
|
||||
export const getDiceSoNicePresets = async (hopeFaces, fearFaces, advantageFaces = 'd6', disadvantageFaces = 'd6') => {
|
||||
const { diceSoNice } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance);
|
||||
export const getDiceSoNicePresets = async (
|
||||
result,
|
||||
hopeFaces,
|
||||
fearFaces,
|
||||
advantageFaces = 'd6',
|
||||
disadvantageFaces = 'd6'
|
||||
) => {
|
||||
const diceSoNice = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance).diceSoNiceData;
|
||||
|
||||
const { isCritical, withHope, withFear } = result;
|
||||
|
||||
return {
|
||||
hope: await getDiceSoNicePreset(diceSoNice.hope, hopeFaces),
|
||||
fear: await getDiceSoNicePreset(diceSoNice.fear, fearFaces),
|
||||
hope: await getDiceSoNicePreset(diceSoNice.hope, hopeFaces, {
|
||||
critical: isCritical,
|
||||
higher: withHope,
|
||||
data: diceSoNice.hope.sfx
|
||||
}),
|
||||
fear: await getDiceSoNicePreset(diceSoNice.fear, fearFaces, {
|
||||
critical: isCritical,
|
||||
higher: withFear,
|
||||
data: diceSoNice.fear.sfx
|
||||
}),
|
||||
advantage: await getDiceSoNicePreset(diceSoNice.advantage, advantageFaces),
|
||||
disadvantage: await getDiceSoNicePreset(diceSoNice.disadvantage, disadvantageFaces)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
export const hooksConfig = {
|
||||
effectDisplayToggle: 'DHEffectDisplayToggle'
|
||||
effectDisplayToggle: 'DHEffectDisplayToggle',
|
||||
lockedTooltipDismissed: 'DHLockedTooltipDismissed'
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ export const armorFeatures = {
|
|||
type: 'hostile'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
stress: {
|
||||
applyTo: 'stress',
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -24,7 +24,7 @@ export const armorFeatures = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -739,8 +739,8 @@ export const weaponFeatures = {
|
|||
type: 'hostile'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
stress: {
|
||||
applyTo: 'stress',
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -749,7 +749,7 @@ export const weaponFeatures = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
@ -936,8 +936,8 @@ export const weaponFeatures = {
|
|||
type: 'self'
|
||||
},
|
||||
damage: {
|
||||
parts: [
|
||||
{
|
||||
parts: {
|
||||
hitPoints: {
|
||||
applyTo: 'hitPoints',
|
||||
value: {
|
||||
custom: {
|
||||
|
|
@ -946,7 +946,7 @@ export const weaponFeatures = {
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
88
module/config/resourceConfig.mjs
Normal file
88
module/config/resourceConfig.mjs
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
/**
|
||||
* Full custom typing:
|
||||
* id
|
||||
* initial
|
||||
* max
|
||||
* reverse
|
||||
* label
|
||||
* images {
|
||||
* full { value, isIcon, noColorFilter }
|
||||
* empty { value, isIcon noColorFilter }
|
||||
* }
|
||||
*/
|
||||
|
||||
const characterBaseResources = Object.freeze({
|
||||
hitPoints: {
|
||||
id: 'hitPoints',
|
||||
initial: 0,
|
||||
max: 0,
|
||||
reverse: true,
|
||||
label: 'DAGGERHEART.GENERAL.HitPoints.plural',
|
||||
maxLabel: 'DAGGERHEART.ACTORS.Character.maxHPBonus'
|
||||
},
|
||||
stress: {
|
||||
id: 'stress',
|
||||
initial: 0,
|
||||
max: 6,
|
||||
reverse: true,
|
||||
label: 'DAGGERHEART.GENERAL.stress'
|
||||
},
|
||||
hope: {
|
||||
id: 'hope',
|
||||
initial: 2,
|
||||
reverse: false,
|
||||
label: 'DAGGERHEART.GENERAL.hope'
|
||||
}
|
||||
});
|
||||
|
||||
const adversaryBaseResources = Object.freeze({
|
||||
hitPoints: {
|
||||
id: 'hitPoints',
|
||||
initial: 0,
|
||||
max: 0,
|
||||
reverse: true,
|
||||
label: 'DAGGERHEART.GENERAL.HitPoints.plural',
|
||||
maxLabel: 'DAGGERHEART.ACTORS.Character.maxHPBonus'
|
||||
},
|
||||
stress: {
|
||||
id: 'stress',
|
||||
initial: 0,
|
||||
max: 0,
|
||||
reverse: true,
|
||||
label: 'DAGGERHEART.GENERAL.stress'
|
||||
}
|
||||
});
|
||||
|
||||
const companionBaseResources = Object.freeze({
|
||||
stress: {
|
||||
id: 'stress',
|
||||
initial: 0,
|
||||
max: 0,
|
||||
reverse: true,
|
||||
label: 'DAGGERHEART.GENERAL.stress'
|
||||
},
|
||||
hope: {
|
||||
id: 'hope',
|
||||
initial: 0,
|
||||
reverse: false,
|
||||
label: 'DAGGERHEART.GENERAL.hope'
|
||||
}
|
||||
});
|
||||
|
||||
export const character = {
|
||||
base: characterBaseResources,
|
||||
custom: {}, // module stuff goes here
|
||||
all: { ...characterBaseResources }
|
||||
};
|
||||
|
||||
export const adversary = {
|
||||
base: adversaryBaseResources,
|
||||
custom: {}, // module stuff goes here
|
||||
all: { ...adversaryBaseResources }
|
||||
};
|
||||
|
||||
export const companion = {
|
||||
base: companionBaseResources,
|
||||
custom: {}, // module stuff goes here
|
||||
all: { ...companionBaseResources }
|
||||
};
|
||||
|
|
@ -3,6 +3,10 @@ export const menu = {
|
|||
Name: 'GameSettingsAutomation',
|
||||
Icon: 'fa-solid fa-robot'
|
||||
},
|
||||
Metagaming: {
|
||||
Name: 'GameSettingsMetagaming',
|
||||
Icon: 'fa-solid fa-eye-low-vision'
|
||||
},
|
||||
Homebrew: {
|
||||
Name: 'GameSettingsHomebrew',
|
||||
Icon: 'fa-solid fa-flask-vial'
|
||||
|
|
@ -19,8 +23,10 @@ export const menu = {
|
|||
|
||||
export const gameSettings = {
|
||||
Automation: 'Automation',
|
||||
Metagaming: 'Metagaming',
|
||||
Homebrew: 'Homebrew',
|
||||
appearance: 'Appearance',
|
||||
GlobalOverrides: 'GlobalOverrides',
|
||||
variantRules: 'VariantRules',
|
||||
Resources: {
|
||||
Fear: 'ResourcesFear'
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import * as GENERAL from './generalConfig.mjs';
|
|||
import * as DOMAIN from './domainConfig.mjs';
|
||||
import * as ENCOUNTER from './encounterConfig.mjs';
|
||||
import * as ACTOR from './actorConfig.mjs';
|
||||
import * as RESOURCE from './resourceConfig.mjs';
|
||||
import * as ITEM from './itemConfig.mjs';
|
||||
import * as SETTINGS from './settingsConfig.mjs';
|
||||
import * as EFFECTS from './effectConfig.mjs';
|
||||
|
|
@ -19,6 +20,7 @@ export const SYSTEM = {
|
|||
GENERAL,
|
||||
DOMAIN,
|
||||
ACTOR,
|
||||
RESOURCE,
|
||||
ITEM,
|
||||
SETTINGS,
|
||||
EFFECTS,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue