Compare commits

..

No commits in common. "1e30d4973bc5c0b5d36b65be97be8ca1299634f7" and "47ac1ec094a759b0e032e7b426724c2194c79eda" have entirely different histories.

28 changed files with 1308 additions and 1185 deletions

23
daggerheart.d.ts vendored
View file

@ -4,15 +4,6 @@ import '@common/primitives/global.mjs';
import Canvas from '@client/canvas/board.mjs'; import Canvas from '@client/canvas/board.mjs';
import { ResourceUpdateMap } from './module/data/action/baseAction.mjs'; import { ResourceUpdateMap } from './module/data/action/baseAction.mjs';
import * as applications from './module/applications/_module.mjs';
import * as data from './module/data/_module.mjs';
import * as models from './module/data/_module.mjs';
import * as documents from './module/documents/_module.mjs';
import { macros } from './module/_module.mjs';
import * as dice from './module/dice/_module.mjs';
import * as fields from './module/data/fields/_module.mjs';
// Foundry's use of `Object.assign(globalThis) means many globally available objects are not read as such // Foundry's use of `Object.assign(globalThis) means many globally available objects are not read as such
// This declare global hopefully fixes that // This declare global hopefully fixes that
// Note: eslint is not aware of these, whatever is added here should go in the eslint's globals list // Note: eslint is not aware of these, whatever is added here should go in the eslint's globals list
@ -89,17 +80,3 @@ declare global {
damageOptions: object; damageOptions: object;
} }
} }
declare module '@client/packages/system.mjs' {
export default interface System {
api: {
applications: typeof applications,
data: typeof data,
models: typeof models,
documents: typeof documents,
macros: typeof macros,
dice: typeof dice,
fields: typeof fields
};
}
}

View file

@ -114,8 +114,7 @@
"area": { "area": {
"sectionTitle": "Areas", "sectionTitle": "Areas",
"shape": "Shape", "shape": "Shape",
"size": "Size", "size": "Size"
"hasHole": "Area Hole"
}, },
"displayInChat": "Display in chat", "displayInChat": "Display in chat",
"deleteTriggerTitle": "Delete Trigger", "deleteTriggerTitle": "Delete Trigger",
@ -872,10 +871,6 @@
"bruiser": "for each Bruiser adversary.", "bruiser": "for each Bruiser adversary.",
"solo": "for each Solo adversary." "solo": "for each Solo adversary."
}, },
"AreaTypes": {
"attached": { "label": "Attached To Token" },
"placed": { "label": "Placed In Scene" }
},
"ArmorInteraction": { "ArmorInteraction": {
"none": { "label": "Ignores Armor" }, "none": { "label": "Ignores Armor" },
"active": { "label": "Active w/ Armor" }, "active": { "label": "Active w/ Armor" },

View file

@ -7,7 +7,7 @@ export default class AdversarySheet extends DHBaseActorSheet {
/** @inheritDoc */ /** @inheritDoc */
static DEFAULT_OPTIONS = { static DEFAULT_OPTIONS = {
classes: ['adversary'], classes: ['adversary'],
position: { width: 645, height: 760 }, position: { width: 660, height: 766 },
window: { resizable: true }, window: { resizable: true },
actions: { actions: {
toggleHitPoints: AdversarySheet.#toggleHitPoints, toggleHitPoints: AdversarySheet.#toggleHitPoints,
@ -58,13 +58,12 @@ export default class AdversarySheet extends DHBaseActorSheet {
template: 'systems/daggerheart/templates/sheets/actors/adversary/features.hbs', template: 'systems/daggerheart/templates/sheets/actors/adversary/features.hbs',
scrollable: ['.feature-section'] scrollable: ['.feature-section']
}, },
notes: {
template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs'
},
effects: { effects: {
template: 'systems/daggerheart/templates/sheets/actors/adversary/effects.hbs', template: 'systems/daggerheart/templates/sheets/actors/adversary/effects.hbs',
scrollable: ['.effects-sections'] scrollable: ['.effects-sections']
},
notes: {
template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs',
scrollable: ['.editor-content']
} }
}; };

View file

@ -1057,7 +1057,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
direction: 'DOWN' direction: 'DOWN'
}); });
html.querySelectorAll('.armor .slot').forEach(element => { html.querySelectorAll('.armor-slot').forEach(element => {
element.addEventListener('click', CharacterSheet.armorSourcePipUpdate); element.addEventListener('click', CharacterSheet.armorSourcePipUpdate);
}); });
} }
@ -1072,7 +1072,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
/** Update specific armor source */ /** Update specific armor source */
static async armorSourcePipUpdate(event) { static async armorSourcePipUpdate(event) {
const target = event.target.closest('.slot'); const target = event.target.closest('.armor-slot');
const { uuid, value } = target.dataset; const { uuid, value } = target.dataset;
const document = await foundry.utils.fromUuid(uuid); const document = await foundry.utils.fromUuid(uuid);
@ -1100,7 +1100,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
} }
const container = target.closest('.slot-bar'); const container = target.closest('.slot-bar');
for (const armorSlot of container.querySelectorAll('.armor .slot i')) { for (const armorSlot of container.querySelectorAll('.armor-slot i')) {
const index = Number.parseInt(armorSlot.dataset.index); const index = Number.parseInt(armorSlot.dataset.index);
if (decreasing && index >= newCurrent) { if (decreasing && index >= newCurrent) {
armorSlot.classList.remove('fa-shield'); armorSlot.classList.remove('fa-shield');

View file

@ -96,7 +96,7 @@ export default class DhRegionLayer extends foundry.canvas.layers.RegionLayer {
return inBounds.length === 1 ? inBounds[0] : null; return inBounds.length === 1 ? inBounds[0] : null;
} }
static getTemplateShape({ shapeType, angle, range, direction, hasHole } = {}) { static getTemplateShape({ type, angle, range, direction } = {}) {
const { line, rectangle, inFront, cone, circle, emanation } = CONFIG.DH.GENERAL.templateTypes; const { line, rectangle, inFront, cone, circle, emanation } = CONFIG.DH.GENERAL.templateTypes;
/* Length calculation */ /* Length calculation */
@ -112,11 +112,11 @@ export default class DhRegionLayer extends foundry.canvas.layers.RegionLayer {
const shapeData = { const shapeData = {
...canvas.mousePosition, ...canvas.mousePosition,
type: shapeType, type: type,
direction: direction ?? 0 direction: direction ?? 0
}; };
switch (shapeType) { switch (type) {
case rectangle.id: case rectangle.id:
shapeData.width = length; shapeData.width = length;
shapeData.height = length; shapeData.height = length;
@ -145,8 +145,7 @@ export default class DhRegionLayer extends foundry.canvas.layers.RegionLayer {
y: 0, y: 0,
width: 1, width: 1,
height: 1, height: 1,
shape: game.canvas.grid.isHexagonal ? CONST.TOKEN_SHAPES.ELLIPSE_1 : CONST.TOKEN_SHAPES.RECTANGLE_1, shape: game.canvas.grid.isHexagonal ? CONST.TOKEN_SHAPES.ELLIPSE_1 : CONST.TOKEN_SHAPES.RECTANGLE_1
hole: hasHole
}; };
break; break;
} }

View file

@ -119,10 +119,6 @@ export const advantageState = {
export const areaTypes = { export const areaTypes = {
placed: { placed: {
id: 'placed', id: 'placed',
label: 'DAGGERHEART.CONFIG.AreaTypes.placed.label' label: 'Placed Area'
},
attached: {
id: 'attached',
label: 'DAGGERHEART.CONFIG.AreaTypes.attached.label'
} }
}; };

View file

@ -114,10 +114,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
return this._id; return this._id;
} }
/** /** Returns true if the current user is the owner of the containing item */
* Returns true if the current user is the owner of the containing item.
* @returns {boolean}
*/
get isOwner() { get isOwner() {
return this.item?.isOwner ?? true; return this.item?.isOwner ?? true;
} }
@ -146,7 +143,6 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
/** /**
* Return the first Actor parent found. * Return the first Actor parent found.
* @returns {DhpActor | null}
*/ */
get actor() { get actor() {
return this.item instanceof DhpActor return this.item instanceof DhpActor
@ -159,7 +155,6 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
/** /**
* Returns true if the action is usable. * Returns true if the action is usable.
* An action is usable on any actor type. For example, an adversary might have a base attack action. * An action is usable on any actor type. For example, an adversary might have a base attack action.
* @returns {boolean}
*/ */
get usable() { get usable() {
const actor = this.actor; const actor = this.actor;

View file

@ -33,10 +33,6 @@ export default class AreasField extends fields.ArrayField {
initial: CONFIG.DH.GENERAL.range.veryClose.id, initial: CONFIG.DH.GENERAL.range.veryClose.id,
label: 'DAGGERHEART.ACTIONS.Config.area.size' label: 'DAGGERHEART.ACTIONS.Config.area.size'
}), }),
hasHole: new fields.BooleanField({
initial: false,
label: 'DAGGERHEART.ACTIONS.Config.area.hasHole'
}),
effects: new fields.ArrayField(new fields.DocumentIdField()) effects: new fields.ArrayField(new fields.DocumentIdField())
}); });
super(element, options, context); super(element, options, context);

View file

@ -2,10 +2,6 @@ import { getWorldActor } from '../../../helpers/utils.mjs';
const fields = foundry.data.fields; const fields = foundry.data.fields;
/**
* @import DHSummonAction from '../../action/summonAction.mjs'
*/
export default class DHSummonField extends fields.SchemaField { export default class DHSummonField extends fields.SchemaField {
/** /**
* Action Workflow order * Action Workflow order
@ -26,11 +22,6 @@ export default class DHSummonField extends fields.SchemaField {
super(transformFields, options, context); super(transformFields, options, context);
} }
/**
* Runs the execute. This is run on behalf of DHSummonAction.
* @todo move this function to be on the summon action.
* @this DHSummonAction
*/
static async execute() { static async execute() {
if (!this.transform.actorUUID) { if (!this.transform.actorUUID) {
ui.notifications.warn(game.i18n.localize('DAGGERHEART.ACTIONS.TYPES.transform.noTransformActor')); ui.notifications.warn(game.i18n.localize('DAGGERHEART.ACTIONS.TYPES.transform.noTransformActor'));
@ -48,11 +39,10 @@ export default class DHSummonField extends fields.SchemaField {
return false; return false;
} }
const activeTokens = this.actor.getActiveTokens(false, true); const activeTokens = this.actor.getActiveTokens().map(x => x.document);
const controlledMatchingTokens = canvas.tokens.controlled const controlledMatchingTokens = canvas.tokens.controlled
.filter(x => x.actor && x.actor.uuid === this.actor.uuid) .filter(x => x.actor && x.actor.uuid === this.actor.uuid)
.map(x => x.document); .map(x => x.document);
/** @type {typeof game.system.api.documents.DhToken | null} */
const token = this.actor.token ?? ( const token = this.actor.token ?? (
activeTokens.length === 1 ? activeTokens[0] : activeTokens.length === 1 ? activeTokens[0] :
(controlledMatchingTokens.length === 1 ? controlledMatchingTokens[0] : null) (controlledMatchingTokens.length === 1 ? controlledMatchingTokens[0] : null)
@ -72,10 +62,9 @@ export default class DHSummonField extends fields.SchemaField {
const tokenSizes = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).tokenSizes; const tokenSizes = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).tokenSizes;
const tokenSize = actor?.system.metadata.usesSize ? tokenSizes[actor.system.size] : actor.prototypeToken.width; const tokenSize = actor?.system.metadata.usesSize ? tokenSizes[actor.system.size] : actor.prototypeToken.width;
const prototypeTokenData = actor.prototypeToken.toObject(); const createdTokens = await canvas.scene.createEmbeddedDocuments(
const createdToken = (await canvas.scene.createEmbeddedDocuments(
'Token', [{ 'Token', [{
...prototypeTokenData, ...actor.prototypeToken.toObject(),
actorId: actor.id, actorId: actor.id,
x: token.x, x: token.x,
y: token.y, y: token.y,
@ -85,7 +74,8 @@ export default class DHSummonField extends fields.SchemaField {
elevation: token.elevation elevation: token.elevation
}], }],
{ controlObject: true, parent: canvas.scene } { controlObject: true, parent: canvas.scene }
))[0]; );
const createdToken = createdTokens[0];
/* Swap out previous combatant for a new one if applicable */ /* Swap out previous combatant for a new one if applicable */
if (token.combatant) { if (token.combatant) {

View file

@ -3,26 +3,17 @@ import DHItem from './item.mjs';
import BaseDataItem from '../data/item/base.mjs'; import BaseDataItem from '../data/item/base.mjs';
import DhActiveEffect from './activeEffect.mjs'; import DhActiveEffect from './activeEffect.mjs';
import EmbeddedCollection from '@common/abstract/embedded-collection.mjs'; import EmbeddedCollection from '@common/abstract/embedded-collection.mjs';
import DHToken from './token.mjs';
import Actor from '@client/documents/actor.mjs';
import Item from '@client/documents/item.mjs';
declare module './actor.mjs' { declare module './actor.mjs' {
export default interface DhpActor<T extends BaseDataActor = BaseDataActor> extends Actor { export default interface DhpActor<T extends BaseDataActor = BaseDataActor> {
system: T; system: T;
items: EmbeddedCollection<DHItem>; items: EmbeddedCollection<DHItem>;
effects: EmbeddedCollection<DhActiveEffect>; effects: EmbeddedCollection<DhActiveEffect>;
get token(): DHToken | null;
/** @inheritdoc */
getActiveTokens(linked?: boolean, document?: boolean): (DHToken | foundry.canvas.placeables.Token)[];
getActiveTokens(linked?: boolean, document: true): DHToken[];
getActiveTokens(linked?: boolean, document: false): foundry.canvas.placeables.Token[];
} }
} }
declare module './item.mjs' { declare module './item.mjs' {
export default interface DHItem<T extends BaseDataItem = BaseDataItem> extends Item { export default interface DHItem<T extends BaseDataItem = BaseDataItem> {
parent: DhpActor; parent: DhpActor;
actor: DhpActor; actor: DhpActor;
system: T; system: T;

View file

@ -276,12 +276,8 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
async onCreateAreas(event) { async onCreateAreas(event) {
const createArea = async selectedArea => { const createArea = async selectedArea => {
const effects = selectedArea.effects.map(effect => this.system.action.item.effects.get(effect).uuid); const effects = selectedArea.effects.map(effect => this.system.action.item.effects.get(effect).uuid);
const { shape: shapeType, size: range, hasHole } = selectedArea; const { shape: type, size: range } = selectedArea;
const shapeData = CONFIG.Canvas.layers.regions.layerClass.getTemplateShape({ const shapeData = CONFIG.Canvas.layers.regions.layerClass.getTemplateShape({ type, range });
shapeType,
range,
hasHole
});
const scene = game.scenes.get(game.user.viewedScene); const scene = game.scenes.get(game.user.viewedScene);
const level = scene.levels.find(x => x.isView); const level = scene.levels.find(x => x.isView);
@ -309,10 +305,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
visibility: CONST.REGION_VISIBILITY.ALWAYS visibility: CONST.REGION_VISIBILITY.ALWAYS
}; };
const placeRegion = data => { const placeRegion = data => {
canvas.regions.placeRegion(data, { canvas.regions.placeRegion(data, { create: true });
create: true,
attachToToken: selectedArea.type === CONFIG.DH.ACTIONS.areaTypes.attached.id
});
}; };
// Regions with effects must be placed by the GM // Regions with effects must be placed by the GM

View file

@ -58,11 +58,10 @@ export const renderMeasuredTemplate = async event => {
if (!type || !range || !game.canvas.scene) return; if (!type || !range || !game.canvas.scene) return;
const shapeData = CONFIG.Canvas.layers.regions.layerClass.getTemplateShape({ const shapeData = CONFIG.Canvas.layers.regions.layerClass.getTemplateShape({
shapetype: type, type,
angle, angle,
range, range,
direction, direction
hasHole: false
}); });
await canvas.regions.placeRegion( await canvas.regions.placeRegion(

View file

@ -1,10 +1,6 @@
import { diceTypes, getDiceSoNicePresets, getDiceSoNicePreset, range } from '../config/generalConfig.mjs'; import { diceTypes, getDiceSoNicePresets, getDiceSoNicePreset, range } from '../config/generalConfig.mjs';
import Tagify from '@yaireo/tagify'; import Tagify from '@yaireo/tagify';
/**
* @import DhpActor from '../documents/actor.mjs';
*/
export const capitalize = string => { export const capitalize = string => {
return string.charAt(0).toUpperCase() + string.slice(1); return string.charAt(0).toUpperCase() + string.slice(1);
}; };
@ -895,21 +891,15 @@ export function shouldUseHopeFearAutomation(options = { gmAsPlayer: true }) {
return (!game.user.isGM || options.gmAsPlayer) ? hopeFear.players : hopeFear.gm; return (!game.user.isGM || options.gmAsPlayer) ? hopeFear.players : hopeFear.gm;
} }
/**
* Returns the given actor if its a world actor,
* finds a world actor equivalent,
* or imports the actor and returns the imported actor.
* @param {DhpActor} baseActor
* @returns {Promise<DhpActor>} a world actor
*/
export async function getWorldActor(baseActor) { export async function getWorldActor(baseActor) {
if (baseActor.inCompendium) { if (baseActor.inCompendium) {
const worldActorCandidates = game.actors.filter(x => const worldActorCopy = game.actors.find(x =>
x._stats.compendiumSource === baseActor.uuid && x._stats.compendiumSource === baseActor.uuid &&
x.prototypeToken.actorLink === baseActor.prototypeToken.actorLink (!x.prototypeToken.actorLink || x.name === baseActor.name)
); );
const worldActorCopy = worldActorCandidates.find(a => a.name === baseActor.name) ?? worldActorCandidates[0];
if (worldActorCopy) return worldActorCopy; if (worldActorCopy)
return worldActorCopy;
const baseActorData = baseActor; const baseActorData = baseActor;
return await game.system.api.documents.DhpActor.create({ return await game.system.api.documents.DhpActor.create({

View file

@ -52,7 +52,7 @@
"includeBase": false "includeBase": false
}, },
"target": { "target": {
"type": "", "type": "hostile",
"amount": 1 "amount": 1
}, },
"effects": [ "effects": [
@ -63,23 +63,13 @@
], ],
"name": "Fire", "name": "Fire",
"img": "icons/magic/fire/barrier-wall-explosion-orange.webp", "img": "icons/magic/fire/barrier-wall-explosion-orange.webp",
"range": "", "range": "close"
"areas": [
{
"name": "Elemental Aura: Fire",
"type": "attached",
"shape": "emanation",
"size": "close",
"hasHole": false,
"effects": []
}
]
}, },
"xDBLH5TWidvrYF7z": { "xDBLH5TWidvrYF7z": {
"type": "effect", "type": "effect",
"_id": "xDBLH5TWidvrYF7z", "_id": "xDBLH5TWidvrYF7z",
"systemPath": "actions", "systemPath": "actions",
"description": "<p>Your allies gain a +1 bonus to Strength.</p>", "description": "<p>When an adversary marks 1 or more Hit Points, they must also mark a Stress.</p>",
"chatDisplay": true, "chatDisplay": true,
"actionType": "action", "actionType": "action",
"cost": [], "cost": [],
@ -88,26 +78,19 @@
"max": "", "max": "",
"recovery": null "recovery": null
}, },
"effects": [], "effects": [
{
"_id": "WRuijfHxmUscAa69",
"onSave": false
}
],
"target": { "target": {
"type": "", "type": "friendly",
"amount": null "amount": null
}, },
"name": "Earth", "name": "Earth",
"img": "icons/magic/control/buff-strength-muscle-damage-red.webp", "img": "icons/magic/control/buff-strength-muscle-damage-red.webp",
"range": "", "range": "close"
"areas": [
{
"name": "Elemental Aura: Earth",
"type": "attached",
"shape": "emanation",
"size": "close",
"hasHole": true,
"effects": [
"yvpWNCNobg0LLjey"
]
}
]
}, },
"S4t5HlgxWlHwaBDw": { "S4t5HlgxWlHwaBDw": {
"type": "effect", "type": "effect",
@ -129,22 +112,12 @@
} }
], ],
"target": { "target": {
"type": "self", "type": "hostile",
"amount": null "amount": null
}, },
"name": "Water", "name": "Water",
"img": "icons/magic/water/vortex-water-whirlpool.webp", "img": "icons/magic/water/vortex-water-whirlpool.webp",
"range": "self", "range": "close"
"areas": [
{
"name": "Elemental Aura: Water",
"type": "attached",
"shape": "emanation",
"size": "close",
"hasHole": false,
"effects": []
}
]
}, },
"hAsKFFewtTqd1gg9": { "hAsKFFewtTqd1gg9": {
"type": "attack", "type": "attack",
@ -165,10 +138,15 @@
"includeBase": false "includeBase": false
}, },
"target": { "target": {
"type": "self", "type": "any",
"amount": null "amount": null
}, },
"effects": [], "effects": [
{
"_id": "mJBA2QTyM9SM5NVS",
"onSave": false
}
],
"roll": { "roll": {
"type": "diceSet", "type": "diceSet",
"trait": null, "trait": null,
@ -191,19 +169,7 @@
}, },
"name": "Air", "name": "Air",
"img": "icons/magic/air/air-burst-spiral-blue-gray.webp", "img": "icons/magic/air/air-burst-spiral-blue-gray.webp",
"range": "self", "range": ""
"areas": [
{
"name": "Elemental Aura: Air",
"type": "attached",
"shape": "emanation",
"size": "close",
"hasHole": false,
"effects": [
"vnKV5hsO4DVjURAl"
]
}
]
} }
}, },
"originItemType": null, "originItemType": null,
@ -215,6 +181,49 @@
} }
}, },
"effects": [ "effects": [
{
"name": "Elemental Aura (Earth)",
"img": "icons/magic/control/buff-strength-muscle-damage-orange.webp",
"origin": "Compendium.daggerheart.subclasses.Item.2JH9NaOh69yN80Gw",
"transfer": false,
"_id": "WRuijfHxmUscAa69",
"type": "base",
"system": {
"rangeDependence": {
"enabled": false,
"type": "withinRange",
"target": "hostile",
"range": "melee"
}
},
"changes": [
{
"key": "system.traits.strength.value",
"mode": 2,
"value": "1",
"priority": null
}
],
"disabled": false,
"duration": {
"startTime": null,
"combat": null,
"seconds": null,
"rounds": null,
"turns": null,
"startRound": null,
"startTurn": null
},
"description": "",
"tint": "#ffffff",
"statuses": [],
"sort": 0,
"flags": {},
"_stats": {
"compendiumSource": null
},
"_key": "!items.effects!2JH9NaOh69yN80Gw.WRuijfHxmUscAa69"
},
{ {
"name": "Elemental Aura (Water)", "name": "Elemental Aura (Water)",
"img": "icons/magic/water/vortex-water-whirlpool.webp", "img": "icons/magic/water/vortex-water-whirlpool.webp",
@ -228,15 +237,18 @@
"type": "withinRange", "type": "withinRange",
"target": "hostile", "target": "hostile",
"range": "melee" "range": "melee"
}, }
"changes": []
}, },
"changes": [],
"disabled": false, "disabled": false,
"duration": { "duration": {
"value": null, "startTime": null,
"units": "seconds", "combat": null,
"expiry": null, "seconds": null,
"expired": false "rounds": null,
"turns": null,
"startRound": null,
"startTurn": null
}, },
"description": "", "description": "",
"tint": "#ffffff", "tint": "#ffffff",
@ -246,9 +258,6 @@
"_stats": { "_stats": {
"compendiumSource": null "compendiumSource": null
}, },
"start": null,
"showIcon": 1,
"folder": null,
"_key": "!items.effects!2JH9NaOh69yN80Gw.H7W52ps5d3UGmaFr" "_key": "!items.effects!2JH9NaOh69yN80Gw.H7W52ps5d3UGmaFr"
}, },
{ {
@ -264,15 +273,18 @@
"type": "withinRange", "type": "withinRange",
"target": "hostile", "target": "hostile",
"range": "melee" "range": "melee"
}, }
"changes": []
}, },
"changes": [],
"disabled": false, "disabled": false,
"duration": { "duration": {
"value": null, "startTime": null,
"units": "seconds", "combat": null,
"expiry": null, "seconds": null,
"expired": false "rounds": null,
"turns": null,
"startRound": null,
"startTurn": null
}, },
"description": "", "description": "",
"tint": "#ffffff", "tint": "#ffffff",
@ -282,120 +294,43 @@
"_stats": { "_stats": {
"compendiumSource": null "compendiumSource": null
}, },
"start": null,
"showIcon": 1,
"folder": null,
"_key": "!items.effects!2JH9NaOh69yN80Gw.WX5AMEpmUAutB9Hm" "_key": "!items.effects!2JH9NaOh69yN80Gw.WX5AMEpmUAutB9Hm"
}, },
{ {
"name": "Elemental Aura: Earth", "name": "Elemental Aura (Air)",
"disabled": false,
"img": "icons/magic/control/buff-strength-muscle-damage-red.webp",
"description": "<p>Your allies gain a +1 bonus to Strength.</p>",
"transfer": false,
"statuses": [],
"system": {
"rangeDependence": {
"enabled": false,
"type": "withinRange",
"target": "hostile",
"range": "melee"
},
"changes": [
{
"key": "system.traits.strength.value",
"type": "add",
"value": 1,
"priority": null,
"phase": "initial"
}
],
"duration": {
"description": "",
"type": ""
},
"stacking": null,
"targetDispositions": [
1
]
},
"_id": "yvpWNCNobg0LLjey",
"type": "base",
"start": {
"time": 0,
"combat": null,
"combatant": null,
"initiative": null,
"round": null,
"turn": null
},
"duration": {
"value": null,
"units": "seconds",
"expiry": null,
"expired": false
},
"origin": null,
"tint": "#ffffff",
"showIcon": 1,
"folder": null,
"sort": 0,
"flags": {},
"_stats": {
"compendiumSource": null
},
"_key": "!items.effects!2JH9NaOh69yN80Gw.yvpWNCNobg0LLjey"
},
{
"name": "Elemental Aura: Air",
"disabled": false,
"img": "icons/magic/air/air-burst-spiral-blue-gray.webp", "img": "icons/magic/air/air-burst-spiral-blue-gray.webp",
"description": "<p><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.753);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">When you or an ally takes damage from an attack beyond Melee range, reduce the damage by 1d8.</span></p>", "origin": "Compendium.daggerheart.subclasses.Item.2JH9NaOh69yN80Gw",
"transfer": false, "transfer": false,
"statuses": [], "_id": "mJBA2QTyM9SM5NVS",
"type": "base",
"system": { "system": {
"rangeDependence": { "rangeDependence": {
"enabled": false, "enabled": false,
"type": "withinRange", "type": "withinRange",
"target": "hostile", "target": "hostile",
"range": "melee" "range": "melee"
}, }
"changes": [],
"duration": {
"description": "",
"type": ""
},
"stacking": null,
"targetDispositions": [
1
]
},
"_id": "vnKV5hsO4DVjURAl",
"type": "base",
"start": {
"time": 0,
"combat": null,
"combatant": null,
"initiative": null,
"round": null,
"turn": null
}, },
"changes": [],
"disabled": false,
"duration": { "duration": {
"value": null, "startTime": null,
"units": "seconds", "combat": null,
"expiry": null, "seconds": null,
"expired": false "rounds": null,
"turns": null,
"startRound": null,
"startTurn": null
}, },
"origin": null, "description": "",
"tint": "#ffffff", "tint": "#ffffff",
"showIcon": 1, "statuses": [],
"folder": null,
"sort": 0, "sort": 0,
"flags": {}, "flags": {},
"_stats": { "_stats": {
"compendiumSource": null "compendiumSource": null
}, },
"_key": "!items.effects!2JH9NaOh69yN80Gw.vnKV5hsO4DVjURAl" "_key": "!items.effects!2JH9NaOh69yN80Gw.mJBA2QTyM9SM5NVS"
} }
], ],
"sort": 100000, "sort": 100000,

View file

@ -384,10 +384,6 @@
justify-content: space-between; justify-content: space-between;
} }
label {
white-space: nowrap;
}
.btn { .btn {
padding-top: 15px; padding-top: 15px;
} }
@ -403,13 +399,6 @@
> .checkbox { > .checkbox {
align-self: end; align-self: end;
} }
.auto-sized {
width: auto;
display: flex;
flex-direction: column;
align-items: center;
}
} }
.form-group { .form-group {

View file

@ -9,107 +9,110 @@
} }
}); });
/** Pips styling, can exist standalone even without a slot-value */
.slot-bar {
display: flex;
gap: 4px;
padding: 5px;
border: 1px solid @color-border;
border-radius: 6px;
z-index: 1;
color: @color-text-emphatic;
width: fit-content;
min-height: 22px;
flex-wrap: wrap;
.slot {
transition: all 0.3s ease;
cursor: pointer;
}
.slot:not(:has(i)) {
width: 15px;
height: 10px;
border: 1px solid @color-border;
background: light-dark(@dark-blue-10, @golden-10);
border-radius: 3px;
&.large {
width: 20px;
}
&.filled {
background: light-dark(@dark-blue, @golden);
}
}
&.armor .slot {
font-size: var(--font-size-12);
.fa-shield-halved {
color: light-dark(@dark-blue-40, @golden-40);
}
}
.empty-slot {
width: 15px;
height: 10px;
}
}
.slot-value {
display: flex;
flex-direction: column;
font-size: 1.5rem;
align-items: center;
justify-content: center;
text-align: center;
z-index: 2;
color: @beige;
.slot-label {
display: flex;
align-items: center;
color: light-dark(@beige, @dark-blue);
background: light-dark(@dark-blue, @golden);
padding: 0 5px;
width: fit-content;
font-weight: bold;
border-radius: 0px 0px 5px 5px;
font-size: var(--font-size-12);
.label {
padding-right: 5px;
}
.value {
padding-left: 6px;
border-left: 1px solid light-dark(@beige, @dark-golden);
}
}
}
.status-bar { .status-bar {
display: flex; display: flex;
flex-direction: column; justify-content: center;
align-items: center;
position: relative; position: relative;
width: 120px;
height: 40px;
.status-value { .status-label {
position: relative; position: relative;
top: 40px;
height: 22px;
width: 79px;
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
background: light-dark(@dark-blue, @golden);
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
color: light-dark(@beige, @dark-blue);
}
}
.slot-value {
position: absolute;
display: flex; display: flex;
flex-direction: column;
padding: 0 5px; padding: 0 5px;
font-size: 1.5rem; font-size: 1.5rem;
align-items: center; align-items: center;
width: 100px; width: 140px;
height: 40px; height: 40px;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
z-index: 2; z-index: 2;
color: @beige; color: @beige;
> * { .slot-bar {
display: flex;
flex-wrap: wrap;
gap: 5px;
padding: 5px;
border: 1px solid @color-border;
border-radius: 6px;
z-index: 1; z-index: 1;
color: @color-text-emphatic;
width: fit-content;
.slot {
width: 15px;
height: 10px;
border: 1px solid @color-border;
background: light-dark(@dark-blue-10, @golden-10);
border-radius: 3px;
transition: all 0.3s ease;
cursor: pointer;
&.large {
width: 20px;
}
&.filled {
background: light-dark(@dark-blue, @golden);
}
}
.empty-slot {
width: 15px;
height: 10px;
}
} }
.slot-label {
display: flex;
align-items: center;
color: light-dark(@beige, @dark-blue);
background: light-dark(@dark-blue, @golden);
padding: 0 5px;
width: fit-content;
font-weight: bold;
border-radius: 0px 0px 5px 5px;
font-size: var(--font-size-12);
.label {
padding-right: 5px;
}
.value {
padding-left: 6px;
border-left: 1px solid light-dark(@beige, @dark-golden);
}
}
}
.status-value {
position: absolute;
display: flex;
padding: 0 5px;
font-size: 1.5rem;
align-items: center;
width: 140px;
height: 40px;
justify-content: center;
text-align: center;
z-index: 2;
color: @beige;
input[type='number'] { input[type='number'] {
background: transparent; background: transparent;
@ -143,11 +146,11 @@
.progress-bar { .progress-bar {
position: absolute; position: absolute;
appearance: none; appearance: none;
width: 100%; width: 100px;
height: 100%; height: 40px;
border: 1px solid @color-border; border: 1px solid @color-border;
border-radius: 6px; border-radius: 6px;
z-index: 0; z-index: 1;
background: @dark-blue; background: @dark-blue;
&::-webkit-progress-bar { &::-webkit-progress-bar {
@ -172,29 +175,4 @@
border-radius: 6px; border-radius: 6px;
} }
} }
.status-label {
position: relative;
height: 22px;
width: 79px;
background: light-dark(@dark-blue, @golden);
&.pointy {
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
margin-bottom: -2px; // compensate for pointy bottom so spacing feels more "right"
}
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
color: light-dark(@beige, @dark-blue);
}
}
} }
// Overrides for sidebar usage.
aside[data-application-part="sidebar"] .resources-section .slot-bar {
display: grid;
grid-template-columns: repeat(6, min-content);
grid-auto-flow: row;
}

View file

@ -1,6 +1,7 @@
@import './sheet.less';
@import './features.less'; @import './features.less';
@import './header.less'; @import './header.less';
@import './sheet.less';
@import './sidebar.less'; @import './sidebar.less';
@import './effects.less'; @import './effects.less';
@import './notes.less'; @import './notes.less';

View file

@ -2,37 +2,35 @@
@import '../../../utils/fonts.less'; @import '../../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.adversary { .application.sheet.daggerheart.actor.dh-style.adversary {
--sidebar-width: 260px;
.window-content { .window-content {
display: grid; display: grid;
grid-template-columns: var(--sidebar-width) 1fr; grid-template-columns: 275px 1fr;
grid-template-rows: auto 1fr; grid-template-rows: auto 1fr;
height: 100%; height: 100%;
width: 100%; width: 100%;
padding-bottom: 0; padding-bottom: 0;
}
.adversary-sidebar-sheet { .adversary-sidebar-sheet {
grid-row: 1 / span 2; grid-row: 1 / span 2;
grid-column: 1; grid-column: 1;
overflow: hidden;
display: flex;
flex-direction: column;
}
.adversary-header-sheet {
grid-row: 1;
grid-column: 2;
}
.tab {
grid-row: 2;
grid-column: 2;
&.active {
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.adversary-header-sheet {
grid-row: 1;
grid-column: 2;
}
.tab {
grid-row: 2;
grid-column: 2;
&.active {
overflow: hidden;
display: flex;
flex-direction: column;
}
}
} }
} }

View file

@ -22,8 +22,8 @@
.application.sheet.daggerheart.actor.dh-style.adversary { .application.sheet.daggerheart.actor.dh-style.adversary {
.adversary-sidebar-sheet { .adversary-sidebar-sheet {
width: var(--sidebar-width); width: 275px;
min-width: var(--sidebar-width); min-width: 275px;
border-right: 1px solid light-dark(@dark-blue, @golden); border-right: 1px solid light-dark(@dark-blue, @golden);
.portrait { .portrait {
@ -52,7 +52,7 @@
} }
img { img {
height: var(--sidebar-width); height: 275px;
} }
.death-roll-btn { .death-roll-btn {
@ -63,7 +63,7 @@
.threshold-section { .threshold-section {
position: relative; position: relative;
display: flex; display: flex;
gap: 7px; gap: 10px;
background-color: light-dark(transparent, @dark-blue); background-color: light-dark(transparent, @dark-blue);
color: @color-text-emphatic; color: @color-text-emphatic;
padding: 5px 10px; padding: 5px 10px;
@ -106,8 +106,8 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
top: -20px; top: -20px;
gap: 10px; gap: 16px;
margin-bottom: -16px; margin-bottom: -10px;
&.pip-display { &.pip-display {
top: -15px; top: -15px;
@ -120,6 +120,105 @@
.resources-section { .resources-section {
display: flex; display: flex;
justify-content: space-evenly; justify-content: space-evenly;
margin-bottom: 16px;
.status-bar {
display: flex;
justify-content: center;
position: relative;
width: 100px;
height: 40px;
.status-label {
position: relative;
top: 40px;
height: 22px;
width: 79px;
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
background: light-dark(@dark-blue, @golden);
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
color: light-dark(@beige, @dark-blue);
}
}
.status-value {
position: absolute;
display: flex;
padding: 0 6px;
font-size: 1.5rem;
align-items: center;
width: 100px;
height: 40px;
justify-content: center;
text-align: center;
z-index: 2;
color: @beige;
input[type='number'] {
background: transparent;
font-size: 1.5rem;
width: 40px;
height: 30px;
text-align: center;
border: none;
outline: 2px solid transparent;
color: @beige;
&.bar-input {
padding: 0;
color: @beige;
backdrop-filter: none;
background: transparent;
transition: all 0.3s ease;
&:hover,
&:focus {
background: @semi-transparent-dark-blue;
backdrop-filter: blur(9.5px);
}
}
}
.bar-label {
width: 40px;
}
}
.progress-bar {
position: absolute;
appearance: none;
width: 100px;
height: 40px;
border: 1px solid @color-border;
border-radius: 6px;
z-index: 1;
background: @dark-blue;
&::-webkit-progress-bar {
border: none;
background: @dark-blue;
border-radius: 6px;
}
&::-webkit-progress-value {
background: @gradient-hp;
border-radius: 6px;
}
&.stress-color::-webkit-progress-value {
background: @gradient-stress;
border-radius: 6px;
}
&::-moz-progress-bar {
background: @gradient-hp;
border-radius: 6px;
}
&.stress-color::-moz-progress-bar {
background: @gradient-stress;
border-radius: 6px;
}
}
}
} }
.status-section { .status-section {
@ -157,7 +256,7 @@
.status-label { .status-label {
padding: 2px 10px; padding: 2px 10px;
width: 100%; width: 100%;
border-radius: 0 0 3px 3px; border-radius: 3px;
background: light-dark(@dark-blue, @golden); background: light-dark(@dark-blue, @golden);
h4 { h4 {
@ -185,8 +284,8 @@
.shortcut-items-section { .shortcut-items-section {
overflow-y: hidden; overflow-y: hidden;
padding: 10px 0; padding-top: 10px;
flex: 1; padding-bottom: 20px;
scrollbar-gutter: stable; scrollbar-gutter: stable;
.with-scroll-shadows(); .with-scroll-shadows();
@ -214,6 +313,8 @@
} }
.experience-section { .experience-section {
margin-bottom: 20px;
.title { .title {
display: flex; display: flex;
gap: 15px; gap: 15px;
@ -230,21 +331,21 @@
gap: 5px; gap: 5px;
width: 100%; width: 100%;
margin-top: 10px; margin-top: 10px;
align-items: stretch; align-items: center;
padding: 0 4px 0 12px;
.experience-row { .experience-row {
display: flex; display: flex;
gap: 5px; gap: 5px;
width: 250px;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.experience-name { .experience-name {
width: 180px;
display: flex; display: flex;
align-items: center; align-items: center;
text-align: start; text-align: start;
font-size: var(--font-size-14); font-size: var(--font-size-14);
flex: 1;
color: light-dark(@dark, @beige); color: light-dark(@dark, @beige);
line-height: 1; line-height: 1;
} }
@ -269,7 +370,9 @@
.reaction-section { .reaction-section {
display: flex; display: flex;
margin: 10px; padding: 0 10px;
margin-top: 20px;
width: 100%;
button { button {
height: 40px; height: 40px;

View file

@ -89,13 +89,113 @@
.resources-section { .resources-section {
justify-content: space-around; justify-content: space-around;
margin: 8px 2px 0 2px; margin: 8px 2px 8px 2px;
} }
} }
.resources-section { .resources-section {
display: flex; display: flex;
justify-content: space-evenly; justify-content: space-evenly;
margin-bottom: 20px;
.status-bar {
display: flex;
justify-content: center;
position: relative;
width: 120px;
height: 40px;
.status-label {
position: relative;
top: 40px;
height: 22px;
width: 79px;
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
background: light-dark(@dark-blue, @golden);
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
color: light-dark(@beige, @dark-blue);
}
}
.status-value {
position: absolute;
display: flex;
padding: 0 5px;
font-size: 1.5rem;
align-items: center;
width: 140px;
height: 40px;
justify-content: center;
text-align: center;
z-index: 2;
color: @beige;
input[type='number'] {
background: transparent;
font-size: 1.5rem;
width: 40px;
height: 30px;
text-align: center;
border: none;
outline: 2px solid transparent;
color: @beige;
&.bar-input {
padding: 0;
color: @beige;
backdrop-filter: none;
background: transparent;
transition: all 0.3s ease;
&:hover,
&:focus {
background: @semi-transparent-dark-blue;
backdrop-filter: blur(9.5px);
}
}
}
.bar-label {
width: 40px;
}
}
.progress-bar {
position: absolute;
appearance: none;
width: 100px;
height: 40px;
border: 1px solid @color-border;
border-radius: 6px;
z-index: 1;
background: @dark-blue;
&::-webkit-progress-bar {
border: none;
background: @dark-blue;
border-radius: 6px;
}
&::-webkit-progress-value {
background: @gradient-hp;
border-radius: 6px;
}
&.stress-color::-webkit-progress-value {
background: @gradient-stress;
border-radius: 6px;
}
&::-moz-progress-bar {
background: @gradient-hp;
border-radius: 6px;
}
&.stress-color::-moz-progress-bar {
background: @gradient-stress;
border-radius: 6px;
}
}
}
} }
.status-section { .status-section {
@ -145,21 +245,21 @@
.status-bar.armor-slots { .status-bar.armor-slots {
display: flex; display: flex;
justify-content: center;
position: relative;
width: 95px; width: 95px;
height: 30px;
white-space: nowrap; white-space: nowrap;
.status-label {
height: 30px;
}
.status-label { .status-label {
padding: 2px 2px; padding: 2px 2px;
position: relative; position: relative;
top: 30px;
height: 22px; height: 22px;
width: 95px; width: 95px;
border-radius: 3px; border-radius: 3px;
background: light-dark(@dark-blue, @golden); background: light-dark(@dark-blue, @golden);
clip-path: none;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -191,16 +291,40 @@
} }
} }
.slot-value { .slot-value {
position: absolute;
display: flex;
padding: 0 5px;
font-size: 1.2rem; font-size: 1.2rem;
align-items: center;
width: 80px; width: 80px;
height: 30px; height: 30px;
justify-content: center;
text-align: center;
z-index: 2;
color: light-dark(@dark-blue, @beige); color: light-dark(@dark-blue, @beige);
flex-direction: column; flex-direction: column;
.slot-bar { .slot-bar {
display: flex;
flex-wrap: wrap;
gap: 4px;
padding: 5px;
border: 1px solid @color-border;
border-radius: 6px;
z-index: 1;
background: @dark-blue; background: @dark-blue;
justify-content: center; justify-content: center;
border-bottom: none; color: @color-text-emphatic;
.armor-slot {
cursor: pointer;
transition: all 0.3s ease;
font-size: var(--font-size-12);
.fa-shield-halved {
color: light-dark(@dark-blue-40, @golden-40);
}
}
} }
.slot-label { .slot-label {
display: flex; display: flex;
@ -240,21 +364,41 @@
} }
} }
.status-value { .status-value {
position: absolute;
display: flex;
padding: 0 6px; padding: 0 6px;
font-size: 1.2rem; font-size: 1.2rem;
align-items: center;
width: 80px; width: 80px;
height: 30px; height: 30px;
justify-content: center; justify-content: center;
text-align: center;
z-index: 2;
color: light-dark(@dark-blue, @beige); color: light-dark(@dark-blue, @beige);
border: 1px solid @color-border;
border-bottom: none;
border-radius: 6px 6px 0 0;
input[type='number'] { input[type='number'] {
background: transparent;
font-size: 1.2rem; font-size: 1.2rem;
width: 30px; width: 30px;
height: 20px; height: 20px;
text-align: center;
border: none;
outline: 2px solid transparent;
color: light-dark(@dark-blue, @beige); color: light-dark(@dark-blue, @beige);
&.bar-input { &.bar-input {
padding: 0;
color: light-dark(@dark-blue, @beige); color: light-dark(@dark-blue, @beige);
backdrop-filter: none;
background: transparent;
&:hover,
&:focus {
background: @semi-transparent-dark-blue;
backdrop-filter: blur(9.5px);
}
} }
} }
@ -263,9 +407,32 @@
} }
} }
.progress-bar { .progress-bar {
position: absolute;
appearance: none;
width: 80px;
height: 30px;
border: 1px solid @color-border;
border-radius: 6px;
z-index: 1;
background: light-dark(transparent, @dark-blue); background: light-dark(transparent, @dark-blue);
border-bottom: none; border-bottom: none;
border-radius: 6px 6px 0 0; border-radius: 6px 6px 0 0;
&::-webkit-progress-bar {
border: none;
background: light-dark(transparent, @dark-blue);
}
&::-webkit-progress-value {
background: @gradient-stress;
}
&.stress-color::-webkit-progress-value {
background: @gradient-stress;
}
&::-moz-progress-bar {
background: @gradient-stress;
}
&.stress-color::-moz-progress-bar {
background: @gradient-stress;
}
} }
} }

View file

@ -1,265 +1,295 @@
@import '../../../utils/colors.less'; @import '../../../utils/colors.less';
@import '../../../utils/fonts.less'; @import '../../../utils/fonts.less';
@import '../../../utils/mixin.less'; @import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.party .tab.partyMembers { .application.sheet.daggerheart.actor.dh-style.party .tab.partyMembers {
overflow: auto; overflow: auto;
.actors-list { .actors-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 8px; gap: 8px;
align-items: stretch; align-items: stretch;
width: 100%; width: 100%;
.actor-resources { .actor-resources {
display: grid; display: grid;
grid-template: grid-template:
"img header" min-content "img header" min-content
"img body" 1fr "img body" 1fr
/ 7.5rem 1fr; / 7.5rem 1fr;
gap: 6px; gap: 6px;
column-gap: 12px; column-gap: 12px;
padding: 6px; padding: 6px;
background-color: light-dark(@dark-blue-10, @golden-10); background-color: light-dark(@dark-blue-10, @golden-10);
.actor-img-frame { .actor-img-frame {
grid-area: img; grid-area: img;
width: 7.375rem; width: 7.375rem;
height: 7.375rem; height: 7.375rem;
position: relative; position: relative;
.actor-img { .actor-img {
object-fit: cover; object-fit: cover;
object-position: top center; object-position: top center;
border-radius: 6px; border-radius: 6px;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.equipped-weapons { .equipped-weapons {
position: absolute; position: absolute;
top: -2px; top: -2px;
left: -3px; left: -3px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 1px; gap: 1px;
img { img {
border-radius: 50%; border-radius: 50%;
width: 24px; width: 24px;
height: 24px; height: 24px;
border: 1px solid @color-border; border: 1px solid @color-border;
object-fit: cover; object-fit: cover;
} }
} }
.evasion { .evasion {
position: absolute; position: absolute;
top: 1px; top: 1px;
right: 1px; right: 1px;
width: 1.75rem; width: 1.75rem;
height: 1.75rem; height: 1.75rem;
background: url('../assets/svg/trait-shield.svg') no-repeat; background: url('../assets/svg/trait-shield.svg') no-repeat;
background-size: 100%; background-size: 100%;
color: var(--color-light-1); color: var(--color-light-1);
font-size: var(--font-size-14); font-size: var(--font-size-14);
font-weight: 700; font-weight: 700;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.threshold-section { .threshold-section {
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
bottom: -2px; bottom: -2px;
margin: auto; margin: auto;
display: flex; display: flex;
gap: 4px; gap: 4px;
background-color: light-dark(var(--color-light-1), @dark-blue); background-color: light-dark(var(--color-light-1), @dark-blue);
color: @color-text-emphatic; color: @color-text-emphatic;
padding: 4px 6px; padding: 4px 6px;
border: 1px solid @color-border; border: 1px solid @color-border;
border-radius: 3px; border-radius: 3px;
align-items: baseline; align-items: baseline;
width: fit-content; width: fit-content;
h4 { h4 {
font-weight: bold; font-weight: bold;
text-transform: uppercase; text-transform: uppercase;
white-space: nowrap; white-space: nowrap;
&.threshold-label { &.threshold-label {
font-size: var(--font-size-10); font-size: var(--font-size-10);
color: @color-text-emphatic; color: @color-text-emphatic;
} }
&.threshold-value { &.threshold-value {
font-size: var(--font-size-11); font-size: var(--font-size-11);
color: light-dark(@dark, @beige); color: light-dark(@dark, @beige);
} }
} }
} }
} }
header { header {
grid-area: header; grid-area: header;
display: grid; display: grid;
grid-template: grid-template:
"name hope" min-content "name hope" min-content
"subtitle subtitle" min-content "subtitle subtitle" min-content
/ 1fr min-content; / 1fr min-content;
.actor-name { .actor-name {
width: 100%; width: 100%;
z-index: 1; z-index: 1;
font-size: var(--font-size-20); font-size: var(--font-size-20);
color: @color-text-emphatic; color: @color-text-emphatic;
font-weight: bold; font-weight: bold;
} }
.delete-icon { .delete-icon {
font-size: 0.75em; font-size: 0.75em;
} }
.subtitle { .subtitle {
grid-area: subtitle; grid-area: subtitle;
font-size: var(--font-size-14); font-size: var(--font-size-14);
} }
.hope-section { .hope-section {
display: flex; display: flex;
background-color: light-dark(transparent, @dark-blue); background-color: light-dark(transparent, @dark-blue);
color: @color-text-emphatic; color: @color-text-emphatic;
padding: 3px 6px; padding: 3px 6px;
border: 1px solid @color-border; border: 1px solid @color-border;
border-radius: 3px; border-radius: 3px;
align-items: center; align-items: center;
width: fit-content; width: fit-content;
margin-left: auto; margin-left: auto;
h4 { h4 {
font-size: var(--font-size-12); font-size: var(--font-size-12);
font-weight: bold; font-weight: bold;
text-transform: uppercase; text-transform: uppercase;
color: @color-text-emphatic; color: @color-text-emphatic;
margin-right: 3px; margin-right: 3px;
} }
.hope-value { .hope-value {
display: flex; display: flex;
cursor: pointer; cursor: pointer;
font-size: var(--font-size-12); font-size: var(--font-size-12);
margin-left: 1px; margin-left: 1px;
} }
} }
} }
.body { .body {
grid-area: body; grid-area: body;
display: flex; display: flex;
align-items: start; align-items: start;
justify-content: space-between; justify-content: space-between;
} }
.resources { .resources {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 4px;
.slot-section { .slot-section {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: stretch; align-items: stretch;
.slot-label { .slot-label {
display: flex; display: flex;
align-items: center; align-items: center;
color: light-dark(@beige, @dark-blue); color: light-dark(@beige, @dark-blue);
background: light-dark(@dark-blue, @golden); background: light-dark(@dark-blue, @golden);
padding: 0 4px; padding: 0 4px;
width: fit-content; width: fit-content;
font-weight: bold; font-weight: bold;
border-radius: 6px 0px 0px 6px; border-radius: 6px 0px 0px 6px;
font-size: var(--font-size-12); font-size: var(--font-size-12);
white-space: nowrap; white-space: nowrap;
.label { .label {
padding-right: 2px; padding-right: 2px;
} }
.value { .value {
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
.current { .current {
display: inline-block; display: inline-block;
text-align: end; text-align: end;
width: 2ch; width: 2ch;
} }
.max { .max {
display: inline-block; display: inline-block;
text-align: start; text-align: start;
width: 2ch; width: 2ch;
} }
} }
} }
.slot-bar { .slot-bar {
align-items: center; display: flex;
flex-wrap: wrap; align-items: center;
background-color: light-dark(@dark-blue-10, @dark-blue); flex-wrap: wrap;
padding: 2px 5px; gap: 4px;
border-radius: 0 6px 6px 0;
width: fit-content; background-color: light-dark(@dark-blue-10, @dark-blue);
} color: @color-text-emphatic;
} padding: 2px 5px;
} border: 1px solid @color-border;
border-radius: 0 6px 6px 0;
.traits { width: fit-content;
background-color: light-dark(@dark-blue-10, @dark-blue); min-height: 22px;
border: 1px solid @color-border;
border-radius: 6px; .armor-slot {
display: grid; cursor: pointer;
grid-template-columns: 1fr 1fr; transition: all 0.3s ease;
font-size: var(--font-size-12); font-size: var(--font-size-12);
padding: 3px 4px;
gap: 3px 7px; .fa-shield-halved {
.trait { color: light-dark(@dark-blue-40, @golden-40);
display: flex; }
justify-content: space-between; }
gap: 3px;
.label { .slot {
color: @color-text-emphatic; width: 16px;
} height: 10px;
.value { border: 1px solid @color-border;
font-weight: 600; background: light-dark(@dark-blue-10, @golden-10);
} border-radius: 3px;
} transition: all 0.3s ease;
} cursor: pointer;
}
} &.filled {
background: light-dark(@dark-blue, @golden);
.actors-list.limited { }
.actor-resources { }
display: flex; }
align-items: center; }
} }
.actor-img-frame {
width: 3rem; .traits {
height: 3rem; background-color: light-dark(@dark-blue-10, @dark-blue);
} border: 1px solid @color-border;
} border-radius: 6px;
display: grid;
.actors-dragger { grid-template-columns: 1fr 1fr;
display: flex; font-size: var(--font-size-12);
align-items: center; padding: 3px 4px;
justify-content: center; gap: 3px 7px;
box-sizing: border-box; .trait {
width: 100%; display: flex;
height: 40px; justify-content: space-between;
border: 1px dashed light-dark(@dark-blue-50, @beige-50); gap: 3px;
border-radius: 3px; .label {
color: light-dark(@dark-blue-50, @beige-50); color: @color-text-emphatic;
} }
} .value {
font-weight: 600;
}
}
}
}
}
.actors-list.limited {
.actor-resources {
display: flex;
align-items: center;
}
.actor-img-frame {
width: 3rem;
height: 3rem;
}
}
.actors-dragger {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: 100%;
height: 40px;
border: 1px dashed light-dark(@dark-blue-50, @beige-50);
border-radius: 3px;
color: light-dark(@dark-blue-50, @beige-50);
}
}

View file

@ -11,10 +11,9 @@
<a class="btn" data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeElement" data-index="{{index}}"><i class="fas fa-trash"></i></a> <a class="btn" data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeElement" data-index="{{index}}"><i class="fas fa-trash"></i></a>
</div> </div>
<div class="nest-inputs"> <div class="nest-inputs">
{{formField ../fields.type value=area.type name=(concat "areas." index ".type") localize=true blank=false}} {{formField ../fields.type value=area.type name=(concat "areas." index ".type") localize=true}}
{{formField ../fields.shape value=area.shape name=(concat "areas." index ".shape") localize=true blank=false}} {{formField ../fields.shape value=area.shape name=(concat "areas." index ".shape") localize=true}}
{{formField ../fields.size value=area.size name=(concat "areas." index ".size") localize=true blank=false}} {{formField ../fields.size value=area.size name=(concat "areas." index ".size") localize=true}}
{{formField ../fields.hasHole value=area.hasHole name=(concat "areas." index ".hasHole") localize=true classes="auto-sized" }}
</div> </div>
<div class="sub-section-header"> <div class="sub-section-header">

View file

@ -1,102 +1,100 @@
<aside class="adversary-sidebar-sheet"> <aside class="adversary-sidebar-sheet">
<div class="portrait {{#if (and source.system.resources.hitPoints.max (gte source.system.resources.hitPoints.value source.system.resources.hitPoints.max))}}death-roll{{/if}}"> <div class="portrait {{#if (and source.system.resources.hitPoints.max (gte source.system.resources.hitPoints.value source.system.resources.hitPoints.max))}}death-roll{{/if}}">
<img src="{{source.img}}" alt="{{source.name}}" data-action='editImage' data-edit="img"> <img src="{{source.img}}" alt="{{source.name}}" data-action='editImage' data-edit="img">
<a class="death-roll-btn"><i class="fa-solid fa-skull death-save"></i></a> <a class="death-roll-btn"><i class="fa-solid fa-skull death-save"></i></a>
</div> </div>
<div class="info-section {{#if useResourcePips}}pip-display{{/if}}"> <div class="info-section {{#if useResourcePips}}pip-display{{/if}}">
<div class="resources-section"> <div class="resources-section">
{{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.hitPoints label="DAGGERHEART.GENERAL.HitPoints.short" key="system.resources.hitPoints.value" action="toggleHitPoints" }} {{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.hitPoints label="DAGGERHEART.GENERAL.HitPoints.short" key="system.resources.hitPoints.value" action="toggleHitPoints" }}
{{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.stress label="DAGGERHEART.GENERAL.stress" key="system.resources.stress.value" action="toggleStress" }} {{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.stress label="DAGGERHEART.GENERAL.stress" key="system.resources.stress.value" action="toggleStress" }}
</div> </div>
<div class="status-section"> <div class="status-section">
<div class="status-number"> <div class="status-number">
<div class='status-value armor-slots'> <div class='status-value armor-slots'>
{{#if source.system.difficulty}} {{#if source.system.difficulty}}
<p>{{source.system.difficulty}}</p> <p>{{source.system.difficulty}}</p>
{{else}} {{else}}
<p>-</p> <p>-</p>
{{/if}} {{/if}}
</div> </div>
<div class="status-label"> <div class="status-label">
<h4>{{localize "DAGGERHEART.GENERAL.difficulty"}}</h4> <h4>{{localize "DAGGERHEART.GENERAL.difficulty"}}</h4>
</div> </div>
</div> </div>
<div class="status-number"> <div class="status-number">
<div class='status-value armor-slots'> <div class='status-value armor-slots'>
{{#if source.system.attack.roll.bonus includeZero=true}} {{#if source.system.attack.roll.bonus includeZero=true}}
<p>{{numberFormat source.system.attack.roll.bonus sign=true}}</p> <p>{{numberFormat source.system.attack.roll.bonus sign=true}}</p>
{{else}} {{else}}
<p>-</p> <p>-</p>
{{/if}} {{/if}}
</div> </div>
<div class="status-label"> <div class="status-label">
<h4>{{localize "DAGGERHEART.GENERAL.attack"}}</h4> <h4>{{localize "DAGGERHEART.GENERAL.attack"}}</h4>
</div> </div>
</div> </div>
{{#if (lt source.system.criticalThreshold 20)}} {{#if (lt source.system.criticalThreshold 20)}}
<div class="status-number"> <div class="status-number">
<div class='status-value armor-slots'> <div class='status-value armor-slots'>
<p>{{source.system.criticalThreshold}}+</p> <p>{{source.system.criticalThreshold}}+</p>
</div> </div>
<div class="status-label"> <div class="status-label">
<h4>{{localize "DAGGERHEART.GENERAL.criticalShort"}}</h4> <h4>{{localize "DAGGERHEART.GENERAL.criticalShort"}}</h4>
</div> </div>
</div> </div>
{{/if}} {{/if}}
</div> </div>
<div class="status-section"> <div class="status-section">
<div class="threshold-section"> <div class="threshold-section">
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.minor"}}</h4> <h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.minor"}}</h4>
<h4 class="threshold-value">{{document.system.damageThresholds.major}}</h4> <h4 class="threshold-value">{{document.system.damageThresholds.major}}</h4>
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.major"}}</h4> <h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.major"}}</h4>
<h4 class="threshold-value">{{document.system.damageThresholds.severe}}</h4> <h4 class="threshold-value">{{document.system.damageThresholds.severe}}</h4>
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.severe"}}</h4> <h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.severe"}}</h4>
</div> </div>
</div> </div>
</div> </div>
<div class="shortcut-items-section"> <div class="shortcut-items-section">
<div class="attack-section"> <div class="attack-section">
<div class="title"> <div class="title">
<side-line-div class="invert"></side-line-div> <side-line-div class="invert"></side-line-div>
<h3>{{localize "DAGGERHEART.GENERAL.attack"}}</h3> <h3>{{localize "DAGGERHEART.GENERAL.attack"}}</h3>
<side-line-div></side-line-div> <side-line-div></side-line-div>
</div> </div>
<ul class="items-sidebar-list"> <ul class="items-sidebar-list">
{{> 'daggerheart.inventory-item-compact' {{> 'daggerheart.inventory-item-compact'
item=document.system.attack item=document.system.attack
type='attack' type='attack'
noCompendiumEdit=true noCompendiumEdit=true
}} }}
</ul> </ul>
</div> </div>
<div class="experience-section"> <div class="experience-section">
<div class="title"> <div class="title">
<side-line-div class="invert"></side-line-div> <side-line-div class="invert"></side-line-div>
<h3>{{localize "DAGGERHEART.GENERAL.experience.plural"}}</h3> <h3>{{localize "DAGGERHEART.GENERAL.experience.plural"}}</h3>
<side-line-div></side-line-div> <side-line-div></side-line-div>
</div> </div>
<div class="experience-list"> <div class="experience-list">
{{#each source.system.experiences as |experience id|}} {{#each source.system.experiences as |experience id|}}
<div class="experience-row" data-tooltip-text="{{experience.description}}"> <div class="experience-row" data-tooltip-text="{{experience.description}}">
<span class="experience-value"> <span class="experience-value">
+{{experience.value}} +{{experience.value}}
</span> </span>
<span class="experience-name">{{experience.name}}</span> <span class="experience-name">{{experience.name}}</span>
<div class="controls"> <div class="controls">
<a data-action="sendExpToChat" data-id="{{id}}"> <a data-action="sendExpToChat" data-id="{{id}}">
<i class="fa-regular fa-message"></i> <i class="fa-regular fa-message"></i>
</a> </a>
</div> </div>
</div> </div>
{{/each}} {{/each}}
</div> </div>
</div> </div>
</div> <line-div></line-div>
<div class="reaction-section"> <div class="reaction-section">
<button type="button" data-action="reactionRoll"> <button type="button" data-action="reactionRoll">{{localize "DAGGERHEART.GENERAL.Roll.reaction"}}</button>
<i class="fa-solid fa-dice"></i> </div>
{{localize "DAGGERHEART.GENERAL.Roll.reaction"}} </div>
</button>
</div>
</aside> </aside>

View file

@ -1,152 +1,152 @@
<aside class="character-sidebar-sheet"> <aside class="character-sidebar-sheet">
<div class="portrait {{#if isDeath}}death-roll{{/if}}"> <div class="portrait {{#if isDeath}}death-roll{{/if}}">
<img src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img"> <img src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
<a class="death-roll-btn" data-tooltip="DAGGERHEART.UI.Tooltip.makeDeathMove" {{#if <a class="death-roll-btn" data-tooltip="DAGGERHEART.UI.Tooltip.makeDeathMove" {{#if
isDeath}}data-action="makeDeathMove" {{/if}}><i class="fa-solid fa-skull death-save"></i></a> isDeath}}data-action="makeDeathMove" {{/if}}><i class="fa-solid fa-skull death-save"></i></a>
</div> </div>
<div class="info-section {{#if useResourcePips}}pip-display{{/if}}"> <div class="info-section {{#if useResourcePips}}pip-display{{/if}}">
<div class="resources-section"> <div class="resources-section">
{{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.hitPoints label="DAGGERHEART.GENERAL.HitPoints.short" key="system.resources.hitPoints.value" action="toggleHitPoints" }} {{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.hitPoints label="DAGGERHEART.GENERAL.HitPoints.short" key="system.resources.hitPoints.value" action="toggleHitPoints" }}
{{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.stress label="DAGGERHEART.GENERAL.stress" key="system.resources.stress.value" action="toggleStress" }} {{> "systems/daggerheart/templates/sheets/global/partials/resource-bar.hbs" resource=resources.stress label="DAGGERHEART.GENERAL.stress" key="system.resources.stress.value" action="toggleStress" }}
</div> </div>
<div class="status-section {{#if useResourcePips}}pip-display{{/if}}"> <div class="status-section {{#if useResourcePips}}pip-display{{/if}}">
<div class="status-number"> <div class="status-number">
<div class='status-value'> <div class='status-value'>
<p>{{document.system.evasion}}</p> <p>{{document.system.evasion}}</p>
</div> </div>
<div class="status-label"> <div class="status-label">
<h4>{{localize "DAGGERHEART.GENERAL.evasion"}}</h4> <h4>{{localize "DAGGERHEART.GENERAL.evasion"}}</h4>
</div> </div>
</div> </div>
{{#if document.system.armorScore.max}} {{#if document.system.armorScore.max}}
<div class="status-bar armor-slots"> <div class="status-bar armor-slots">
{{#if useResourcePips}} {{#if useResourcePips}}
<div class='slot-value'> <div class='slot-value'>
<div class="slot-bar armor"> <div class="slot-bar">
{{#times document.system.armorScore.max}} {{#times document.system.armorScore.max}}
<a class="slot" data-action="toggleArmor" data-value="{{add this 1}}"> <a class='armor-slot' data-action='toggleArmor' data-value="{{add this 1}}">
{{#if (gte ../document.system.armorScore.value (add this 1))}} {{#if (gte ../document.system.armorScore.value (add this 1))}}
<i class="fa-solid fa-shield"></i> <i class="fa-solid fa-shield"></i>
{{else}} {{else}}
<i class="fa-solid fa-shield-halved"></i> <i class="fa-solid fa-shield-halved"></i>
{{/if}} {{/if}}
</a> </a>
{{/times}} {{/times}}
</div> </div>
<a class="slot-label" data-action="toggleArmorMangement" {{disabled (not @root.editable)}}> <a class="slot-label" data-action="toggleArmorMangement" {{disabled (not @root.editable)}}>
<span class="label">{{localize "DAGGERHEART.GENERAL.armorSlots"}}</span> <span class="label">{{localize "DAGGERHEART.GENERAL.armorSlots"}}</span>
<div class="slot-value-container"> <div class="slot-value-container">
<span class="value">{{document.system.armorScore.value}} / {{document.system.armorScore.max}}</span> <span class="value">{{document.system.armorScore.value}} / {{document.system.armorScore.max}}</span>
{{#if @root.editable}}<i class="fa-solid fa-gear" inert></i>{{/if}} {{#if @root.editable}}<i class="fa-solid fa-gear" inert></i>{{/if}}
</div> </div>
</a> </a>
</div> </div>
{{else}} {{else}}
<div class='status-value'> <div class='status-value'>
<progress <input class="bar-input armor-marks-input" value="{{document.system.armorScore.value}}" type="number" id="{{document.uuid}}-armor-slots">
class='progress-bar stress-color' <span>/</span>
value='{{document.system.armorScore.value}}' <span class="bar-label">{{document.system.armorScore.max}}</span>
max='{{document.system.armorScore.max}}' </div>
></progress> <progress
<input class="bar-input armor-marks-input" value="{{document.system.armorScore.value}}" type="number" id="{{document.uuid}}-armor-slots"> class='progress-bar stress-color'
<span>/</span> value='{{document.system.armorScore.value}}'
<span class="bar-label">{{document.system.armorScore.max}}</span> max='{{document.system.armorScore.max}}'
</div> ></progress>
<a class="status-label" data-action="toggleArmorMangement" {{disabled (not @root.editable)}}> <a class="status-label" data-action="toggleArmorMangement" {{disabled (not @root.editable)}}>
<h4>{{localize "DAGGERHEART.GENERAL.armorSlots"}}</h4> <h4>{{localize "DAGGERHEART.GENERAL.armorSlots"}}</h4>
{{#if @root.editable}}<i class="fa-solid fa-gear" inert></i>{{/if}} {{#if @root.editable}}<i class="fa-solid fa-gear" inert></i>{{/if}}
</a> </a>
{{/if}} {{/if}}
</div> </div>
{{else}} {{else}}
<div class="status-number armor-slots"> <div class="status-number armor-slots">
<div class='status-value'> <div class='status-value'>
<p>-</p> <p>-</p>
</div> </div>
<div class="status-label"> <div class="status-label">
<h4>{{localize "DAGGERHEART.GENERAL.armorSlots"}}</h4> <h4>{{localize "DAGGERHEART.GENERAL.armorSlots"}}</h4>
</div> </div>
</div> </div>
{{/if}} {{/if}}
<div class="status-number"> <div class="status-number">
<div class='status-value'> <div class='status-value'>
<p>{{document.system.proficiency}}</p> <p>{{document.system.proficiency}}</p>
</div> </div>
<div class="status-label"> <div class="status-label">
<h4>{{localize "DAGGERHEART.GENERAL.proficiency"}}</h4> <h4>{{localize "DAGGERHEART.GENERAL.proficiency"}}</h4>
</div> </div>
</div> </div>
</div> </div>
<div class="threshold-section"> <div class="threshold-section">
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.minor"}}</h4> <h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.minor"}}</h4>
<h4 class="threshold-value">{{document.system.damageThresholds.major}}</h4> <h4 class="threshold-value">{{document.system.damageThresholds.major}}</h4>
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.major"}}</h4> <h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.major"}}</h4>
<h4 class="threshold-value">{{document.system.damageThresholds.severe}}</h4> <h4 class="threshold-value">{{document.system.damageThresholds.severe}}</h4>
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.severe"}}</h4> <h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.severe"}}</h4>
</div> </div>
</div> </div>
<div class="shortcut-items-section"> <div class="shortcut-items-section">
<div class="equipment-section"> <div class="equipment-section">
<div class="title"> <div class="title">
<side-line-div class="invert"></side-line-div> <side-line-div class="invert"></side-line-div>
<h3>{{localize "DAGGERHEART.GENERAL.equipment"}}</h3> <h3>{{localize "DAGGERHEART.GENERAL.equipment"}}</h3>
<side-line-div></side-line-div> <side-line-div></side-line-div>
</div> </div>
<ul class="items-sidebar-list"> <ul class="items-sidebar-list">
{{#if document.system.usedUnarmed}} {{#if document.system.usedUnarmed}}
{{> 'daggerheart.inventory-item-compact' {{> 'daggerheart.inventory-item-compact'
item=document.system.usedUnarmed item=document.system.usedUnarmed
type='attack' type='attack'
}} }}
{{/if}} {{/if}}
{{#each equippedItems as |item|}} {{#each equippedItems as |item|}}
{{> 'daggerheart.inventory-item-compact' {{> 'daggerheart.inventory-item-compact'
item=item item=item
type=item.type type=item.type
}} }}
{{/each}} {{/each}}
</ul> </ul>
</div> </div>
<div class="loadout-section"> <div class="loadout-section">
<div class="title"> <div class="title">
<side-line-div class="invert"></side-line-div> <side-line-div class="invert"></side-line-div>
<h3>{{localize "DAGGERHEART.GENERAL.loadout"}}</h3> <h3>{{localize "DAGGERHEART.GENERAL.loadout"}}</h3>
<side-line-div></side-line-div> <side-line-div></side-line-div>
</div> </div>
<ul class="items-sidebar-list"> <ul class="items-sidebar-list">
{{#each document.system.domainCards.loadout as |card|}} {{#each document.system.domainCards.loadout as |card|}}
{{> 'daggerheart.inventory-item-compact' {{> 'daggerheart.inventory-item-compact'
item=card item=card
type='domainCard' type='domainCard'
}} }}
{{/each}} {{/each}}
</ul> </ul>
</div> </div>
<div class="experience-section"> <div class="experience-section">
<div class="title"> <div class="title">
<side-line-div class="invert"></side-line-div> <side-line-div class="invert"></side-line-div>
<h3>{{localize "DAGGERHEART.GENERAL.experience.single"}}</h3> <h3>{{localize "DAGGERHEART.GENERAL.experience.single"}}</h3>
<side-line-div></side-line-div> <side-line-div></side-line-div>
</div> </div>
<div class="experience-list"> <div class="experience-list">
{{#each document.system.experiences as |experience id|}} {{#each document.system.experiences as |experience id|}}
<div class="experience-row" data-tooltip-text="{{experience.description}}"> <div class="experience-row" data-tooltip-text="{{experience.description}}">
<span class="experience-value"> <span class="experience-value">
{{numberFormat experience.value sign=true}} {{numberFormat experience.value sign=true}}
</span> </span>
<span class="experience-name">{{experience.name}}</span> <span class="experience-name">{{experience.name}}</span>
<div class="controls"> <div class="controls">
<a data-action="sendExpToChat" data-type="experience" data-id="{{id}}"> <a data-action="sendExpToChat" data-type="experience" data-id="{{id}}">
<i class="fa-regular fa-message"></i> <i class="fa-regular fa-message"></i>
</a> </a>
</div> </div>
</div> </div>
{{/each}} {{/each}}
</div> </div>
</div> </div>
</div> </div>
</aside> </aside>

View file

@ -1,191 +1,191 @@
<section <section
class='tab {{tabs.partyMembers.cssClass}} {{tabs.partyMembers.id}}' class='tab {{tabs.partyMembers.cssClass}} {{tabs.partyMembers.id}}'
data-tab='{{tabs.partyMembers.id}}' data-tab='{{tabs.partyMembers.id}}'
data-group='{{tabs.partyMembers.group}}' data-group='{{tabs.partyMembers.group}}'
> >
<div class="actions-section"> <div class="actions-section">
<button data-action="tagTeamRoll" class="{{#if tagTeamActive}}active-action{{/if}}"> <button data-action="tagTeamRoll" class="{{#if tagTeamActive}}active-action{{/if}}">
<i class="fa-solid fa-user-group"></i> <i class="fa-solid fa-user-group"></i>
<span>{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.title"}}</span> <span>{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.title"}}</span>
</button> </button>
<button data-action="groupRoll" class="{{#if groupRollActive}}active-action{{/if}}"> <button data-action="groupRoll" class="{{#if groupRollActive}}active-action{{/if}}">
<i class="fa-solid fa-users"></i> <i class="fa-solid fa-users"></i>
<span>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.title"}}</span> <span>{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.title"}}</span>
</button> </button>
<button data-action="triggerRest" data-action="triggerRest" data-type="shortRest"> <button data-action="triggerRest" data-action="triggerRest" data-type="shortRest">
<i class="fa-solid fa-utensils"></i> <i class="fa-solid fa-utensils"></i>
<span>{{localize "DAGGERHEART.APPLICATIONS.Downtime.shortRest.title"}}</span> <span>{{localize "DAGGERHEART.APPLICATIONS.Downtime.shortRest.title"}}</span>
</button> </button>
<button data-action="triggerRest" data-type="longRest"> <button data-action="triggerRest" data-type="longRest">
<i class="fa-solid fa-bed"></i> <i class="fa-solid fa-bed"></i>
<span>{{localize "DAGGERHEART.APPLICATIONS.Downtime.longRest.title"}}</span> <span>{{localize "DAGGERHEART.APPLICATIONS.Downtime.longRest.title"}}</span>
</button> </button>
</div> </div>
{{#if @root.showStats}} {{#if @root.showStats}}
<ul class="actors-list"> <ul class="actors-list">
{{#each partyMembers as |member id|}} {{#each partyMembers as |member id|}}
<li class="actor-resources"> <li class="actor-resources">
<div class="actor-img-frame"> <div class="actor-img-frame">
<img class="actor-img" src="{{member.img}}"> <img class="actor-img" src="{{member.img}}">
{{#if member.weapons}} {{#if member.weapons}}
<div class="equipped-weapons"> <div class="equipped-weapons">
{{#each member.weapons as |weapon|}} {{#each member.weapons as |weapon|}}
<img src="{{weapon.img}}" data-tooltip="{{weapon.name}}"/> <img src="{{weapon.img}}" data-tooltip="{{weapon.name}}"/>
{{/each}} {{/each}}
</div> </div>
{{/if}} {{/if}}
{{#if member.evasion includeZero=true}} {{#if member.evasion includeZero=true}}
<div class="evasion" data-tooltip="DAGGERHEART.GENERAL.evasion">{{member.evasion}}</div> <div class="evasion" data-tooltip="DAGGERHEART.GENERAL.evasion">{{member.evasion}}</div>
{{/if}} {{/if}}
{{#if member.difficulty includeZero=true}} {{#if member.difficulty includeZero=true}}
<div class="evasion" data-tooltip="DAGGERHEART.GENERAL.difficulty">{{member.difficulty}}</div> <div class="evasion" data-tooltip="DAGGERHEART.GENERAL.difficulty">{{member.difficulty}}</div>
{{/if}} {{/if}}
{{#unless (or (eq member.type 'companion') (eq member.type 'npc'))}} {{#unless (or (eq member.type 'companion') (eq member.type 'npc'))}}
<div class="threshold-section"> <div class="threshold-section">
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.minor"}}</h4> <h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.minor"}}</h4>
<h4 class="threshold-value">{{member.damageThresholds.major}}</h4> <h4 class="threshold-value">{{member.damageThresholds.major}}</h4>
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.major"}}</h4> <h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.major"}}</h4>
<h4 class="threshold-value">{{member.damageThresholds.severe}}</h4> <h4 class="threshold-value">{{member.damageThresholds.severe}}</h4>
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.severe"}}</h4> <h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.severe"}}</h4>
</div> </div>
{{/unless}} {{/unless}}
</div> </div>
<header> <header>
<h2 class="actor-name"> <h2 class="actor-name">
<a data-action="openDocument" data-uuid="{{member.uuid}}">{{member.name}}</a> <a data-action="openDocument" data-uuid="{{member.uuid}}">{{member.name}}</a>
<a class="delete-icon" data-action="deletePartyMember" data-uuid="{{member.uuid}}"><i class="fa-regular fa-times" inert></i></a> <a class="delete-icon" data-action="deletePartyMember" data-uuid="{{member.uuid}}"><i class="fa-regular fa-times" inert></i></a>
</h2> </h2>
<div> <div>
{{#unless (or (eq member.type 'companion') (eq member.type 'adversary') (eq member.type 'npc')) }} {{#unless (or (eq member.type 'companion') (eq member.type 'adversary') (eq member.type 'npc')) }}
<div class="hope-section"> <div class="hope-section">
<h4>{{localize "DAGGERHEART.GENERAL.hope"}}</h4> <h4>{{localize "DAGGERHEART.GENERAL.hope"}}</h4>
{{#times member.resources.hope.max}} {{#times member.resources.hope.max}}
<span class='hope-value' data-action='toggleHope' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}"> <span class='hope-value' data-action='toggleHope' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
{{#if (gte member.resources.hope.value (add this 1))}} {{#if (gte member.resources.hope.value (add this 1))}}
<i class='fa-solid fa-diamond'></i> <i class='fa-solid fa-diamond'></i>
{{else}} {{else}}
<i class='fa-regular fa-circle'></i> <i class='fa-regular fa-circle'></i>
{{/if}} {{/if}}
</span> </span>
{{/times}} {{/times}}
</div> </div>
{{/unless}} {{/unless}}
</div> </div>
{{#if member.subtitle}} {{#if member.subtitle}}
<span class="subtitle">{{member.subtitle}}</span> <span class="subtitle">{{member.subtitle}}</span>
{{/if}} {{/if}}
</header> </header>
<section class="body"> <section class="body">
<section class="resources"> <section class="resources">
{{#unless (or (eq member.type 'companion') (eq member.type 'npc')) }} {{#unless (or (eq member.type 'companion') (eq member.type 'npc')) }}
<div class="slot-section"> <div class="slot-section">
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.HitPoints.plural"> <div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.HitPoints.plural">
<span class="label"> <span class="label">
<i class="fa-solid fa-heart" inert></i> <i class="fa-solid fa-heart" inert></i>
</span> </span>
<span class="value"> <span class="value">
<span class="current">{{member.resources.hitPoints.value}}</span> <span class="current">{{member.resources.hitPoints.value}}</span>
/ /
<span class="max">{{member.resources.hitPoints.max}}</span> <span class="max">{{member.resources.hitPoints.max}}</span>
</span> </span>
</div> </div>
<div class="slot-bar"> <div class="slot-bar">
{{#times member.resources.hitPoints.max}} {{#times member.resources.hitPoints.max}}
<span class='slot {{#if (gte member.resources.hitPoints.value (add this 1))}}filled{{/if}}' <span class='slot {{#if (gte member.resources.hitPoints.value (add this 1))}}filled{{/if}}'
data-action='toggleHitPoints' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}"> data-action='toggleHitPoints' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
</span> </span>
{{/times}} {{/times}}
</div> </div>
</div> </div>
{{/unless}} {{/unless}}
{{#unless (eq member.type 'npc')}} {{#unless (eq member.type 'npc')}}
<div class="slot-section"> <div class="slot-section">
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.stress"> <div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.stress">
<span class="label"> <span class="label">
<i class="fa-solid fa-bolt" inert></i> <i class="fa-solid fa-bolt" inert></i>
</span> </span>
<span class="value"> <span class="value">
<span class="current">{{member.resources.stress.value}}</span> <span class="current">{{member.resources.stress.value}}</span>
/ /
<span class="max">{{member.resources.stress.max}}</span> <span class="max">{{member.resources.stress.max}}</span>
</span> </span>
</div> </div>
<div class="slot-bar"> <div class="slot-bar">
{{#times member.resources.stress.max}} {{#times member.resources.stress.max}}
<span class='slot {{#if (gte member.resources.stress.value (add this 1))}}filled{{/if}}' <span class='slot {{#if (gte member.resources.stress.value (add this 1))}}filled{{/if}}'
data-action='toggleStress' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}"> data-action='toggleStress' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
</span> </span>
{{/times}} {{/times}}
</div> </div>
</div> </div>
{{/unless}} {{/unless}}
{{#if member.armorScore.max}} {{#if member.armorScore.max}}
<div class="slot-section"> <div class="slot-section">
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.armorSlots"> <div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.armorSlots">
<span class="label"> <span class="label">
<i class="fa-solid fa-shield" inert></i> <i class="fa-solid fa-shield" inert></i>
</span> </span>
<span class="value"> <span class="value">
<span class="current">{{member.armorScore.value}}</span> <span class="current">{{member.armorScore.value}}</span>
/ /
<span class="max">{{member.armorScore.max}}</span> <span class="max">{{member.armorScore.max}}</span>
</span> </span>
</div> </div>
<div class="slot-bar armor"> <div class="slot-bar">
{{#times member.armorScore.max}} {{#times member.armorScore.max}}
<a class="slot" data-action="toggleArmorSlot" data-actor-id="{{member.uuid}}" data-value="{{add this 1}}"> <a class='armor-slot' data-action='toggleArmorSlot' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
{{#if (gte member.armorScore.value (add this 1))}} {{#if (gte member.armorScore.value (add this 1))}}
<i class="fa-solid fa-shield"></i> <i class="fa-solid fa-shield"></i>
{{else}} {{else}}
<i class="fa-solid fa-shield-halved"></i> <i class="fa-solid fa-shield-halved"></i>
{{/if}} {{/if}}
</a> </a>
{{/times}} {{/times}}
</div> </div>
</div> </div>
{{/if}} {{/if}}
</section> </section>
{{#if member.traits}} {{#if member.traits}}
<div class="traits"> <div class="traits">
{{#each member.traits as |trait|}} {{#each member.traits as |trait|}}
<span class="trait"> <span class="trait">
<span class="label">{{trait.label}}</span> <span class="label">{{trait.label}}</span>
<span class="value">{{trait.value}}</span> <span class="value">{{trait.value}}</span>
</span> </span>
{{/each}} {{/each}}
</div> </div>
{{/if}} {{/if}}
</section> </section>
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
{{else}} {{else}}
<ul class="actors-list limited"> <ul class="actors-list limited">
{{#each partyMembers as |member id|}} {{#each partyMembers as |member id|}}
<li class="actor-resources"> <li class="actor-resources">
<div class="actor-img-frame"> <div class="actor-img-frame">
<img class="actor-img" src="{{member.img}}"> <img class="actor-img" src="{{member.img}}">
</div> </div>
<header> <header>
<h2 class="actor-name"> <h2 class="actor-name">
<a data-action="openDocument" data-uuid="{{member.uuid}}">{{member.name}}</a> <a data-action="openDocument" data-uuid="{{member.uuid}}">{{member.name}}</a>
<a class="delete-icon" data-action="deletePartyMember" data-uuid="{{member.uuid}}"><i class="fa-regular fa-times" inert></i></a> <a class="delete-icon" data-action="deletePartyMember" data-uuid="{{member.uuid}}"><i class="fa-regular fa-times" inert></i></a>
</h2> </h2>
{{#if member.subtitle}} {{#if member.subtitle}}
<span class="subtitle">{{member.subtitle}}</span> <span class="subtitle">{{member.subtitle}}</span>
{{/if}} {{/if}}
</header> </header>
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
{{/if}} {{/if}}
{{#unless document.system.partyMembers.length}} {{#unless document.system.partyMembers.length}}
<div class="actors-dragger"> <div class="actors-dragger">
<span>{{localize "DAGGERHEART.GENERAL.dropActorsHere"}}</span> <span>{{localize "DAGGERHEART.GENERAL.dropActorsHere"}}</span>
</div> </div>
{{/unless}} {{/unless}}
</section> </section>

View file

@ -1,35 +1,35 @@
{{#if useResourcePips}} <div class="status-bar">
<div class="slot-value"> {{#if useResourcePips}}
<div class="slot-bar"> <div class='slot-value'>
{{#times resource.max}} <div class="slot-bar">
<span class='slot {{#if (gte ../resource.value (add this 1))}}filled{{/if}} {{#if ../largePips}}large{{/if}}' data-action="{{../action}}" data-value="{{add this 1}}"> {{#times resource.max}}
</span> <span class='slot {{#if (gte ../resource.value (add this 1))}}filled{{/if}} {{#if ../largePips}}large{{/if}}' data-action="{{../action}}" data-value="{{add this 1}}">
{{/times}} </span>
{{/times}}
{{#times resource.emptyPips}}
<span class="empty-slot"></span> {{#times resource.emptyPips}}
{{/times}} <span class="empty-slot"></span>
{{/times}}
</div>
<div class="slot-label">
<span class="label">{{localize label}}</span>
<span class="value">{{resource.value}} / {{resource.max}}</span>
</div>
</div> </div>
<div class="slot-label"> {{else}}
<span class="label">{{localize label}}</span>
<span class="value">{{resource.value}} / {{resource.max}}</span>
</div>
</div>
{{else}}
<div class="status-bar">
<div class='status-value'> <div class='status-value'>
<progress
class='progress-bar'
max='{{resource.max}}'
value='{{resource.value}}'
></progress>
<input class="bar-input" name="{{key}}" min="0" max='{{resource.max}}' <input class="bar-input" name="{{key}}" min="0" max='{{resource.max}}'
value="{{resource.value}}" type="number"> value="{{resource.value}}" type="number">
<span>/</span> <span>/</span>
<span class="bar-label">{{resource.max}}</span> <span class="bar-label">{{resource.max}}</span>
</div> </div>
<div class="status-label pointy"> <progress
class='progress-bar'
max='{{resource.max}}'
value='{{resource.value}}'
></progress>
<div class="status-label">
<h4>{{localize label}}</h4> <h4>{{localize label}}</h4>
</div> </div>
</div> {{/if}}
{{/if}} </div>

View file

@ -6,13 +6,18 @@
<div class="message-sub-header-container"> <div class="message-sub-header-container">
{{#if message.title}} {{#if message.title}}
<h4>{{message.title}}</h4> <h4>{{message.title}}</h4>
<div>{{alias}} {{#if author.isGM}}(GM){{/if}}</div> <div>{{actor.name}} {{#if author.isGM}}(GM){{/if}}</div>
{{else}} {{else}}
{{#unless actor.name}} {{#unless actor.name}}
<h4>{{author.name}}</h4> <h4>{{author.name}}</h4>
{{else}} {{else}}
<h4>{{alias}}</h4> {{#if (eq message.type 'base')}}
<div>{{author.name}}</div> <h4>{{actor.name}}</h4>
<div>{{author.name}}</div>
{{else}}
<h4>{{alias}}</h4>
<div>{{actor.name}} {{#if author.isGM}}(GM){{/if}}</div>
{{/if}}
{{/unless}} {{/unless}}
{{/if}} {{/if}}
</div> </div>

View file

@ -3,9 +3,9 @@
{{#each sources as |source|}} {{#each sources as |source|}}
<div class="armor-source-container"> <div class="armor-source-container">
<p class="armor-source-label">{{source.name}}</p> <p class="armor-source-label">{{source.name}}</p>
<div class="slot-bar armor"> <div class="slot-bar">
{{#times source.max}} {{#times source.max}}
<a class="slot" data-value="{{add this 1}}" data-uuid="{{source.uuid}}"> <a class='armor-slot' data-value="{{add this 1}}" data-uuid="{{source.uuid}}">
{{#if (gte ../current (add this 1))}} {{#if (gte ../current (add this 1))}}
<i class="fa-solid fa-shield" data-index="{{this}}"></i> <i class="fa-solid fa-shield" data-index="{{this}}"></i>
{{else}} {{else}}