mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 07:36:26 +01:00
Merge branch 'main' into feature/Character-Setup-Rework
This commit is contained in:
commit
8079dec639
42 changed files with 752 additions and 66 deletions
|
|
@ -41,10 +41,14 @@ Hooks.once('init', () => {
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
CONFIG.statusEffects = Object.values(SYSTEM.GENERAL.conditions).map(x => ({
|
CONFIG.statusEffects = [
|
||||||
...x,
|
...CONFIG.statusEffects,
|
||||||
name: game.i18n.localize(x.name)
|
...Object.values(SYSTEM.GENERAL.conditions).map(x => ({
|
||||||
}));
|
...x,
|
||||||
|
name: game.i18n.localize(x.name),
|
||||||
|
systemEffect: true
|
||||||
|
}))
|
||||||
|
];
|
||||||
|
|
||||||
CONFIG.Dice.daggerheart = {
|
CONFIG.Dice.daggerheart = {
|
||||||
DualityDie: DualityDie,
|
DualityDie: DualityDie,
|
||||||
|
|
@ -108,6 +112,8 @@ Hooks.once('init', () => {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CONFIG.Token.hudClass = applications.hud.DHTokenHUD;
|
||||||
|
|
||||||
CONFIG.Combat.dataModels = {
|
CONFIG.Combat.dataModels = {
|
||||||
base: models.DhCombat
|
base: models.DhCombat
|
||||||
};
|
};
|
||||||
|
|
|
||||||
29
lang/en.json
29
lang/en.json
|
|
@ -292,6 +292,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"HUD": {
|
||||||
|
"tokenHUD": {
|
||||||
|
"genericEffects": "Foundry Effects"
|
||||||
|
}
|
||||||
|
},
|
||||||
"Levelup": {
|
"Levelup": {
|
||||||
"actions": {
|
"actions": {
|
||||||
"creatureComfort": {
|
"creatureComfort": {
|
||||||
|
|
@ -981,6 +986,10 @@
|
||||||
"singular": "Character",
|
"singular": "Character",
|
||||||
"plural": "Characters"
|
"plural": "Characters"
|
||||||
},
|
},
|
||||||
|
"Cost": {
|
||||||
|
"single": "Cost",
|
||||||
|
"plural": "Costs"
|
||||||
|
},
|
||||||
"Damage": {
|
"Damage": {
|
||||||
"severe": "Severe",
|
"severe": "Severe",
|
||||||
"major": "Major",
|
"major": "Major",
|
||||||
|
|
@ -1086,6 +1095,7 @@
|
||||||
"specialization": "Specialization",
|
"specialization": "Specialization",
|
||||||
"mastery": "Mastery",
|
"mastery": "Mastery",
|
||||||
"optional": "Optional",
|
"optional": "Optional",
|
||||||
|
"recovery": "Recovery",
|
||||||
"setup": "Setup",
|
"setup": "Setup",
|
||||||
"equipment": "Equipment"
|
"equipment": "Equipment"
|
||||||
},
|
},
|
||||||
|
|
@ -1107,6 +1117,8 @@
|
||||||
"burden": "Burden",
|
"burden": "Burden",
|
||||||
"check": "{check} Check",
|
"check": "{check} Check",
|
||||||
"criticalSuccess": "Critical Success",
|
"criticalSuccess": "Critical Success",
|
||||||
|
"damage": "Damage",
|
||||||
|
"damageType": "Damage Type",
|
||||||
"description": "Description",
|
"description": "Description",
|
||||||
"duality": "Duality",
|
"duality": "Duality",
|
||||||
"dualityRoll": "Duality Roll",
|
"dualityRoll": "Duality Roll",
|
||||||
|
|
@ -1119,17 +1131,25 @@
|
||||||
"inactiveEffects": "Inactive Effects",
|
"inactiveEffects": "Inactive Effects",
|
||||||
"inventory": "Inventory",
|
"inventory": "Inventory",
|
||||||
"level": "Level",
|
"level": "Level",
|
||||||
|
"max": "Max",
|
||||||
"modifier": "Modifier",
|
"modifier": "Modifier",
|
||||||
"multiclass": "Multiclass",
|
"multiclass": "Multiclass",
|
||||||
|
"none": "None",
|
||||||
"quantity": "Quantity",
|
"quantity": "Quantity",
|
||||||
"range": "Range",
|
"range": "Range",
|
||||||
|
"recovery": "Recovery",
|
||||||
|
"scalable": "Scalable",
|
||||||
"stress": "Stress",
|
"stress": "Stress",
|
||||||
"take": "Take",
|
"take": "Take",
|
||||||
"target": "Target",
|
"target": "Target",
|
||||||
"title": "Title",
|
"title": "Title",
|
||||||
|
"true": "True",
|
||||||
"type": "Type",
|
"type": "Type",
|
||||||
"unarmored": "Unarmored",
|
"unarmored": "Unarmored",
|
||||||
"use": "Use"
|
"use": "Use",
|
||||||
|
"used": "Used",
|
||||||
|
"uses": "Uses",
|
||||||
|
"value": "Value"
|
||||||
},
|
},
|
||||||
"ITEMS": {
|
"ITEMS": {
|
||||||
"Ancestry": {
|
"Ancestry": {
|
||||||
|
|
@ -1190,6 +1210,7 @@
|
||||||
"spellcastingTrait": "Spellcasting Trait"
|
"spellcastingTrait": "Spellcasting Trait"
|
||||||
},
|
},
|
||||||
"Weapon": {
|
"Weapon": {
|
||||||
|
"weaponType": "Weapon Type",
|
||||||
"primaryWeapon": "Primary Weapon",
|
"primaryWeapon": "Primary Weapon",
|
||||||
"secondaryWeapon": "Secondary Weapon"
|
"secondaryWeapon": "Secondary Weapon"
|
||||||
}
|
}
|
||||||
|
|
@ -1197,7 +1218,8 @@
|
||||||
"SETTINGS": {
|
"SETTINGS": {
|
||||||
"Appearance": {
|
"Appearance": {
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
"displayFear": { "label": "Fear Display" }
|
"displayFear": { "label": "Fear Display" },
|
||||||
|
"showGenericStatusEffects": { "label": "Show Foundry Status Effects" }
|
||||||
},
|
},
|
||||||
"fearDisplay": {
|
"fearDisplay": {
|
||||||
"token": "Tokens",
|
"token": "Tokens",
|
||||||
|
|
@ -1398,7 +1420,8 @@
|
||||||
"unequip": "Unequip",
|
"unequip": "Unequip",
|
||||||
"sendToVault": "Send to Vault",
|
"sendToVault": "Send to Vault",
|
||||||
"sendToLoadout": "Send to Loadout",
|
"sendToLoadout": "Send to Loadout",
|
||||||
"makeDeathMove": "Make a Death Move"
|
"makeDeathMove": "Make a Death Move",
|
||||||
|
"rangeAndTarget": "Range & Target"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
export * as characterCreation from './characterCreation/_module.mjs';
|
export * as characterCreation from './characterCreation/_module.mjs';
|
||||||
export * as dialogs from './dialogs/_module.mjs';
|
export * as dialogs from './dialogs/_module.mjs';
|
||||||
|
export * as hud from './hud/_module.mjs';
|
||||||
export * as levelup from './levelup/_module.mjs';
|
export * as levelup from './levelup/_module.mjs';
|
||||||
export * as settings from './settings/_module.mjs';
|
export * as settings from './settings/_module.mjs';
|
||||||
export * as sheets from './sheets/_module.mjs';
|
export * as sheets from './sheets/_module.mjs';
|
||||||
|
|
|
||||||
1
module/applications/hud/_module.mjs
Normal file
1
module/applications/hud/_module.mjs
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
export { default as DHTokenHUD } from './tokenHud.mjs';
|
||||||
84
module/applications/hud/tokenHUD.mjs
Normal file
84
module/applications/hud/tokenHUD.mjs
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
export default class DHTokenHUD extends TokenHUD {
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
classes: ['daggerheart']
|
||||||
|
};
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static PARTS = {
|
||||||
|
hud: {
|
||||||
|
root: true,
|
||||||
|
template: 'systems/daggerheart/templates/hud/tokenHUD.hbs'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
async _prepareContext(options) {
|
||||||
|
const context = await super._prepareContext(options);
|
||||||
|
context.systemStatusEffects = Object.keys(context.statusEffects).reduce((acc, key) => {
|
||||||
|
const effect = context.statusEffects[key];
|
||||||
|
if (effect.systemEffect) acc[key] = effect;
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const useGeneric = game.settings.get(
|
||||||
|
CONFIG.DH.id,
|
||||||
|
CONFIG.DH.SETTINGS.gameSettings.appearance
|
||||||
|
).showGenericStatusEffects;
|
||||||
|
context.genericStatusEffects = useGeneric
|
||||||
|
? Object.keys(context.statusEffects).reduce((acc, key) => {
|
||||||
|
const effect = context.statusEffects[key];
|
||||||
|
if (!effect.systemEffect) acc[key] = effect;
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {})
|
||||||
|
: null;
|
||||||
|
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
_getStatusEffectChoices() {
|
||||||
|
// Include all HUD-enabled status effects
|
||||||
|
const choices = {};
|
||||||
|
for (const status of CONFIG.statusEffects) {
|
||||||
|
if (
|
||||||
|
status.hud === false ||
|
||||||
|
(foundry.utils.getType(status.hud) === 'Object' &&
|
||||||
|
status.hud.actorTypes?.includes(this.document.actor.type) === false)
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
choices[status.id] = {
|
||||||
|
_id: status._id,
|
||||||
|
id: status.id,
|
||||||
|
systemEffect: status.systemEffect,
|
||||||
|
title: game.i18n.localize(status.name ?? /** @deprecated since v12 */ status.label),
|
||||||
|
src: status.img ?? /** @deprecated since v12 */ status.icon,
|
||||||
|
isActive: false,
|
||||||
|
isOverlay: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the status of effects which are active for the token actor
|
||||||
|
const activeEffects = this.actor?.effects || [];
|
||||||
|
for (const effect of activeEffects) {
|
||||||
|
for (const statusId of effect.statuses) {
|
||||||
|
const status = choices[statusId];
|
||||||
|
if (!status) continue;
|
||||||
|
if (status._id) {
|
||||||
|
if (status._id !== effect.id) continue;
|
||||||
|
} else {
|
||||||
|
if (effect.statuses.size !== 1) continue;
|
||||||
|
}
|
||||||
|
status.isActive = true;
|
||||||
|
if (effect.getFlag('core', 'overlay')) status.isOverlay = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flag status CSS class
|
||||||
|
for (const status of Object.values(choices)) {
|
||||||
|
status.cssClass = [status.isActive ? 'active' : null, status.isOverlay ? 'overlay' : null].filterJoin(' ');
|
||||||
|
}
|
||||||
|
return choices;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -10,6 +10,7 @@ export default class AdversarySheet extends DHBaseActorSheet {
|
||||||
actions: {
|
actions: {
|
||||||
reactionRoll: AdversarySheet.#reactionRoll,
|
reactionRoll: AdversarySheet.#reactionRoll,
|
||||||
useItem: this.useItem,
|
useItem: this.useItem,
|
||||||
|
useAction: this.useItem,
|
||||||
toChat: this.toChat
|
toChat: this.toChat
|
||||||
},
|
},
|
||||||
window: {
|
window: {
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
levelManagement: CharacterSheet.#levelManagement,
|
levelManagement: CharacterSheet.#levelManagement,
|
||||||
toggleEquipItem: CharacterSheet.#toggleEquipItem,
|
toggleEquipItem: CharacterSheet.#toggleEquipItem,
|
||||||
useItem: this.useItem, //TODO Fix this
|
useItem: this.useItem, //TODO Fix this
|
||||||
|
useAction: this.useAction,
|
||||||
toChat: this.toChat
|
toChat: this.toChat
|
||||||
},
|
},
|
||||||
window: {
|
window: {
|
||||||
|
|
@ -620,6 +621,20 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use an action
|
||||||
|
* @type {ApplicationClickAction}
|
||||||
|
*/
|
||||||
|
static async useAction(event, button) {
|
||||||
|
const item = this.getItem(button);
|
||||||
|
if (!item) return;
|
||||||
|
|
||||||
|
const action = item.system.actions.find(x => x.id === button.dataset.actionId);
|
||||||
|
if (!action) return;
|
||||||
|
|
||||||
|
action.use(event);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send item to Chat
|
* Send item to Chat
|
||||||
* @type {ApplicationClickAction}
|
* @type {ApplicationClickAction}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ export default class DhpEnvironment extends DHBaseActorSheet {
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
useItem: this.useItem,
|
useItem: this.useItem,
|
||||||
|
useAction: this.useItem,
|
||||||
toChat: this.toChat
|
toChat: this.toChat
|
||||||
},
|
},
|
||||||
dragDrop: [{ dragSelector: '.action-section .inventory-item', dropSelector: null }]
|
dragDrop: [{ dragSelector: '.action-section .inventory-item', dropSelector: null }]
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ export const adversaryTypes = {
|
||||||
},
|
},
|
||||||
social: {
|
social: {
|
||||||
id: 'social',
|
id: 'social',
|
||||||
label: 'DAGGERHEART.CONFIG.AdversaryTypee.social.label',
|
label: 'DAGGERHEART.CONFIG.AdversaryType.social.label',
|
||||||
description: 'DAGGERHEART.ACTORS.Adversary.social.description'
|
description: 'DAGGERHEART.ACTORS.Adversary.social.description'
|
||||||
},
|
},
|
||||||
solo: {
|
solo: {
|
||||||
|
|
|
||||||
|
|
@ -180,8 +180,8 @@ export default class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
const actorData = this.actor.getRollData(false);
|
const actorData = this.actor.getRollData(false);
|
||||||
|
|
||||||
// Remove when included directly in Actor getRollData
|
// Remove when included directly in Actor getRollData
|
||||||
actorData.prof = actorData.proficiency?.value ?? 1;
|
actorData.prof = actorData.proficiency?.total ?? 1;
|
||||||
actorData.cast = actorData.spellcast?.value ?? 1;
|
actorData.cast = actorData.spellcast?.total ?? 1;
|
||||||
actorData.result = data.roll?.total ?? 1;
|
actorData.result = data.roll?.total ?? 1;
|
||||||
/* actorData.scale = data.costs?.length
|
/* actorData.scale = data.costs?.length
|
||||||
? data.costs.reduce((a, c) => {
|
? data.costs.reduce((a, c) => {
|
||||||
|
|
|
||||||
|
|
@ -66,10 +66,9 @@ export default class DhCompanion extends BaseDataActor {
|
||||||
damage: {
|
damage: {
|
||||||
parts: [
|
parts: [
|
||||||
{
|
{
|
||||||
multiplier: 'flat',
|
|
||||||
value: {
|
value: {
|
||||||
dice: 'd6',
|
dice: 'd6',
|
||||||
multiplier: 'flat'
|
multiplier: 'prof'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -87,6 +86,12 @@ export default class DhCompanion extends BaseDataActor {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get proficiency() {
|
||||||
|
return {
|
||||||
|
total: this.partner?.system?.proficiency?.total ?? 1
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
prepareBaseData() {
|
prepareBaseData() {
|
||||||
const partnerSpellcastingModifier = this.partner?.system?.spellcastingModifiers?.main;
|
const partnerSpellcastingModifier = this.partner?.system?.spellcastingModifiers?.main;
|
||||||
const spellcastingModifier = this.partner?.system?.traits?.[partnerSpellcastingModifier]?.total;
|
const spellcastingModifier = this.partner?.system?.traits?.[partnerSpellcastingModifier]?.total;
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,12 @@ export default class DHArmor extends BaseDataItem {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get customActions() {
|
||||||
|
return this.actions.filter(
|
||||||
|
action => !this.armorFeatures.some(feature => feature.actionIds.includes(action.id))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
async _preUpdate(changes, options, user) {
|
async _preUpdate(changes, options, user) {
|
||||||
const allowed = await super._preUpdate(changes, options, user);
|
const allowed = await super._preUpdate(changes, options, user);
|
||||||
if (allowed === false) return false;
|
if (allowed === false) return false;
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,12 @@ export default class DHWeapon extends BaseDataItem {
|
||||||
return [this.attack, ...this.actions];
|
return [this.attack, ...this.actions];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get customActions() {
|
||||||
|
return this.actions.filter(
|
||||||
|
action => !this.weaponFeatures.some(feature => feature.actionIds.includes(action.id))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
async _preUpdate(changes, options, user) {
|
async _preUpdate(changes, options, user) {
|
||||||
const allowed = await super._preUpdate(changes, options, user);
|
const allowed = await super._preUpdate(changes, options, user);
|
||||||
if (allowed === false) return false;
|
if (allowed === false) return false;
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,10 @@ export default class DhAppearance extends foundry.abstract.DataModel {
|
||||||
outline: new fields.ColorField({ required: true, initial: '#ffffff' }),
|
outline: new fields.ColorField({ required: true, initial: '#ffffff' }),
|
||||||
edge: new fields.ColorField({ required: true, initial: '#000000' })
|
edge: new fields.ColorField({ required: true, initial: '#000000' })
|
||||||
})
|
})
|
||||||
|
}),
|
||||||
|
showGenericStatusEffects: new fields.BooleanField({
|
||||||
|
initial: true,
|
||||||
|
label: 'DAGGERHEART.SETTINGS.Appearance.FIELDS.showGenericStatusEffects.label'
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ export default class DhRangeMeasurement extends foundry.abstract.DataModel {
|
||||||
static defineSchema() {
|
static defineSchema() {
|
||||||
const fields = foundry.data.fields;
|
const fields = foundry.data.fields;
|
||||||
return {
|
return {
|
||||||
enabled: new fields.BooleanField({ required: true, initial: false, label: 'DAGGERHEART.GENERAL.enabled' }),
|
enabled: new fields.BooleanField({ required: true, initial: true, label: 'DAGGERHEART.GENERAL.enabled' }),
|
||||||
melee: new fields.NumberField({ required: true, initial: 5, label: 'DAGGERHEART.CONFIG.Range.melee.name' }),
|
melee: new fields.NumberField({ required: true, initial: 5, label: 'DAGGERHEART.CONFIG.Range.melee.name' }),
|
||||||
veryClose: new fields.NumberField({
|
veryClose: new fields.NumberField({
|
||||||
required: true,
|
required: true,
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,33 @@ export default class DhTooltipManager extends foundry.helpers.interaction.Toolti
|
||||||
async activate(element, options = {}) {
|
async activate(element, options = {}) {
|
||||||
let html = options.html;
|
let html = options.html;
|
||||||
if (element.dataset.tooltip?.startsWith('#item#')) {
|
if (element.dataset.tooltip?.startsWith('#item#')) {
|
||||||
const item = await foundry.utils.fromUuid(element.dataset.tooltip.slice(6));
|
const splitValues = element.dataset.tooltip.slice(6).split('#action#');
|
||||||
|
const itemUuid = splitValues[0];
|
||||||
|
const actionId = splitValues.length > 1 ? splitValues[1] : null;
|
||||||
|
|
||||||
|
const baseItem = await foundry.utils.fromUuid(itemUuid);
|
||||||
|
const item = actionId ? baseItem.system.actions.find(x => x.id === actionId) : baseItem;
|
||||||
if (item) {
|
if (item) {
|
||||||
|
const type = actionId ? 'action' : item.type;
|
||||||
html = await foundry.applications.handlebars.renderTemplate(
|
html = await foundry.applications.handlebars.renderTemplate(
|
||||||
`systems/daggerheart/templates/ui/tooltip/${item.type}.hbs`,
|
`systems/daggerheart/templates/ui/tooltip/${type}.hbs`,
|
||||||
item
|
{
|
||||||
|
item: item,
|
||||||
|
config: CONFIG.DH
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.tooltip.innerHTML = html;
|
||||||
|
options.direction = this._determineItemTooltipDirection(element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
super.activate(element, { ...options, html: html });
|
super.activate(element, { ...options, html: html });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_determineItemTooltipDirection(element) {
|
||||||
|
const pos = element.getBoundingClientRect();
|
||||||
|
const dirs = this.constructor.TOOLTIP_DIRECTIONS;
|
||||||
|
return dirs[pos.x - this.tooltip.offsetWidth < 0 ? 'DOWN' : 'LEFT'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,47 +1,49 @@
|
||||||
import { getWidthOfText } from './utils.mjs';
|
|
||||||
|
|
||||||
export default class RegisterHandlebarsHelpers {
|
export default class RegisterHandlebarsHelpers {
|
||||||
static registerHelpers() {
|
static registerHelpers() {
|
||||||
Handlebars.registerHelper({
|
Handlebars.registerHelper({
|
||||||
times: this.times,
|
|
||||||
join: this.join,
|
|
||||||
add: this.add,
|
add: this.add,
|
||||||
subtract: this.subtract,
|
|
||||||
includes: this.includes,
|
includes: this.includes,
|
||||||
case: this.case
|
times: this.times,
|
||||||
|
damageFormula: this.damageFormula,
|
||||||
|
damageSymbols: this.damageSymbols,
|
||||||
|
tertiary: this.tertiary,
|
||||||
|
signedNumber: this.signedNumber
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static times(nr, block) {
|
|
||||||
var accum = '';
|
|
||||||
for (var i = 0; i < nr; ++i) accum += block.fn(i);
|
|
||||||
return accum;
|
|
||||||
}
|
|
||||||
|
|
||||||
static join(...options) {
|
|
||||||
return options.slice(0, options.length - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static add(a, b) {
|
static add(a, b) {
|
||||||
const aNum = Number.parseInt(a);
|
const aNum = Number.parseInt(a);
|
||||||
const bNum = Number.parseInt(b);
|
const bNum = Number.parseInt(b);
|
||||||
return (Number.isNaN(aNum) ? 0 : aNum) + (Number.isNaN(bNum) ? 0 : bNum);
|
return (Number.isNaN(aNum) ? 0 : aNum) + (Number.isNaN(bNum) ? 0 : bNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
static subtract(a, b) {
|
|
||||||
const aNum = Number.parseInt(a);
|
|
||||||
const bNum = Number.parseInt(b);
|
|
||||||
return (Number.isNaN(aNum) ? 0 : aNum) - (Number.isNaN(bNum) ? 0 : bNum);
|
|
||||||
}
|
|
||||||
|
|
||||||
static includes(list, item) {
|
static includes(list, item) {
|
||||||
return list.includes(item);
|
return list.includes(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
static case(value, options) {
|
static times(nr, block) {
|
||||||
if (value == this.switch_value) {
|
var accum = '';
|
||||||
this.switch_break = true;
|
for (var i = 0; i < nr; ++i) accum += block.fn(i);
|
||||||
return options.fn(this);
|
return accum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static damageFormula(attack, actor) {
|
||||||
|
const traitTotal = actor.system.traits?.[attack.roll.trait]?.total;
|
||||||
|
const instances = [
|
||||||
|
attack.damage.parts.map(x => Roll.replaceFormulaData(x.value.getFormula(), actor)).join(' + '),
|
||||||
|
traitTotal
|
||||||
|
].filter(x => x);
|
||||||
|
|
||||||
|
return instances.join(traitTotal > 0 ? ' + ' : ' - ');
|
||||||
|
}
|
||||||
|
|
||||||
|
static damageSymbols(damageParts) {
|
||||||
|
const symbols = new Set();
|
||||||
|
damageParts.forEach(part => symbols.add(...CONFIG.DH.GENERAL.damageTypes[part.type].icon));
|
||||||
|
return new Handlebars.SafeString(Array.from(symbols).map(symbol => `<i class="fa-solid ${symbol}"></i>`));
|
||||||
|
}
|
||||||
|
|
||||||
|
static tertiary(a, b) {
|
||||||
|
return a ?? b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ export const preloadHandlebarsTemplates = async function () {
|
||||||
'systems/daggerheart/templates/actionTypes/beastform.hbs',
|
'systems/daggerheart/templates/actionTypes/beastform.hbs',
|
||||||
'systems/daggerheart/templates/settings/components/settings-item-line.hbs',
|
'systems/daggerheart/templates/settings/components/settings-item-line.hbs',
|
||||||
'systems/daggerheart/templates/ui/chat/parts/damage-chat.hbs',
|
'systems/daggerheart/templates/ui/chat/parts/damage-chat.hbs',
|
||||||
'systems/daggerheart/templates/ui/chat/parts/target-chat.hbs'
|
'systems/daggerheart/templates/ui/chat/parts/target-chat.hbs',
|
||||||
|
'systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs'
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ const registerMenuSettings = () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
game.settings.register(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.RangeMeasurement, {
|
game.settings.register(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.RangeMeasurement, {
|
||||||
scope: 'client',
|
scope: 'world',
|
||||||
config: false,
|
config: false,
|
||||||
type: DhRangeMeasurement
|
type: DhRangeMeasurement
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
@import './less/dialog/index.less';
|
@import './less/dialog/index.less';
|
||||||
|
|
||||||
|
@import './less//hud/index.less';
|
||||||
|
|
||||||
@import './less/utils/colors.less';
|
@import './less/utils/colors.less';
|
||||||
@import './less/utils/fonts.less';
|
@import './less/utils/fonts.less';
|
||||||
|
|
||||||
|
|
@ -10,4 +12,6 @@
|
||||||
|
|
||||||
@import './less/ui/index.less';
|
@import './less/ui/index.less';
|
||||||
|
|
||||||
|
@import './less/ux/index.less';
|
||||||
|
|
||||||
@import '../node_modules/@yaireo/tagify/dist/tagify.css';
|
@import '../node_modules/@yaireo/tagify/dist/tagify.css';
|
||||||
|
|
|
||||||
|
|
@ -319,6 +319,17 @@
|
||||||
transform: translateY(-20px);
|
transform: translateY(-20px);
|
||||||
transform-origin: top;
|
transform-origin: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-buttons {
|
||||||
|
grid-column: span 3;
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
button {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.application.setting.dh-style {
|
.application.setting.dh-style {
|
||||||
|
|
|
||||||
1
styles/less/hud/index.less
Normal file
1
styles/less/hud/index.less
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
@import './token-hud/token-hud.less';
|
||||||
10
styles/less/hud/token-hud/token-hud.less
Normal file
10
styles/less/hud/token-hud/token-hud.less
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
.daggerheart.placeable-hud {
|
||||||
|
.col.right {
|
||||||
|
.palette {
|
||||||
|
.palette-category-title {
|
||||||
|
grid-column: span var(--effect-columns);
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
styles/less/ux/index.less
Normal file
1
styles/less/ux/index.less
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
@import './tooltip/tooltip.less';
|
||||||
106
styles/less/ux/tooltip/tooltip.less
Normal file
106
styles/less/ux/tooltip/tooltip.less
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
.daggerheart.dh-style.tooltip {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
|
||||||
|
.tooltip-title {
|
||||||
|
margin: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-image {
|
||||||
|
height: 180px;
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-description {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-sub-title {
|
||||||
|
margin: 0;
|
||||||
|
color: light-dark(@dark-blue, @beige);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-information-section {
|
||||||
|
width: 100%;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 4px;
|
||||||
|
|
||||||
|
&.triple {
|
||||||
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.border {
|
||||||
|
border: 1px solid light-dark(@dark-blue, @golden);
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-information {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2px;
|
||||||
|
|
||||||
|
&.full-width {
|
||||||
|
grid-column: span 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
label,
|
||||||
|
div {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-tags {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
|
||||||
|
.tooltip-tag {
|
||||||
|
width: 100%;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 80px 1fr;
|
||||||
|
align-items: start;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 4px;
|
||||||
|
border: 1px solid light-dark(@dark-blue, @golden);
|
||||||
|
border-radius: 6px;
|
||||||
|
|
||||||
|
.tooltip-tag-label-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 2px;
|
||||||
|
|
||||||
|
.tooltip-tag-image {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-tag-label {
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-tag-description {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.spaced {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
78
templates/hud/tokenHUD.hbs
Normal file
78
templates/hud/tokenHUD.hbs
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
<div class="col left">
|
||||||
|
<div class="attribute elevation" data-tooltip="HUD.Elevation">
|
||||||
|
<i class="fas fa-angle-up"></i>
|
||||||
|
<input type="text" name="elevation" value="{{elevation}}" {{disabled (or locked (and isGamePaused (not isGM)))}}>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" class="control-icon" data-action="sort" data-direction="up" data-tooltip="HUD.ToFront">
|
||||||
|
<img src="{{icons.up}}">
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" class="control-icon" data-action="sort" data-direction="down" data-tooltip="HUD.ToBack">
|
||||||
|
<img src="{{icons.down}}">
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{{#if canConfigure}}
|
||||||
|
<button type="button" class="control-icon" data-action="config" data-tooltip="HUD.OpenConfig">
|
||||||
|
<i class="fa-solid fa-gear" inert></i>
|
||||||
|
</button>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col middle">
|
||||||
|
<div class="attribute bar2">
|
||||||
|
{{#if displayBar2}}
|
||||||
|
<input type="text" name="bar2" value="{{bar2Data.value}}" {{#unless bar2Data.editable}}disabled{{/unless}}>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="attribute bar1">
|
||||||
|
{{#if displayBar1}}
|
||||||
|
<input type="text" name="bar1" value="{{bar1Data.value}}" {{#unless bar1Data.editable}}disabled{{/unless}}>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col right">
|
||||||
|
{{#if isGM}}
|
||||||
|
<button type="button" class="control-icon {{visibilityClass}}" data-action="visibility" data-tooltip="HUD.ToggleVis">
|
||||||
|
<img src="{{icons.visibility}}">
|
||||||
|
</button>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<button type="button" class="control-icon" data-action="togglePalette" data-palette="effects" data-tooltip="HUD.AssignStatusEffects">
|
||||||
|
<img src="{{icons.effects}}">
|
||||||
|
</button>
|
||||||
|
<div class="palette status-effects" data-palette="effects">
|
||||||
|
{{#each systemStatusEffects as |status|}}
|
||||||
|
<img class="effect-control {{status.cssClass}}" src="{{status.src}}" data-action="effect" data-status-id="{{status.id}}" {{#if status.title}}data-tooltip-text="{{status.title}}"{{/if}}>
|
||||||
|
{{/each}}
|
||||||
|
{{#if genericStatusEffects}}
|
||||||
|
<label class="palette-category-title">{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.genericEffects"}}</label>
|
||||||
|
{{#each genericStatusEffects as |status|}}
|
||||||
|
<img class="effect-control {{status.cssClass}}" src="{{status.src}}" data-action="effect" data-status-id="{{status.id}}" {{#if status.title}}data-tooltip-text="{{status.title}}"{{/if}}>
|
||||||
|
{{/each}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" class="control-icon" data-action="togglePalette" data-palette="movementActions" data-tooltip="HUD.SelectMovementAction">
|
||||||
|
<i class="{{movementActionsIcon}}" inert></i>
|
||||||
|
</button>
|
||||||
|
<div class="palette movement-actions" data-palette="movementActions">
|
||||||
|
{{#each movementActions as |action|}}
|
||||||
|
<a class="movement-action-control {{action.cssClass}}" data-action="movementAction" data-movement-action="{{action.id}}">
|
||||||
|
<span>{{#if action.icon}}<i class="{{action.icon}} fa-fw" inert></i>{{/if}} {{action.label}}</span>
|
||||||
|
</a>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" class="control-icon {{targetClass}}" data-action="target" data-tooltip="HUD.ToggleTargetState">
|
||||||
|
<i class="fa-solid fa-bullseye" inert></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{{#if canToggleCombat}}
|
||||||
|
<button type="button" class="control-icon {{combatClass}}" data-action="combat" data-tooltip="HUD.ToggleCombatState">
|
||||||
|
<img src="{{icons.combat}}">
|
||||||
|
</button>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<div>
|
<div>
|
||||||
{{formGroup settingFields.schema.fields.displayFear value=settingFields._source.displayFear localize=true}}
|
{{formGroup settingFields.schema.fields.displayFear value=settingFields._source.displayFear localize=true}}
|
||||||
|
{{formGroup settingFields.schema.fields.showGenericStatusEffects value=settingFields._source.showGenericStatusEffects localize=true}}
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.duality"}}</legend>
|
<legend>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.duality"}}</legend>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#each values}}
|
{{#each values}}
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=this type=../type hideControls=../hideControls }}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=this type=../type hideControls=../hideControls featureType=true }}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
{{#each adversaries as |adversary|}}
|
{{#each adversaries as |adversary|}}
|
||||||
|
|
|
||||||
|
|
@ -171,4 +171,12 @@
|
||||||
<span></span>
|
<span></span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
<div class="item-description">{{#unless isSidebar}}{{{item.system.description}}}{{/unless}}</div>
|
<div class="item-description">{{#unless isSidebar}}{{{item.system.description}}}{{/unless}}</div>
|
||||||
|
|
||||||
|
{{#if featureType}}
|
||||||
|
<div class="item-buttons">
|
||||||
|
{{#each item.system.actions as | action |}}
|
||||||
|
<button type="button" data-action="useAction" data-action-id="{{action.id}}">{{action.name}}</button>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
<div class="action-item"
|
<div class="action-item"
|
||||||
data-action="editAction"
|
data-action="editAction"
|
||||||
data-index="{{index}}"
|
data-index="{{index}}"
|
||||||
|
data-tooltip="{{concat "#item#" @root.document.uuid "#action#" action.id}}"
|
||||||
>
|
>
|
||||||
<img class="image" src="{{action.img}}" />
|
<img class="image" src="{{action.img}}" />
|
||||||
<span>{{action.name}}</span>
|
<span>{{action.name}}</span>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
data-action="editFeature"
|
data-action="editFeature"
|
||||||
id="{{feature.id}}"
|
id="{{feature.id}}"
|
||||||
>
|
>
|
||||||
<img class="image" src="{{feature.img}}" />
|
<img class="image" src="{{feature.img}}" data-tooltip="{{concat "#item#" feature.uuid}}" />
|
||||||
<span>{{feature.name}}</span>
|
<span>{{feature.name}}</span>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<a data-action="removeFeature" id="{{feature.id}}"><i class="fa-solid fa-trash"></i></a>
|
<a data-action="removeFeature" id="{{feature.id}}"><i class="fa-solid fa-trash"></i></a>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<line-div></line-div>
|
<line-div></line-div>
|
||||||
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
|
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
|
||||||
<div class='item-description'>
|
<div class='item-description'>
|
||||||
<h3>{{localize (concat 'TYPES.Item.feature' source.system.type)}}</h3>
|
<h3>{{localize 'TYPES.Item.feature'}}</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
83
templates/ui/tooltip/action.hbs
Normal file
83
templates/ui/tooltip/action.hbs
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
<div class="daggerheart dh-style tooltip">
|
||||||
|
<h2 class="tooltip-title">{{item.name}}</h2>
|
||||||
|
<img class="tooltip-image" src="{{item.img}}" />
|
||||||
|
<div class="tooltip-description">{{{item.description}}}</div>
|
||||||
|
|
||||||
|
{{#if item.uses.max}}
|
||||||
|
<h4 class="tooltip-sub-title">{{localize "DAGGERHEART.GENERAL.uses"}}</h4>
|
||||||
|
<div class="tooltip-information-section triple spaced">
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.used"}}</label>
|
||||||
|
<div>{{item.uses.value}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.max"}}</label>
|
||||||
|
<div>{{item.uses.max}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.recovery"}}</label>
|
||||||
|
{{#with (lookup config.GENERAL.refreshTypes item.uses.recovery) as | type |}}
|
||||||
|
<div>{{localize type.label}}</div>
|
||||||
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if (gt item.cost.length 0)}}
|
||||||
|
<h4 class="tooltip-sub-title">{{localize "DAGGERHEART.GENERAL.Cost.plural"}}</h4>
|
||||||
|
{{#each item.cost as | cost |}}
|
||||||
|
<div class="tooltip-information-section border spaced">
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "Type"}}</label>
|
||||||
|
{{#with (lookup @root.config.GENERAL.abilityCosts cost.type) as | type |}}
|
||||||
|
<div>{{localize type.label}}</div>
|
||||||
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.value"}}</label>
|
||||||
|
<div>{{cost.value}}</div>
|
||||||
|
</div>
|
||||||
|
{{#if cost.scalable}}
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.scalable"}}</label>
|
||||||
|
<div>{{localize "DAGGERHEART.GENERAL.true"}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.value"}}</label>
|
||||||
|
<div>{{cost.step}}</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if (or item.range item.target)}}
|
||||||
|
<h4 class="tooltip-sub-title">{{localize "DAGGERHEART.UI.Tooltip.rangeAndTarget"}}</h4>
|
||||||
|
<div class="tooltip-information-section border spaced">
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.range"}}</label>
|
||||||
|
<div>
|
||||||
|
{{#if item.range}}
|
||||||
|
{{#with (lookup @root.config.GENERAL.range item.range) as | range |}}
|
||||||
|
<div>{{localize range.label}}</div>
|
||||||
|
{{/with}}
|
||||||
|
{{else}}
|
||||||
|
<div>{{localize "DAGGERHEART.GENERAL.none"}}</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.target"}}</label>
|
||||||
|
<div>
|
||||||
|
{{#if item.target.type}}
|
||||||
|
{{#with (lookup @root.config.ACTIONS.targetTypes item.target.type) as | target |}}
|
||||||
|
<div>{{@root.item.target.amount}} {{localize target.label}}</div>
|
||||||
|
{{/with}}
|
||||||
|
{{else}}
|
||||||
|
<div>{{localize "DAGGERHEART.GENERAL.none"}}</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
64
templates/ui/tooltip/adversary.hbs
Normal file
64
templates/ui/tooltip/adversary.hbs
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
<div class="daggerheart dh-style tooltip">
|
||||||
|
<h2 class="tooltip-title">{{item.name}}</h2>
|
||||||
|
<img class="tooltip-image" src="{{item.img}}" />
|
||||||
|
<div class="tooltip-description">{{{item.system.description}}}</div>
|
||||||
|
|
||||||
|
<div class="tooltip-information-section triple spaced">
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.Tiers.singular"}}</label>
|
||||||
|
{{#with (lookup config.GENERAL.tiers item.system.tier) as | tier |}}
|
||||||
|
<div>{{localize tier.label}}</div>
|
||||||
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "Type"}}</label>
|
||||||
|
{{#with (lookup config.ACTOR.adversaryTypes item.system.type) as | type |}}
|
||||||
|
<div>{{localize type.label}}</div>
|
||||||
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.ACTORS.Adversary.FIELDS.difficulty.label"}}</label>
|
||||||
|
<div>{{item.system.difficulty}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information-section spaced">
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.hitPoints"}}</label>
|
||||||
|
<div>{{item.system.resources.hitPoints.max}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.stress"}}</label>
|
||||||
|
<div>{{item.system.resources.stress.max}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.major"}}</label>
|
||||||
|
<div>{{item.system.damageThresholds.major}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.severe"}}</label>
|
||||||
|
<div>{{item.system.damageThresholds.severe}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.attack"}}</label>
|
||||||
|
<div>{{numberFormat item.system.attack.roll.bonus sign=true}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.damage"}}</label>
|
||||||
|
<div>{{damageFormula item.system.attack item}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<strong>{{localize "DAGGERHEART.GENERAL.Experience.plural"}}</strong>
|
||||||
|
{{#each item.system.experiences as | experience |}}
|
||||||
|
<div>{{experience.name}} {{numberFormat experience.total sign=true}}</div>
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
|
<div class="tooltip-information-section">
|
||||||
|
<div class="tooltip-information full-width">
|
||||||
|
<label>{{localize "DAGGERHEART.ACTORS.Adversary.FIELDS.motivesAndTactics.label"}}</label>
|
||||||
|
<div>{{item.system.motivesAndTactics}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{> "systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs" features=item.system.features }}
|
||||||
|
</div>
|
||||||
|
|
@ -1,5 +1,37 @@
|
||||||
<div>
|
<div class="daggerheart dh-style tooltip">
|
||||||
<div>{{name}}</div>
|
<h2 class="tooltip-title">{{item.name}}</h2>
|
||||||
<img src="{{img}}" />
|
<img class="tooltip-image" src="{{item.img}}" />
|
||||||
<div>{{{system.description}}}</div>
|
<div class="tooltip-description">{{{item.system.description}}}</div>
|
||||||
|
|
||||||
|
<div class="tooltip-information-section">
|
||||||
|
<div class="tooltip-information full-width">
|
||||||
|
<label>{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}</label>
|
||||||
|
<div>{{item.system.baseScore}}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.major"}}</label>
|
||||||
|
<div>{{item.system.baseThresholds.major}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.severe"}}</label>
|
||||||
|
<div>{{item.system.baseThresholds.severe}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{#if (gt item.system.armorFeatures.length 0)}}<h4 class="tooltip-sub-title">{{localize "DAGGERHEART.GENERAL.features"}}</h4>{{/if}}
|
||||||
|
<div class="tooltip-tags">
|
||||||
|
{{#each item.system.armorFeatures}}
|
||||||
|
{{#with (lookup ../config.ITEM.armorFeatures this.value) as | feature | }}
|
||||||
|
<div class="tooltip-tag">
|
||||||
|
<div class="tooltip-tag-label-container">
|
||||||
|
<div class="tooltip-tag-label">{{localize feature.label}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-tag-description">{{{localize feature.description}}}</div>
|
||||||
|
</div>
|
||||||
|
{{/with}}
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{> "systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs" features=item.system.customActions label=(localize "DAGGERHEART.GENERAL.Action.plural")}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<div>
|
|
||||||
<div>{{name}}</div>
|
|
||||||
<img src="{{system.tokenImg}}" />
|
|
||||||
<div>{{{system.examples}}}</div>
|
|
||||||
<div>{{system.advantageOn}}</div>
|
|
||||||
</div>
|
|
||||||
14
templates/ui/tooltip/consumable.hbs
Normal file
14
templates/ui/tooltip/consumable.hbs
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<div class="daggerheart dh-style tooltip">
|
||||||
|
<h2 class="tooltip-title">{{item.name}}</h2>
|
||||||
|
<img class="tooltip-image" src="{{item.img}}" />
|
||||||
|
<div class="tooltip-description">{{{item.system.description}}}</div>
|
||||||
|
|
||||||
|
<div class="tooltip-information-section">
|
||||||
|
<div class="tooltip-information full-width">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.quantity"}}</label>
|
||||||
|
<div>{{item.system.quantity}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{> "systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs" features=item.system.actions label=(localize "DAGGERHEART.GENERAL.Action.plural") }}
|
||||||
|
</div>
|
||||||
|
|
@ -1,5 +1,31 @@
|
||||||
<div>
|
<div class="daggerheart dh-style tooltip">
|
||||||
<div>{{name}}</div>
|
<h2 class="tooltip-title">{{item.name}}</h2>
|
||||||
<img src="{{img}}" />
|
<img class="tooltip-image" src="{{item.img}}" />
|
||||||
<div>{{{system.description}}}</div>
|
<div class="tooltip-description">{{{item.system.description}}}</div>
|
||||||
|
|
||||||
|
<div class="tooltip-information-section">
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.Domain.single"}}</label>
|
||||||
|
{{#with (lookup config.DOMAIN.domains item.system.domain) as | domain |}}
|
||||||
|
<div>{{localize domain.label}}</div>
|
||||||
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "Type"}}</label>
|
||||||
|
{{#with (lookup config.DOMAIN.cardTypes item.system.type) as | type |}}
|
||||||
|
<div>{{localize type.label}}</div>
|
||||||
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.level"}}</label>
|
||||||
|
<div>{{item.system.level}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.ITEMS.DomainCard.recallCost"}}</label>
|
||||||
|
<div>{{item.system.recallCost}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{> "systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs" features=item.system.actions label=(localize "DAGGERHEART.GENERAL.Action.plural") }}
|
||||||
</div>
|
</div>
|
||||||
8
templates/ui/tooltip/feature.hbs
Normal file
8
templates/ui/tooltip/feature.hbs
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<div class="daggerheart dh-style tooltip">
|
||||||
|
<h2 class="tooltip-title">{{item.name}}</h2>
|
||||||
|
<img class="tooltip-image" src="{{item.img}}" />
|
||||||
|
<div class="tooltip-description">{{{item.system.description}}}</div>
|
||||||
|
|
||||||
|
{{> "systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs" features=item.system.actions label=(localize "DAGGERHEART.GENERAL.Action.plural") }}
|
||||||
|
{{> "systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs" features=item.effects label=(localize "DAGGERHEART.GENERAL.Effect.plural") }}
|
||||||
|
</div>
|
||||||
7
templates/ui/tooltip/miscellaneous.hbs
Normal file
7
templates/ui/tooltip/miscellaneous.hbs
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<div class="daggerheart dh-style tooltip">
|
||||||
|
<h2 class="tooltip-title">{{item.name}}</h2>
|
||||||
|
<img class="tooltip-image" src="{{item.img}}" />
|
||||||
|
<div class="tooltip-description">{{{item.system.description}}}</div>
|
||||||
|
|
||||||
|
{{> "systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs" features=item.system.actions label=(localize "DAGGERHEART.GENERAL.Action.plural") }}
|
||||||
|
</div>
|
||||||
12
templates/ui/tooltip/parts/tooltipTags.hbs
Normal file
12
templates/ui/tooltip/parts/tooltipTags.hbs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{{#if (gt features.length 0)}}<h4 class="tooltip-sub-title">{{label}}</h4>{{/if}}
|
||||||
|
<div class="tooltip-tags">
|
||||||
|
{{#each features as | feature |}}
|
||||||
|
<div class="tooltip-tag">
|
||||||
|
<div class="tooltip-tag-label-container">
|
||||||
|
<div class="tooltip-tag-label">{{localize feature.name}}</div>
|
||||||
|
{{#if feature.img}}<img class="tooltip-tag-image" src="{{feature.img}}" />{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-tag-description">{{{localize (tertiary feature.description feature.system.description)}}}</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
@ -1,5 +1,56 @@
|
||||||
<div>
|
<div class="daggerheart dh-style tooltip">
|
||||||
<div>{{name}}</div>
|
<h2 class="tooltip-title">{{item.name}}</h2>
|
||||||
<img src="{{img}}" />
|
<img class="tooltip-image" src="{{item.img}}" />
|
||||||
<div>{{{system.description}}}</div>
|
<div class="tooltip-description">{{{item.system.description}}}</div>
|
||||||
|
|
||||||
|
<div class="tooltip-information-section">
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.ITEMS.Weapon.weaponType"}}</label>
|
||||||
|
<div>{{#if item.system.secondaryWeapon}}{{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon"}}{{else}}{{localize "DAGGERHEART.ITEMS.Weapon.primaryWeapon"}}{{/if}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.burden"}}</label>
|
||||||
|
{{#with (lookup config.GENERAL.burden item.system.burden) as | burden |}}
|
||||||
|
<div>{{localize burden.label}}</div>
|
||||||
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
{{#if item.system.attack.roll.trait}}
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.Trait.single"}}</label>
|
||||||
|
{{#with (lookup config.ACTOR.abilities item.system.attack.roll.trait) as | trait |}}
|
||||||
|
<div>{{localize trait.label}}</div>
|
||||||
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.range"}}</label>
|
||||||
|
{{#with (lookup config.GENERAL.range item.system.attack.range) as | range |}}
|
||||||
|
<div>{{localize range.label}}</div>
|
||||||
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.damage"}}</label>
|
||||||
|
<div>{{{damageFormula item.system.attack item.parent}}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-information">
|
||||||
|
<label>{{localize "DAGGERHEART.GENERAL.damageType"}}</label>
|
||||||
|
<div>{{{damageSymbols item.system.attack.damage.parts}}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{#if (gt item.system.weaponFeatures.length 0)}}<h4 class="tooltip-sub-title">{{localize "DAGGERHEART.GENERAL.features"}}</h4>{{/if}}
|
||||||
|
<div class="tooltip-tags">
|
||||||
|
{{#each item.system.weaponFeatures}}
|
||||||
|
{{#with (lookup ../config.ITEM.weaponFeatures this.value) as | feature | }}
|
||||||
|
<div class="tooltip-tag">
|
||||||
|
<div class="tooltip-tag-label-container">
|
||||||
|
<div class="tooltip-tag-label">{{localize feature.label}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="tooltip-tag-description">{{{localize feature.description}}}</div>
|
||||||
|
</div>
|
||||||
|
{{/with}}
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{> "systems/daggerheart/templates/ui/tooltip/parts/tooltipTags.hbs" features=item.system.customActions label=(localize "DAGGERHEART.GENERAL.Action.plural") }}
|
||||||
</div>
|
</div>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue