Merge branch 'main' into bug/251-light-theme-character-sheet

This commit is contained in:
Joaquin Pereyra 2025-07-03 23:35:24 -03:00
commit 2007e2d8d2
48 changed files with 1204 additions and 310 deletions

View file

@ -79,6 +79,7 @@ Hooks.once('init', () => {
Items.registerSheet(SYSTEM.id, applications.DhpConsumable, { types: ['consumable'], makeDefault: true }); Items.registerSheet(SYSTEM.id, applications.DhpConsumable, { types: ['consumable'], makeDefault: true });
Items.registerSheet(SYSTEM.id, applications.DhpWeapon, { types: ['weapon'], makeDefault: true }); Items.registerSheet(SYSTEM.id, applications.DhpWeapon, { types: ['weapon'], makeDefault: true });
Items.registerSheet(SYSTEM.id, applications.DhpArmor, { types: ['armor'], makeDefault: true }); Items.registerSheet(SYSTEM.id, applications.DhpArmor, { types: ['armor'], makeDefault: true });
Items.registerSheet(SYSTEM.id, applications.DhBeastform, { types: ['beastform'], makeDefault: true });
CONFIG.Actor.documentClass = documents.DhpActor; CONFIG.Actor.documentClass = documents.DhpActor;
CONFIG.Actor.dataModels = models.actors.config; CONFIG.Actor.dataModels = models.actors.config;
@ -90,6 +91,8 @@ Hooks.once('init', () => {
Actors.registerSheet(SYSTEM.id, applications.DhpEnvironment, { types: ['environment'], makeDefault: true }); Actors.registerSheet(SYSTEM.id, applications.DhpEnvironment, { types: ['environment'], makeDefault: true });
CONFIG.ActiveEffect.documentClass = documents.DhActiveEffect; CONFIG.ActiveEffect.documentClass = documents.DhActiveEffect;
CONFIG.ActiveEffect.dataModels = models.activeEffects.config;
foundry.applications.apps.DocumentSheetConfig.unregisterSheet( foundry.applications.apps.DocumentSheetConfig.unregisterSheet(
CONFIG.ActiveEffect.documentClass, CONFIG.ActiveEffect.documentClass,
'core', 'core',
@ -300,6 +303,7 @@ const preloadHandlebarsTemplates = async function () {
'systems/daggerheart/templates/views/actionTypes/cost.hbs', 'systems/daggerheart/templates/views/actionTypes/cost.hbs',
'systems/daggerheart/templates/views/actionTypes/range-target.hbs', 'systems/daggerheart/templates/views/actionTypes/range-target.hbs',
'systems/daggerheart/templates/views/actionTypes/effect.hbs', 'systems/daggerheart/templates/views/actionTypes/effect.hbs',
'systems/daggerheart/templates/views/actionTypes/beastform.hbs',
'systems/daggerheart/templates/settings/components/settings-item-line.hbs', 'systems/daggerheart/templates/settings/components/settings-item-line.hbs',
'systems/daggerheart/templates/chat/parts/damage-chat.hbs', 'systems/daggerheart/templates/chat/parts/damage-chat.hbs',
'systems/daggerheart/templates/chat/parts/target-chat.hbs' 'systems/daggerheart/templates/chat/parts/target-chat.hbs'

View file

@ -10,7 +10,8 @@
"consumable": "Consumable", "consumable": "Consumable",
"miscellaneous": "Miscellaneous", "miscellaneous": "Miscellaneous",
"weapon": "Weapon", "weapon": "Weapon",
"armor": "Armor" "armor": "Armor",
"beastform": "Beastform"
}, },
"Actor": { "Actor": {
"character": "Character", "character": "Character",
@ -22,7 +23,9 @@
"DAGGERHEART": { "DAGGERHEART": {
"UI": { "UI": {
"notifications": { "notifications": {
"adversaryMissing": "The linked adversary doesn't exist in the world." "adversaryMissing": "The linked adversary doesn't exist in the world.",
"beastformInapplicable": "A beastform can only be applied to a Character.",
"beastformAlreadyApplied": "The character already has a beastform applied!"
} }
}, },
"Settings": { "Settings": {
@ -1186,6 +1189,7 @@
"LevelUp": "You can level up", "LevelUp": "You can level up",
"Features": "Features", "Features": "Features",
"CompanionFeatures": "Companion Features", "CompanionFeatures": "Companion Features",
"beastformFeatures": "Beastform Features",
"Tabs": { "Tabs": {
"Features": "Features", "Features": "Features",
"Inventory": "Inventory", "Inventory": "Inventory",
@ -1472,8 +1476,26 @@
} }
} }
}, },
"Beastform": {
"FIELDS": {
"tier": { "label": "Tier" },
"examples": { "label": "Examples" },
"advantageOn": { "label": "Gain Advantage On" },
"tokenImg": { "label": "Token Image" },
"tokenSize": {
"placeholder": "Using character dimensions",
"height": { "label": "Height" },
"width": { "label": "Width" }
}
},
"dialogTitle": "Beastform Selection",
"tokenTitle": "Beastform Token",
"transform": "Transform",
"beastformEffect": "Beastform Transformation"
},
"Global": { "Global": {
"Actions": "Actions", "Actions": "Actions",
"Features": "Features",
"Effects": "Effects", "Effects": "Effects",
"activeEffects": "Active Effects", "activeEffects": "Active Effects",
"inativeEffects": "Inative Effects" "inativeEffects": "Inative Effects"
@ -1546,7 +1568,8 @@
"Range": "Range", "Range": "Range",
"Damage": { "Damage": {
"Title": "Damage", "Title": "Damage",
"Value": "Value", "Die": "Die",
"Bonus": "Bonus",
"Type": "Type" "Type": "Type"
}, },
"Burden": "Burden", "Burden": "Burden",
@ -1631,12 +1654,22 @@
}, },
"macro": { "macro": {
"name": "Macro" "name": "Macro"
},
"beastform": {
"name": "Beastform"
} }
}, },
"Settings": { "Settings": {
"ResultBased": { "ResultBased": {
"label": "Formula based on Hope/Fear result." "label": "Formula based on Hope/Fear result."
} }
},
"Config": {
"Beastform": {
"label": "Beastform",
"exact": "Beastform Max Tier",
"exactHint": "The Character's Tier is used if empty"
}
} }
}, },
"RollTypes": { "RollTypes": {

View file

@ -15,7 +15,8 @@ export { default as DhpChatMessage } from './chatMessage.mjs';
export { default as DhpEnvironment } from './sheets/actors/environment.mjs'; export { default as DhpEnvironment } from './sheets/actors/environment.mjs';
export { default as DhActiveEffectConfig } from './sheets/activeEffectConfig.mjs'; export { default as DhActiveEffectConfig } from './sheets/activeEffectConfig.mjs';
export { default as DhContextMenu } from './contextMenu.mjs'; export { default as DhContextMenu } from './contextMenu.mjs';
export { default as DhBeastform } from './sheets/items/beastform.mjs';
export { default as DhTooltipManager } from './tooltipManager.mjs'; export { default as DhTooltipManager } from './tooltipManager.mjs';
export * as api from './sheets/api/_modules.mjs'; export * as api from './sheets/api/_modules.mjs';
export * as ux from "./ux/_module.mjs"; export * as ux from './ux/_module.mjs';

View file

@ -38,7 +38,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
} }
}; };
static CLEAN_ARRAYS = ["damage.parts", "cost", "effects"]; static CLEAN_ARRAYS = ['damage.parts', 'cost', 'effects'];
_getTabs() { _getTabs() {
const tabs = { const tabs = {
@ -69,7 +69,13 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
context.disableOption = this.disableOption.bind(this); context.disableOption = this.disableOption.bind(this);
context.isNPC = this.action.actor && this.action.actor.type !== 'character'; context.isNPC = this.action.actor && this.action.actor.type !== 'character';
context.hasRoll = this.action.hasRoll; context.hasRoll = this.action.hasRoll;
console.log(context)
const settingsTiers = game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.LevelTiers).tiers;
context.tierOptions = [
{ key: 1, label: game.i18n.localize('DAGGERHEART.Tiers.tier1') },
...Object.values(settingsTiers).map(x => ({ key: x.tier, label: x.name }))
];
return context; return context;
} }
@ -97,9 +103,9 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
_prepareSubmitData(event, formData) { _prepareSubmitData(event, formData) {
const submitData = foundry.utils.expandObject(formData.object); const submitData = foundry.utils.expandObject(formData.object);
for ( const keyPath of this.constructor.CLEAN_ARRAYS ) { for (const keyPath of this.constructor.CLEAN_ARRAYS) {
const data = foundry.utils.getProperty(submitData, keyPath); const data = foundry.utils.getProperty(submitData, keyPath);
if ( data ) foundry.utils.setProperty(submitData, keyPath, Object.values(data)); if (data) foundry.utils.setProperty(submitData, keyPath, Object.values(data));
} }
return submitData; return submitData;
} }

View file

@ -39,7 +39,6 @@ export class DHRoll extends Roll {
if (config.dialog.configure !== false) { if (config.dialog.configure !== false) {
// Open Roll Dialog // Open Roll Dialog
const DialogClass = config.dialog?.class ?? this.DefaultDialog; const DialogClass = config.dialog?.class ?? this.DefaultDialog;
console.log(roll, config);
const configDialog = await DialogClass.configure(roll, config, message); const configDialog = await DialogClass.configure(roll, config, message);
if (!configDialog) return; if (!configDialog) return;
} }
@ -124,6 +123,18 @@ export class DHRoll extends Roll {
} }
return (this._formula = this.constructor.getFormula(this.terms)); return (this._formula = this.constructor.getFormula(this.terms));
} }
static calculateTotalModifiers(roll, config) {
config.roll.modifierTotal = 0;
for (let i = 0; i < roll.terms.length; i++) {
if (
roll.terms[i] instanceof foundry.dice.terms.NumericTerm &&
!!roll.terms[i - 1] &&
roll.terms[i - 1] instanceof foundry.dice.terms.OperatorTerm
)
config.roll.modifierTotal += Number(`${roll.terms[i - 1].operator}${roll.terms[i].total}`);
}
}
} }
export class DualityDie extends foundry.dice.terms.Die { export class DualityDie extends foundry.dice.terms.Die {
@ -299,15 +310,8 @@ export class D20Roll extends DHRoll {
value: d.total value: d.total
}; };
}); });
config.roll.modifierTotal = 0;
for (let i = 0; i < roll.terms.length; i++) { this.calculateTotalModifiers(roll, config);
if (
roll.terms[i] instanceof foundry.dice.terms.NumericTerm &&
!!roll.terms[i - 1] &&
roll.terms[i - 1] instanceof foundry.dice.terms.OperatorTerm
)
config.roll.modifierTotal += Number(`${roll.terms[i - 1].operator}${roll.terms[i].total}`);
}
} }
resetFormula() { resetFormula() {
@ -468,6 +472,7 @@ export class DamageRoll extends DHRoll {
static async postEvaluate(roll, config = {}) { static async postEvaluate(roll, config = {}) {
super.postEvaluate(roll, config); super.postEvaluate(roll, config);
config.roll.type = config.type; config.roll.type = config.type;
this.calculateTotalModifiers(roll, config);
if (config.source?.message) { if (config.source?.message) {
const chatMessage = ui.chat.collection.get(config.source.message); const chatMessage = ui.chat.collection.get(config.source.message);
chatMessage.update({ 'system.damage': config }); chatMessage.update({ 'system.damage': config });

View file

@ -5,7 +5,7 @@ const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
export default class RollSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) { export default class RollSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) {
constructor(experiences, costs, action, resolve) { constructor(experiences, costs, action, resolve) {
super({}, {}); super({}, {});
this.experiences = experiences; this.experiences = experiences;
this.costs = costs; this.costs = costs;
this.action = action; this.action = action;
@ -67,9 +67,9 @@ export default class RollSelectionDialog extends HandlebarsApplicationMixin(Appl
context.fear = this.data.fear; context.fear = this.data.fear;
context.advantage = this.data.advantage; context.advantage = this.data.advantage;
context.experiences = Object.keys(this.experiences).map(id => ({ id, ...this.experiences[id] })); context.experiences = Object.keys(this.experiences).map(id => ({ id, ...this.experiences[id] }));
if(this.costs?.length) { if (this.costs?.length) {
const updatedCosts = this.action.calcCosts(this.costs); const updatedCosts = this.action.calcCosts(this.costs);
context.costs = updatedCosts context.costs = updatedCosts;
context.canRoll = this.action.getRealCosts(updatedCosts)?.hasCost; context.canRoll = this.action.getRealCosts(updatedCosts)?.hasCost;
} else context.canRoll = true; } else context.canRoll = true;

View file

@ -7,6 +7,8 @@ import { abilities } from '../../../config/actorConfig.mjs';
import DhCharacterlevelUp from '../../levelup/characterLevelup.mjs'; import DhCharacterlevelUp from '../../levelup/characterLevelup.mjs';
import DhCharacterCreation from '../../characterCreation.mjs'; import DhCharacterCreation from '../../characterCreation.mjs';
import FilterMenu from '../../ux/filter-menu.mjs'; import FilterMenu from '../../ux/filter-menu.mjs';
import { DhBeastformAction } from '../../../data/action/action.mjs';
import DHActionConfig from '../../config/Action.mjs';
const { ActorSheetV2 } = foundry.applications.sheets; const { ActorSheetV2 } = foundry.applications.sheets;
const { TextEditor } = foundry.applications.ux; const { TextEditor } = foundry.applications.ux;
@ -306,11 +308,14 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
getItem(element) { getItem(element) {
const listElement = (element.target ?? element).closest('[data-item-id]'); const listElement = (element.target ?? element).closest('[data-item-id]');
const document = listElement.dataset.companion ? this.document.system.companion : this.document; const itemId = listElement.dataset.itemId;
if (listElement.dataset.type === 'effect') {
const itemId = listElement.dataset.itemId, return this.document.effects.get(itemId);
item = document.items.get(itemId); } else if (['armor', 'weapon', 'feature', 'consumable', 'miscellaneous'].includes(listElement.dataset.type)) {
return item; return this.document.items.get(itemId);
} else {
return this.document.system[listElement.dataset.type].system.actions.find(x => x.id === itemId);
}
} }
static triggerContextMenu(event, button) { static triggerContextMenu(event, button) {
@ -733,7 +738,9 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
// Should dandle its actions. Or maybe they'll be separate buttons as per an Issue on the board // Should dandle its actions. Or maybe they'll be separate buttons as per an Issue on the board
if (item.type === 'feature') { if (item.type === 'feature') {
item.toChat(); item.use(event);
} else if (item instanceof ActiveEffect) {
item.toChat(this);
} else { } else {
const wasUsed = await item.use(event); const wasUsed = await item.use(event);
if (wasUsed && item.type === 'weapon') { if (wasUsed && item.type === 'weapon') {
@ -746,7 +753,11 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
const item = this.getItem(event); const item = this.getItem(event);
if (!item) return; if (!item) return;
item.sheet.render(true); if (item.sheet) {
item.sheet.render(true);
} else {
await new DHActionConfig(item).render(true);
}
} }
editItem(event) { editItem(event) {

View file

@ -103,7 +103,6 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
context.systemFields = this.actor.system.schema.fields; context.systemFields = this.actor.system.schema.fields;
context.systemFields.attack.fields = this.actor.system.attack.schema.fields; context.systemFields.attack.fields = this.actor.system.attack.schema.fields;
context.isNPC = true; context.isNPC = true;
console.log(context)
return context; return context;
} }

View file

@ -0,0 +1,65 @@
import DHBaseItemSheet from '../api/base-item.mjs';
export default class BeastformSheet extends DHBaseItemSheet {
/**@inheritdoc */
static DEFAULT_OPTIONS = {
classes: ['beastform'],
dragDrop: [{ dragSelector: null, dropSelector: '.drop-section' }],
actions: {
editFeature: this.editFeature,
removeFeature: this.removeFeature
}
};
/**@override */
static PARTS = {
header: { template: 'systems/daggerheart/templates/sheets/items/beastform/header.hbs' },
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
settings: { template: 'systems/daggerheart/templates/sheets/items/beastform/settings.hbs' },
features: {
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-features.hbs',
scrollable: ['.features']
},
effects: {
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-effects.hbs',
scrollable: ['.effects']
}
};
static TABS = {
primary: {
tabs: [{ id: 'settings' }, { id: 'features' }, { id: 'effects' }],
initial: 'settings',
labelPrefix: 'DAGGERHEART.Sheets.TABS'
}
};
/**@inheritdoc */
async _preparePartContext(partId, context) {
await super._preparePartContext(partId, context);
return context;
}
static editFeature(event) {
const target = event.target.closest('[data-action="editFeature"]');
const feature = this.document.system.features[target.dataset.index];
feature.sheet.render({ force: true });
}
static async removeFeature(_, target) {
const current = this.document.system.features.map(x => x.uuid);
await this.document.update({
'system.features': current.filter((_, index) => index !== Number(target.dataset.index))
});
}
async _onDrop(event) {
const data = TextEditor.getDragEventData(event);
const item = await fromUuid(data.uuid);
if (item.type === 'feature') {
const current = this.document.system.features.map(x => x.uuid);
await this.document.update({ 'system.features': [...current, item.uuid] });
}
}
}

View file

@ -38,6 +38,11 @@ export const actionTypes = {
id: 'macro', id: 'macro',
name: 'DAGGERHEART.Actions.Types.macro.name', name: 'DAGGERHEART.Actions.Types.macro.name',
icon: 'fa-scroll' icon: 'fa-scroll'
},
beastform: {
id: 'beastform',
name: 'DAGGERHEART.Actions.Types.beastform.name',
icon: 'fa-paw'
} }
}; };
@ -119,4 +124,4 @@ export const advandtageState = {
label: 'DAGGERHEART.General.Advantage.Full', label: 'DAGGERHEART.General.Advantage.Full',
value: 1 value: 1
} }
} };

View file

@ -245,19 +245,23 @@ export const deathMoves = {
export const tiers = { export const tiers = {
tier1: { tier1: {
id: 'tier1', id: 'tier1',
label: 'DAGGERHEART.Tiers.tier1' label: 'DAGGERHEART.Tiers.tier1',
value: 1
}, },
tier2: { tier2: {
id: 'tier2', id: 'tier2',
label: 'DAGGERHEART.Tiers.tier2' label: 'DAGGERHEART.Tiers.tier2',
value: 2
}, },
tier3: { tier3: {
id: 'tier3', id: 'tier3',
label: 'DAGGERHEART.Tiers.tier3' label: 'DAGGERHEART.Tiers.tier3',
value: 3
}, },
tier4: { tier4: {
id: 'tier4', id: 'tier4',
label: 'DAGGERHEART.Tiers.tier4' label: 'DAGGERHEART.Tiers.tier4',
value: 4
} }
}; };

View file

@ -6,3 +6,4 @@ export * as items from './item/_module.mjs';
export { actionsTypes } from './action/_module.mjs'; export { actionsTypes } from './action/_module.mjs';
export * as messages from './chat-message/_modules.mjs'; export * as messages from './chat-message/_modules.mjs';
export * as fields from './fields/_module.mjs'; export * as fields from './fields/_module.mjs';
export * as activeEffects from './activeEffect/_module.mjs';

View file

@ -1,6 +1,7 @@
import { import {
DHAttackAction, DHAttackAction,
DHBaseAction, DHBaseAction,
DhBeastformAction,
DHDamageAction, DHDamageAction,
DHEffectAction, DHEffectAction,
DHHealingAction, DHHealingAction,
@ -19,5 +20,6 @@ export const actionsTypes = {
healing: DHHealingAction, healing: DHHealingAction,
summon: DHSummonAction, summon: DHSummonAction,
effect: DHEffectAction, effect: DHEffectAction,
macro: DHMacroAction macro: DHMacroAction,
beastform: DhBeastformAction
}; };

View file

@ -1,6 +1,7 @@
import { DHActionDiceData, DHActionRollData, DHDamageData, DHDamageField } from './actionDice.mjs'; import { DHActionDiceData, DHActionRollData, DHDamageData, DHDamageField } from './actionDice.mjs';
import DhpActor from '../../documents/actor.mjs'; import DhpActor from '../../documents/actor.mjs';
import D20RollDialog from '../../dialogs/d20RollDialog.mjs'; import D20RollDialog from '../../dialogs/d20RollDialog.mjs';
import BeastformDialog from '../../dialogs/beastformDialog.mjs';
const fields = foundry.data.fields; const fields = foundry.data.fields;
@ -106,6 +107,11 @@ export class DHBaseAction extends foundry.abstract.DataModel {
}), }),
value: new fields.EmbeddedDataField(DHActionDiceData), value: new fields.EmbeddedDataField(DHActionDiceData),
valueAlt: new fields.EmbeddedDataField(DHActionDiceData) valueAlt: new fields.EmbeddedDataField(DHActionDiceData)
}),
beastform: new fields.SchemaField({
tierAccess: new fields.SchemaField({
exact: new fields.NumberField({ integer: true, nullable: true, initial: null })
})
}) })
}, },
extraSchemas = {}; extraSchemas = {};
@ -231,6 +237,7 @@ export class DHBaseAction extends foundry.abstract.DataModel {
} }
if (this.hasRoll) { if (this.hasRoll) {
console.log(config);
const rollConfig = this.prepareRoll(config); const rollConfig = this.prepareRoll(config);
config.roll = rollConfig; config.roll = rollConfig;
config = await this.actor.diceRoll(config); config = await this.actor.diceRoll(config);
@ -242,7 +249,6 @@ export class DHBaseAction extends foundry.abstract.DataModel {
if(t.hit) { if(t.hit) {
const target = game.canvas.tokens.get(t.id), const target = game.canvas.tokens.get(t.id),
actor = target?.actor; actor = target?.actor;
console.log(actor)
if(!actor) return; if(!actor) return;
actor.saveRoll({ actor.saveRoll({
event, event,
@ -629,7 +635,7 @@ export class DHAttackAction extends DHDamageAction {
return { return {
value: { value: {
multiplier: 'prof', multiplier: 'prof',
dice: this.item?.system?.damage.value, dice: this.item?.system?.damage.dice,
bonus: this.item?.system?.damage.bonus ?? 0 bonus: this.item?.system?.damage.bonus ?? 0
}, },
type: this.item?.system?.damage.type, type: this.item?.system?.damage.type,
@ -757,3 +763,50 @@ export class DHMacroAction extends DHBaseAction {
} }
} }
} }
export class DhBeastformAction extends DHBaseAction {
static extraSchemas = ['beastform'];
async use(event, ...args) {
const beastformConfig = this.prepareBeastformConfig();
const abort = await this.handleActiveTransformations();
if (abort) return;
const beastformUuid = await BeastformDialog.configure(beastformConfig);
if (!beastformUuid) return;
await this.transform(beastformUuid);
}
prepareBeastformConfig(config) {
const settingsTiers = game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.LevelTiers).tiers;
const actorLevel = this.actor.system.levelData.level.current;
const actorTier =
Object.values(settingsTiers).find(
tier => actorLevel >= tier.levels.start && actorLevel <= tier.levels.end
) ?? 1;
return {
tierLimit: this.beastform.tierAccess.exact ?? actorTier
};
}
async transform(beastformUuid) {
const beastform = await foundry.utils.fromUuid(beastformUuid);
this.actor.createEmbeddedDocuments('Item', [beastform.toObject()]);
}
async handleActiveTransformations() {
const beastformEffects = this.actor.effects.filter(x => x.type === 'beastform');
if (beastformEffects.length > 0) {
for (let effect of beastformEffects) {
await effect.delete();
}
return true;
}
return false;
}
}

View file

@ -0,0 +1,7 @@
import beastformEffect from './beastformEffect.mjs';
export { beastformEffect };
export const config = {
beastform: beastformEffect
};

View file

@ -0,0 +1,40 @@
import { updateActorTokens } from '../../helpers/utils.mjs';
export default class BeastformEffect extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields;
return {
characterTokenData: new fields.SchemaField({
tokenImg: new fields.FilePathField({
categories: ['IMAGE'],
base64: false,
nullable: true
}),
tokenSize: new fields.SchemaField({
height: new fields.NumberField({ integer: true, nullable: true }),
width: new fields.NumberField({ integer: true, nullable: true })
})
}),
advantageOn: new fields.ArrayField(new fields.StringField()),
featureIds: new fields.ArrayField(new fields.StringField()),
effectIds: new fields.ArrayField(new fields.StringField())
};
}
async _preDelete() {
if (this.parent.parent.type === 'character') {
const update = {
height: this.characterTokenData.tokenSize.height,
width: this.characterTokenData.tokenSize.width,
texture: {
src: this.characterTokenData.tokenImg
}
};
await updateActorTokens(this.parent.parent, update);
await this.parent.parent.deleteEmbeddedDocuments('Item', this.featureIds);
await this.parent.parent.deleteEmbeddedDocuments('ActiveEffect', this.effectIds);
}
}
}

View file

@ -8,6 +8,7 @@ import DHFeature from './feature.mjs';
import DHMiscellaneous from './miscellaneous.mjs'; import DHMiscellaneous from './miscellaneous.mjs';
import DHSubclass from './subclass.mjs'; import DHSubclass from './subclass.mjs';
import DHWeapon from './weapon.mjs'; import DHWeapon from './weapon.mjs';
import DHBeastform from './beastform.mjs';
export { export {
DHAncestry, DHAncestry,
@ -19,7 +20,8 @@ export {
DHFeature, DHFeature,
DHMiscellaneous, DHMiscellaneous,
DHSubclass, DHSubclass,
DHWeapon DHWeapon,
DHBeastform
}; };
export const config = { export const config = {
@ -32,5 +34,6 @@ export const config = {
feature: DHFeature, feature: DHFeature,
miscellaneous: DHMiscellaneous, miscellaneous: DHMiscellaneous,
subclass: DHSubclass, subclass: DHSubclass,
weapon: DHWeapon weapon: DHWeapon,
beastform: DHBeastform
}; };

View file

@ -0,0 +1,98 @@
import { updateActorTokens } from '../../helpers/utils.mjs';
import ForeignDocumentUUIDArrayField from '../fields/foreignDocumentUUIDArrayField.mjs';
import BaseDataItem from './base.mjs';
export default class DHBeastform extends BaseDataItem {
static LOCALIZATION_PREFIXES = ['DAGGERHEART.Sheets.Beastform'];
/** @inheritDoc */
static get metadata() {
return foundry.utils.mergeObject(super.metadata, {
label: 'TYPES.Item.beastform',
type: 'beastform',
hasDescription: false
});
}
/** @inheritDoc */
static defineSchema() {
const fields = foundry.data.fields;
return {
...super.defineSchema(),
tier: new fields.StringField({
required: true,
choices: SYSTEM.GENERAL.tiers,
initial: SYSTEM.GENERAL.tiers.tier1.id
}),
tokenImg: new fields.FilePathField({
initial: 'icons/svg/mystery-man.svg',
categories: ['IMAGE'],
base64: false
}),
tokenSize: new fields.SchemaField({
height: new fields.NumberField({ integer: true, min: 1, initial: null, nullable: true }),
width: new fields.NumberField({ integer: true, min: 1, initial: null, nullable: true })
}),
examples: new fields.StringField(),
advantageOn: new fields.ArrayField(new fields.StringField()),
features: new ForeignDocumentUUIDArrayField({ type: 'Item' })
};
}
async _preCreate(data, options, user) {
const allowed = await super._preCreate(data, options, user);
if (allowed === false) return;
if (!this.actor) return;
if (this.actor.type !== 'character') {
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.notifications.beastformInapplicable'));
return false;
}
if (this.actor.items.find(x => x.type === 'beastform')) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.notifications.beastformAlreadyApplied'));
return false;
}
const features = await this.parent.parent.createEmbeddedDocuments(
'Item',
this.features.map(x => x.toObject())
);
const effects = await this.parent.parent.createEmbeddedDocuments(
'ActiveEffect',
this.parent.effects.map(x => x.toObject())
);
await this.parent.parent.createEmbeddedDocuments('ActiveEffect', [
{
type: 'beastform',
name: game.i18n.localize('DAGGERHEART.Sheets.Beastform.beastformEffect'),
img: 'icons/creatures/abilities/paw-print-pair-purple.webp',
system: {
isBeastform: true,
characterTokenData: {
tokenImg: this.parent.parent.prototypeToken.texture.src,
tokenSize: {
height: this.parent.parent.prototypeToken.height,
width: this.parent.parent.prototypeToken.width
}
},
advantageOn: this.advantageOn,
featureIds: features.map(x => x.id),
effectIds: effects.map(x => x.id)
}
}
]);
await updateActorTokens(this.parent.parent, {
height: this.tokenSize.height,
width: this.tokenSize.width,
texture: {
src: this.tokenImg
}
});
return false;
}
}

View file

@ -32,7 +32,8 @@ export default class DHWeapon extends BaseDataItem {
burden: new fields.StringField({ required: true, choices: SYSTEM.GENERAL.burden, initial: 'oneHanded' }), burden: new fields.StringField({ required: true, choices: SYSTEM.GENERAL.burden, initial: 'oneHanded' }),
//DAMAGE //DAMAGE
damage: new fields.SchemaField({ damage: new fields.SchemaField({
value: new FormulaField({ initial: 'd6' }), dice: new fields.StringField({ choices: SYSTEM.GENERAL.diceTypes, initial: 'd6' }),
bonus: new fields.NumberField({ nullable: true, initial: null }),
type: new fields.StringField({ type: new fields.StringField({
required: true, required: true,
choices: SYSTEM.GENERAL.damageTypes, choices: SYSTEM.GENERAL.damageTypes,

View file

@ -0,0 +1,86 @@
import { tiers } from '../config/generalConfig.mjs';
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
export default class BeastformDialog extends HandlebarsApplicationMixin(ApplicationV2) {
constructor(configData) {
super();
this.configData = configData;
this.selected = null;
}
static DEFAULT_OPTIONS = {
tag: 'form',
classes: ['daggerheart', 'views', 'dh-style', 'beastform-selection'],
position: {
width: 600,
height: 'auto'
},
actions: {
selectBeastform: this.selectBeastform,
submitBeastform: this.submitBeastform
},
form: {
handler: this.updateBeastform,
submitOnChange: true,
submitOnClose: false
}
};
get title() {
return game.i18n.localize('DAGGERHEART.Sheets.Beastform.dialogTitle');
}
/** @override */
static PARTS = {
beastform: {
template: 'systems/daggerheart/templates/views/beastformDialog.hbs'
}
};
async _prepareContext(_options) {
const context = await super._prepareContext(_options);
context.beastformTiers = game.items.reduce((acc, x) => {
const tier = tiers[x.system.tier];
if (x.type !== 'beastform' || tier.value > this.configData.tierLimit) return acc;
if (!acc[tier.value]) acc[tier.value] = { label: game.i18n.localize(tier.label), values: {} };
acc[tier.value].values[x.uuid] = { selected: this.selected == x.uuid, value: x };
return acc;
}, {}); // Also get from compendium when added
context.canSubmit = this.selected;
return context;
}
static updateBeastform(event, _, formData) {
this.selected = foundry.utils.mergeObject(this.selected, formData.object);
this.render();
}
static selectBeastform(_, target) {
this.selected = this.selected === target.dataset.uuid ? null : target.dataset.uuid;
this.render();
}
static async submitBeastform() {
await this.close({ submitted: true });
}
/** @override */
_onClose(options = {}) {
if (!options.submitted) this.config = false;
}
static async configure(configData) {
return new Promise(resolve => {
const app = new this(configData);
app.addEventListener('close', () => resolve(app.selected), { once: true });
app.render({ force: true });
});
}
}

View file

@ -9,7 +9,6 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
this.config.experiences = []; this.config.experiences = [];
if (config.source?.action) { if (config.source?.action) {
console.log(config)
this.item = config.data.parent.items.get(config.source.item) ?? config.data.parent; this.item = config.data.parent.items.get(config.source.item) ?? config.data.parent;
this.action = this.action =
config.data.attack?._id == config.source.action config.data.attack?._id == config.source.action
@ -51,7 +50,6 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
}; };
async _prepareContext(_options) { async _prepareContext(_options) {
console.log(this.config, this.roll)
const context = await super._prepareContext(_options); const context = await super._prepareContext(_options);
context.hasRoll = !!this.config.roll; context.hasRoll = !!this.config.roll;
context.roll = this.roll; context.roll = this.roll;
@ -77,7 +75,7 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
} }
context.extraFormula = this.config.extraFormula; context.extraFormula = this.config.extraFormula;
context.formula = this.roll.constructFormula(this.config); context.formula = this.roll.constructFormula(this.config);
return context; return context;
} }
@ -87,10 +85,10 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
this.config.costs = foundry.utils.mergeObject(this.config.costs, rest.costs); this.config.costs = foundry.utils.mergeObject(this.config.costs, rest.costs);
} }
if (this.config.uses) this.config.uses = foundry.utils.mergeObject(this.config.uses, rest.uses); if (this.config.uses) this.config.uses = foundry.utils.mergeObject(this.config.uses, rest.uses);
if(rest.roll?.dice) { if (rest.roll?.dice) {
Object.entries(rest.roll.dice).forEach(([key, value]) => { Object.entries(rest.roll.dice).forEach(([key, value]) => {
this.roll[key] = value; this.roll[key] = value;
}) });
} }
this.config.extraFormula = rest.extraFormula; this.config.extraFormula = rest.extraFormula;
this.render(); this.render();

View file

@ -38,7 +38,7 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
const context = await super._prepareContext(_options); const context = await super._prepareContext(_options);
context.title = this.config.title; context.title = this.config.title;
context.extraFormula = this.config.extraFormula; context.extraFormula = this.config.extraFormula;
context.formula = this.roll.constructFormula(this.config);; context.formula = this.roll.constructFormula(this.config);
return context; return context;
} }

View file

@ -28,4 +28,27 @@ export default class DhActiveEffect extends ActiveEffect {
change.value = Roll.safeEval(Roll.replaceFormulaData(change.value, change.effect.parent)); change.value = Roll.safeEval(Roll.replaceFormulaData(change.value, change.effect.parent));
super.applyField(model, change, field); super.applyField(model, change, field);
} }
async toChat(origin) {
const cls = getDocumentClass('ChatMessage');
const systemData = {
title: game.i18n.localize('DAGGERHEART.ActionType.action'),
origin: origin,
img: this.img,
name: this.name,
description: this.description,
actions: []
};
const msg = new cls({
type: 'abilityUse',
user: game.user.id,
system: systemData,
content: await foundry.applications.handlebars.renderTemplate(
'systems/daggerheart/templates/chat/ability-use.hbs',
systemData
)
});
cls.create(msg.toObject());
}
} }

View file

@ -97,16 +97,16 @@ export default class DHItem extends foundry.documents.Item {
async use(event) { async use(event) {
const actions = this.system.actions; const actions = this.system.actions;
let response;
if (actions?.length) { if (actions?.length) {
let action = actions[0]; let action = actions[0];
if (actions.length > 1 && !event?.shiftKey) { if (actions.length > 1 && !event?.shiftKey) {
// Actions Choice Dialog // Actions Choice Dialog
action = await this.selectActionDialog(); action = await this.selectActionDialog();
} }
if (action) response = action.use(event); if (action) return action.use(event);
} }
return response;
return this.toChat();
} }
async toChat(origin) { async toChat(origin) {

View file

@ -294,3 +294,15 @@ export const adjustRange = (rangeVal, decrease) => {
const newIndex = decrease ? Math.max(index - 1, 0) : Math.min(index + 1, rangeKeys.length - 1); const newIndex = decrease ? Math.max(index - 1, 0) : Math.min(index + 1, rangeKeys.length - 1);
return range[rangeKeys[newIndex]]; return range[rangeKeys[newIndex]];
}; };
export const updateActorTokens = async (actor, update) => {
await actor.prototypeToken.update(update);
/* Update the tokens in all scenes belonging to Actor */
for (let token of actor.getDependentTokens()) {
const tokenActor = token.baseActor ?? token.actor;
if (tokenActor?.id === actor.id) {
await token.update(update);
}
}
};

View file

@ -227,7 +227,7 @@ div.daggerheart.views.multiclass {
filter: invert(0%) sepia(100%) saturate(0%) hue-rotate(21deg) brightness(17%) contrast(103%); filter: invert(0%) sepia(100%) saturate(0%) hue-rotate(21deg) brightness(17%) contrast(103%);
} }
} }
#roll-selection-costSelection footer { #roll-selection-costSelection footer {
display: none; display: none;
} }
@ -372,7 +372,6 @@ div.daggerheart.views.multiclass {
} }
} }
.roll-dialog-experience-container { .roll-dialog-experience-container {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
@ -509,6 +508,34 @@ div.daggerheart.views.multiclass {
} }
} }
.hint-group {
display: flex;
flex-direction: column;
align-items: end;
.form-fields {
width: 100%;
display: flex;
align-items: center;
label {
flex: 1;
}
input,
select {
flex: 3;
}
}
.hint {
margin: 4px 0 0 0;
font-size: 12px;
font-style: italic;
opacity: 0.6;
}
}
.data-form-array { .data-form-array {
border: 1px solid var(--color-fieldset-border); border: 1px solid var(--color-fieldset-border);
padding: 0.5rem; padding: 0.5rem;

View file

@ -2329,6 +2329,29 @@ div.daggerheart.views.multiclass {
width: 1.5rem; width: 1.5rem;
height: 1.5rem; height: 1.5rem;
} }
.daggerheart.views.action .action-category .action-category-data .hint-group {
display: flex;
flex-direction: column;
align-items: end;
}
.daggerheart.views.action .action-category .action-category-data .hint-group .form-fields {
width: 100%;
display: flex;
align-items: center;
}
.daggerheart.views.action .action-category .action-category-data .hint-group .form-fields label {
flex: 1;
}
.daggerheart.views.action .action-category .action-category-data .hint-group .form-fields input,
.daggerheart.views.action .action-category .action-category-data .hint-group .form-fields select {
flex: 3;
}
.daggerheart.views.action .action-category .action-category-data .hint-group .hint {
margin: 4px 0 0 0;
font-size: 12px;
font-style: italic;
opacity: 0.6;
}
.daggerheart.views.action .action-category .action-category-data .data-form-array { .daggerheart.views.action .action-category .action-category-data .data-form-array {
border: 1px solid var(--color-fieldset-border); border: 1px solid var(--color-fieldset-border);
padding: 0.5rem; padding: 0.5rem;
@ -3854,6 +3877,8 @@ div.daggerheart.views.multiclass {
text-align: center; text-align: center;
} }
.themed.theme-dark .application.sheet.dh-style .character-sidebar-sheet, .themed.theme-dark .application.sheet.dh-style .character-sidebar-sheet,
.themed.theme-dark.application.sheet.dh-style .character-sidebar-sheet {
.themed.theme-dark .application.sheet.dh-style .character-sidebar-sheet,
.themed.theme-dark.application.sheet.dh-style .character-sidebar-sheet { .themed.theme-dark.application.sheet.dh-style .character-sidebar-sheet {
background-image: url('../assets/parchments/dh-parchment-dark.png'); background-image: url('../assets/parchments/dh-parchment-dark.png');
} }
@ -3862,6 +3887,12 @@ div.daggerheart.views.multiclass {
background: url(../assets/svg/experience-shield.svg) no-repeat; background: url(../assets/svg/experience-shield.svg) no-repeat;
} }
.themed.theme-light .application.sheet.dh-style .character-sidebar-sheet, .themed.theme-light .application.sheet.dh-style .character-sidebar-sheet,
.themed.theme-light.application.sheet.dh-style .character-sidebar-sheet {
.themed.theme-dark .application.sheet.dh-style .character-sidebar-sheet .experience-value,
.themed.theme-dark.application.sheet.dh-style .character-sidebar-sheet .experience-value {
background: url(../assets/svg/experience-shield.svg) no-repeat;
}
.themed.theme-light .application.sheet.dh-style .character-sidebar-sheet,
.themed.theme-light.application.sheet.dh-style .character-sidebar-sheet { .themed.theme-light.application.sheet.dh-style .character-sidebar-sheet {
background: transparent; background: transparent;
} }
@ -3874,22 +3905,36 @@ div.daggerheart.views.multiclass {
min-width: 275px; min-width: 275px;
border-right: 1px solid light-dark(#18162e, #f3c267); border-right: 1px solid light-dark(#18162e, #f3c267);
} }
.application.sheet.dh-style .character-sidebar-sheet .portrait {
.themed.theme-light .application.sheet.dh-style .character-sidebar-sheet .experience-value,
.themed.theme-light.application.sheet.dh-style .character-sidebar-sheet .experience-value {
background: url('../assets/svg/experience-shield-light.svg') no-repeat;
}
.application.sheet.dh-style .character-sidebar-sheet {
width: 275px;
min-width: 275px;
border-right: 1px solid light-dark(#18162e, #f3c267);
}
.application.sheet.dh-style .character-sidebar-sheet .portrait { .application.sheet.dh-style .character-sidebar-sheet .portrait {
position: relative; position: relative;
border-bottom: 1px solid light-dark(#18162e, #f3c267); border-bottom: 1px solid light-dark(#18162e, #f3c267);
cursor: pointer; cursor: pointer;
} }
.application.sheet.dh-style .character-sidebar-sheet .portrait img {
.application.sheet.dh-style .character-sidebar-sheet .portrait img { .application.sheet.dh-style .character-sidebar-sheet .portrait img {
height: 235px; height: 235px;
width: 275px; width: 275px;
object-fit: cover; object-fit: cover;
} }
.application.sheet.dh-style .character-sidebar-sheet .portrait .death-roll-btn {
.application.sheet.dh-style .character-sidebar-sheet .portrait .death-roll-btn { .application.sheet.dh-style .character-sidebar-sheet .portrait .death-roll-btn {
display: none; display: none;
} }
.application.sheet.dh-style .character-sidebar-sheet .portrait.death-roll {
.application.sheet.dh-style .character-sidebar-sheet .portrait.death-roll { .application.sheet.dh-style .character-sidebar-sheet .portrait.death-roll {
filter: grayscale(1); filter: grayscale(1);
} }
.application.sheet.dh-style .character-sidebar-sheet .portrait.death-roll .death-roll-btn {
.application.sheet.dh-style .character-sidebar-sheet .portrait.death-roll .death-roll-btn { .application.sheet.dh-style .character-sidebar-sheet .portrait.death-roll .death-roll-btn {
display: flex; display: flex;
position: absolute; position: absolute;
@ -3898,9 +3943,11 @@ div.daggerheart.views.multiclass {
font-size: 6rem; font-size: 6rem;
color: #efe6d8; color: #efe6d8;
} }
.application.sheet.dh-style .character-sidebar-sheet .portrait.death-roll .death-roll-btn:hover {
.application.sheet.dh-style .character-sidebar-sheet .portrait.death-roll .death-roll-btn:hover { .application.sheet.dh-style .character-sidebar-sheet .portrait.death-roll .death-roll-btn:hover {
text-shadow: 0 0 8px #efe6d8; text-shadow: 0 0 8px #efe6d8;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section {
.application.sheet.dh-style .character-sidebar-sheet .info-section { .application.sheet.dh-style .character-sidebar-sheet .info-section {
position: relative; position: relative;
display: flex; display: flex;
@ -3909,16 +3956,19 @@ div.daggerheart.views.multiclass {
gap: 30px; gap: 30px;
margin-bottom: -10px; margin-bottom: -10px;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section {
display: flex; display: flex;
justify-content: space-evenly; justify-content: space-evenly;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar {
position: relative; position: relative;
width: 100px; width: 100px;
height: 40px; height: 40px;
justify-items: center; justify-items: center;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-label {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-label { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-label {
position: relative; position: relative;
top: 40px; top: 40px;
@ -3927,12 +3977,14 @@ div.daggerheart.views.multiclass {
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z'); clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
background: light-dark(#18162e, #f3c267); background: light-dark(#18162e, #f3c267);
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-label h4 {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-label h4 { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-label h4 {
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
line-height: 18px; line-height: 18px;
color: light-dark(#efe6d8, #18162e); color: light-dark(#efe6d8, #18162e);
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value {
position: absolute; position: absolute;
display: flex; display: flex;
@ -3946,6 +3998,7 @@ div.daggerheart.views.multiclass {
z-index: 2; z-index: 2;
color: #efe6d8; color: #efe6d8;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'] {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'] { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'] {
background: transparent; background: transparent;
font-size: 1.5rem; font-size: 1.5rem;
@ -3956,6 +4009,7 @@ div.daggerheart.views.multiclass {
outline: 2px solid transparent; outline: 2px solid transparent;
color: #efe6d8; color: #efe6d8;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input {
padding: 0; padding: 0;
color: #efe6d8; color: #efe6d8;
@ -3964,13 +4018,17 @@ div.daggerheart.views.multiclass {
transition: all 0.3s ease; transition: all 0.3s ease;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input:hover, .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input:hover,
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input:focus {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input:hover,
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input:focus { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value input[type='number'].bar-input:focus {
background: rgba(24, 22, 46, 0.33); background: rgba(24, 22, 46, 0.33);
backdrop-filter: blur(9.5px); backdrop-filter: blur(9.5px);
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value .bar-label {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value .bar-label { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .status-value .bar-label {
width: 40px; width: 40px;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar {
position: absolute; position: absolute;
appearance: none; appearance: none;
@ -3981,36 +4039,44 @@ div.daggerheart.views.multiclass {
z-index: 1; z-index: 1;
background: #18162e; background: #18162e;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-webkit-progress-bar {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-webkit-progress-bar { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-webkit-progress-bar {
border: none; border: none;
background: #18162e; background: #18162e;
border-radius: 6px; border-radius: 6px;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-webkit-progress-value {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-webkit-progress-value { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-webkit-progress-value {
background: linear-gradient(15deg, #46140a 0%, #be0000 42%, #fcb045 100%); background: linear-gradient(15deg, #46140a 0%, #be0000 42%, #fcb045 100%);
border-radius: 6px; border-radius: 6px;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar.stress-color::-webkit-progress-value {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar.stress-color::-webkit-progress-value { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar.stress-color::-webkit-progress-value {
background: linear-gradient(15deg, #823b01 0%, #fc8e45 65%, #be0000 100%); background: linear-gradient(15deg, #823b01 0%, #fc8e45 65%, #be0000 100%);
border-radius: 6px; border-radius: 6px;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-moz-progress-bar {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-moz-progress-bar { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar::-moz-progress-bar {
background: linear-gradient(15deg, #46140a 0%, #be0000 42%, #fcb045 100%); background: linear-gradient(15deg, #46140a 0%, #be0000 42%, #fcb045 100%);
border-radius: 6px; border-radius: 6px;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar.stress-color::-moz-progress-bar {
.application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar.stress-color::-moz-progress-bar { .application.sheet.dh-style .character-sidebar-sheet .info-section .resources-section .status-bar .progress-bar.stress-color::-moz-progress-bar {
background: linear-gradient(15deg, #823b01 0%, #fc8e45 65%, #be0000 100%); background: linear-gradient(15deg, #823b01 0%, #fc8e45 65%, #be0000 100%);
border-radius: 6px; border-radius: 6px;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section {
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section { .application.sheet.dh-style .character-sidebar-sheet .info-section .status-section {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 5px; gap: 5px;
justify-content: center; justify-content: center;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number {
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number { .application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number {
justify-items: center; justify-items: center;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-value {
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-value { .application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-value {
position: relative; position: relative;
display: flex; display: flex;
@ -4026,16 +4092,19 @@ div.daggerheart.views.multiclass {
background: light-dark(transparent, #18162e); background: light-dark(transparent, #18162e);
z-index: 2; z-index: 2;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-value.armor-slots {
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-value.armor-slots { .application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-value.armor-slots {
width: 80px; width: 80px;
height: 30px; height: 30px;
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-label {
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-label { .application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-label {
padding: 2px 10px; padding: 2px 10px;
width: 100%; width: 100%;
border-radius: 3px; border-radius: 3px;
background: light-dark(#18162e, #f3c267); background: light-dark(#18162e, #f3c267);
} }
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-label h4 {
.application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-label h4 { .application.sheet.dh-style .character-sidebar-sheet .info-section .status-section .status-number .status-label h4 {
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
@ -4043,44 +4112,54 @@ div.daggerheart.views.multiclass {
font-size: 12px; font-size: 12px;
color: light-dark(#efe6d8, #18162e); color: light-dark(#efe6d8, #18162e);
} }
.application.sheet.dh-style .character-sidebar-sheet .items-sidebar-list {
.application.sheet.dh-style .character-sidebar-sheet .items-sidebar-list { .application.sheet.dh-style .character-sidebar-sheet .items-sidebar-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 5px; gap: 5px;
} }
.application.sheet.dh-style .character-sidebar-sheet .items-sidebar-list .inventory-item {
.application.sheet.dh-style .character-sidebar-sheet .items-sidebar-list .inventory-item { .application.sheet.dh-style .character-sidebar-sheet .items-sidebar-list .inventory-item {
padding: 0 10px; padding: 0 10px;
} }
.application.sheet.dh-style .character-sidebar-sheet .equipment-section .title {
.application.sheet.dh-style .character-sidebar-sheet .equipment-section .title { .application.sheet.dh-style .character-sidebar-sheet .equipment-section .title {
display: flex; display: flex;
gap: 15px; gap: 15px;
align-items: center; align-items: center;
} }
.application.sheet.dh-style .character-sidebar-sheet .equipment-section .title h3 {
.application.sheet.dh-style .character-sidebar-sheet .equipment-section .title h3 { .application.sheet.dh-style .character-sidebar-sheet .equipment-section .title h3 {
font-size: 20px; font-size: 20px;
} }
.application.sheet.dh-style .character-sidebar-sheet .equipment-section .items-list {
.application.sheet.dh-style .character-sidebar-sheet .equipment-section .items-list { .application.sheet.dh-style .character-sidebar-sheet .equipment-section .items-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10px; gap: 10px;
align-items: center; align-items: center;
} }
.application.sheet.dh-style .character-sidebar-sheet .loadout-section .title {
.application.sheet.dh-style .character-sidebar-sheet .loadout-section .title { .application.sheet.dh-style .character-sidebar-sheet .loadout-section .title {
display: flex; display: flex;
gap: 15px; gap: 15px;
align-items: center; align-items: center;
} }
.application.sheet.dh-style .character-sidebar-sheet .loadout-section .title h3 {
.application.sheet.dh-style .character-sidebar-sheet .loadout-section .title h3 { .application.sheet.dh-style .character-sidebar-sheet .loadout-section .title h3 {
font-size: 20px; font-size: 20px;
} }
.application.sheet.dh-style .character-sidebar-sheet .experience-section .title {
.application.sheet.dh-style .character-sidebar-sheet .experience-section .title { .application.sheet.dh-style .character-sidebar-sheet .experience-section .title {
display: flex; display: flex;
gap: 15px; gap: 15px;
align-items: center; align-items: center;
} }
.application.sheet.dh-style .character-sidebar-sheet .experience-section .title h3 {
.application.sheet.dh-style .character-sidebar-sheet .experience-section .title h3 { .application.sheet.dh-style .character-sidebar-sheet .experience-section .title h3 {
font-size: 20px; font-size: 20px;
} }
.application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list {
.application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list { .application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -4089,6 +4168,7 @@ div.daggerheart.views.multiclass {
margin-top: 10px; margin-top: 10px;
align-items: center; align-items: center;
} }
.application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-row {
.application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-row { .application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-row {
display: flex; display: flex;
gap: 5px; gap: 5px;
@ -4096,6 +4176,7 @@ div.daggerheart.views.multiclass {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-row input[type='text'] {
.application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-row input[type='text'] { .application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-row input[type='text'] {
height: 32px; height: 32px;
width: 180px; width: 180px;
@ -4106,9 +4187,11 @@ div.daggerheart.views.multiclass {
transition: all 0.3s ease; transition: all 0.3s ease;
color: light-dark(#222, #efe6d8); color: light-dark(#222, #efe6d8);
} }
.application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-row input[type='text']:hover {
.application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-row input[type='text']:hover { .application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-row input[type='text']:hover {
outline: 2px solid light-dark(#222, #efe6d8); outline: 2px solid light-dark(#222, #efe6d8);
} }
.application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-value {
.application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-value { .application.sheet.dh-style .character-sidebar-sheet .experience-section .experience-list .experience-value {
height: 25px; height: 25px;
width: 35px; width: 35px;
@ -4791,6 +4874,8 @@ div.daggerheart.views.multiclass {
padding: 0 20px; padding: 0 20px;
} }
.themed.theme-dark .application.sheet.dh-style.environment, .themed.theme-dark .application.sheet.dh-style.environment,
.themed.theme-dark.application.sheet.dh-style.environment {
.themed.theme-dark .application.sheet.dh-style.environment,
.themed.theme-dark.application.sheet.dh-style.environment { .themed.theme-dark.application.sheet.dh-style.environment {
background-image: url('../assets/parchments/dh-parchment-dark.png'); background-image: url('../assets/parchments/dh-parchment-dark.png');
} }
@ -4798,6 +4883,10 @@ div.daggerheart.views.multiclass {
.themed.theme-light.application.sheet.dh-style.environment { .themed.theme-light.application.sheet.dh-style.environment {
background: url('../assets/parchments/dh-parchment-light.png'); background: url('../assets/parchments/dh-parchment-light.png');
} }
.themed.theme-light .application.sheet.dh-style.environment,
.themed.theme-light.application.sheet.dh-style.environment {
background: url('../assets/parchments/dh-parchment-light.png');
}
.application.sheet.daggerheart.actor.dh-style.environment .tab { .application.sheet.daggerheart.actor.dh-style.environment .tab {
max-height: 300px; max-height: 300px;
overflow-y: auto; overflow-y: auto;
@ -5003,6 +5092,53 @@ div.daggerheart.views.multiclass {
color: light-dark(#18162e50, #efe6d850); color: light-dark(#18162e50, #efe6d850);
font-family: 'Montserrat', sans-serif; font-family: 'Montserrat', sans-serif;
} }
.theme-light .application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier .beastform-container .beastform-title {
background-image: url('../assets/parchments/dh-parchment-dark.png');
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container {
display: flex;
flex-direction: column;
gap: 4px;
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 4px;
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier .beastform-container {
position: relative;
display: flex;
justify-content: center;
border: 1px solid light-dark(#18162e, #f3c267);
border-radius: 6px;
cursor: pointer;
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier .beastform-container.inactive {
opacity: 0.4;
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier .beastform-container img {
width: 100%;
border-radius: 6px;
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier .beastform-container .beastform-title {
position: absolute;
top: 4px;
display: flex;
flex-wrap: wrap;
font-size: 16px;
margin: 0 4px;
border: 1px solid light-dark(#18162e, #f3c267);
border-radius: 6px;
color: light-dark(#efe6d8, #222);
background-image: url('../assets/parchments/dh-parchment-light.png');
}
.application.daggerheart.dh-style.views.beastform-selection footer {
margin-top: 8px;
display: flex;
}
.application.daggerheart.dh-style.views.beastform-selection footer button {
flex: 1;
}
.application.sheet.daggerheart.actor.dh-style.companion .companion-header-sheet { .application.sheet.daggerheart.actor.dh-style.companion .companion-header-sheet {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -5241,6 +5377,8 @@ div.daggerheart.views.multiclass {
background: url('../assets/svg/experience-shield-light.svg') no-repeat; background: url('../assets/svg/experience-shield-light.svg') no-repeat;
} }
.themed.theme-dark .application.sheet.dh-style.companion, .themed.theme-dark .application.sheet.dh-style.companion,
.themed.theme-dark.application.sheet.dh-style.companion {
.themed.theme-dark .application.sheet.dh-style.companion,
.themed.theme-dark.application.sheet.dh-style.companion { .themed.theme-dark.application.sheet.dh-style.companion {
background-image: url('../assets/parchments/dh-parchment-dark.png'); background-image: url('../assets/parchments/dh-parchment-dark.png');
} }
@ -5248,6 +5386,10 @@ div.daggerheart.views.multiclass {
.themed.theme-light.application.sheet.dh-style.companion { .themed.theme-light.application.sheet.dh-style.companion {
background: url('../assets/parchments/dh-parchment-light.png'); background: url('../assets/parchments/dh-parchment-light.png');
} }
.themed.theme-light .application.sheet.dh-style.companion,
.themed.theme-light.application.sheet.dh-style.companion {
background: url('../assets/parchments/dh-parchment-light.png');
}
.application.sheet.daggerheart.actor.dh-style.adversary .window-content { .application.sheet.daggerheart.actor.dh-style.adversary .window-content {
overflow: auto; overflow: auto;
} }
@ -5437,6 +5579,7 @@ div.daggerheart.views.multiclass {
padding: 0; padding: 0;
} }
.application.sheet.dh-style .window-header button:hover { .application.sheet.dh-style .window-header button:hover {
border-color: light-dark(#18162e, #f3c267);
border-color: light-dark(#18162e, #f3c267); border-color: light-dark(#18162e, #f3c267);
color: light-dark(#18162e, #f3c267); color: light-dark(#18162e, #f3c267);
} }
@ -5454,6 +5597,20 @@ div.daggerheart.views.multiclass {
opacity: 0; opacity: 0;
transition-duration: 0.1s; transition-duration: 0.1s;
} }
.application.sheet.dh-style .window-content {
padding: 0;
position: relative;
top: -36px;
min-height: -webkit-fill-available;
transition: opacity 0.3s ease;
}
.application.sheet.dh-style .window-content .tab {
padding: 0 10px;
}
.application.sheet.dh-style.minimized .window-content {
opacity: 0;
transition-duration: 0.1s;
}
.application.sheet.dh-style:not(.minimized) .window-title, .application.sheet.dh-style:not(.minimized) .window-title,
.application.sheet.dh-style:not(.minimized) .window-icon { .application.sheet.dh-style:not(.minimized) .window-icon {
display: none; display: none;
@ -5479,6 +5636,8 @@ div.daggerheart.views.multiclass {
background-position: center; background-position: center;
} }
.themed.theme-light .application.sheet.dh-style.dialog, .themed.theme-light .application.sheet.dh-style.dialog,
.themed.theme-light.application.sheet.dh-style.dialog {
.themed.theme-light .application.sheet.dh-style.dialog,
.themed.theme-light.application.sheet.dh-style.dialog { .themed.theme-light.application.sheet.dh-style.dialog {
background-image: url('../assets/parchments/dh-parchment-light.png'); background-image: url('../assets/parchments/dh-parchment-light.png');
background-repeat: no-repeat; background-repeat: no-repeat;
@ -5973,6 +6132,44 @@ div.daggerheart.views.multiclass {
justify-content: center; justify-content: center;
gap: 10px; gap: 10px;
} }
.sheet.daggerheart.dh-style .tab.features .features-list {
display: flex;
flex-direction: column;
list-style: none;
padding: 0;
margin: 0;
width: 100%;
gap: 5px;
}
.sheet.daggerheart.dh-style .tab.features .features-list .feature-item {
display: grid;
align-items: center;
grid-template-columns: 1fr 4fr 1fr;
cursor: pointer;
}
.sheet.daggerheart.dh-style .tab.features .features-list .feature-item img {
height: 40px;
width: 40px;
object-fit: cover;
border-radius: 3px;
}
.sheet.daggerheart.dh-style .tab.features .features-list .feature-item h4 {
font-family: 'Montserrat', sans-serif;
font-weight: lighter;
color: #efe6d8;
}
.sheet.daggerheart.dh-style .tab.features .features-list .feature-item .image {
height: 40px;
width: 40px;
object-fit: cover;
border-radius: 6px;
border: none;
}
.sheet.daggerheart.dh-style .tab.features .features-list .feature-item .controls {
display: flex;
justify-content: center;
gap: 10px;
}
.sheet.daggerheart.dh-style .tab.effects .effects-list { .sheet.daggerheart.dh-style .tab.effects .effects-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View file

@ -40,6 +40,8 @@
@import './less/applications/environment-settings/actions.less'; @import './less/applications/environment-settings/actions.less';
@import './less/applications/environment-settings/adversaries.less'; @import './less/applications/environment-settings/adversaries.less';
@import './less/applications//beastform.less';
@import './less/actors/companion/header.less'; @import './less/actors/companion/header.less';
@import './less/actors/companion/details.less'; @import './less/actors/companion/details.less';
@import './less/actors/companion/sheet.less'; @import './less/actors/companion/sheet.less';
@ -60,13 +62,14 @@
@import './less/global/tab-navigation.less'; @import './less/global/tab-navigation.less';
@import './less/global/tab-form-footer.less'; @import './less/global/tab-form-footer.less';
@import './less/global/tab-actions.less'; @import './less/global/tab-actions.less';
@import './less/global/tab-features.less';
@import './less/global/tab-effects.less'; @import './less/global/tab-effects.less';
@import './less/global/item-header.less'; @import './less/global/item-header.less';
@import './less/global/feature-section.less'; @import './less/global/feature-section.less';
@import './less/global/inventory-item.less'; @import './less/global/inventory-item.less';
@import './less/global/inventory-fieldset-items.less'; @import './less/global/inventory-fieldset-items.less';
@import './less/global/prose-mirror.less'; @import './less/global/prose-mirror.less';
@import "./less/global/filter-menu.less"; @import './less/global/filter-menu.less';
@import '../node_modules/@yaireo/tagify/dist/tagify.css'; @import '../node_modules/@yaireo/tagify/dist/tagify.css';

View file

@ -1,197 +1,197 @@
@import '../../utils/colors.less'; @import '../../utils/colors.less';
@import '../../utils/fonts.less'; @import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.companion { .application.sheet.daggerheart.actor.dh-style.companion {
.companion-header-sheet { .companion-header-sheet {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
.profile { .profile {
height: 235px; height: 235px;
width: 100%; width: 100%;
object-fit: cover; object-fit: cover;
cursor: pointer; cursor: pointer;
mask-image: linear-gradient(0deg, transparent 0%, black 10%); mask-image: linear-gradient(0deg, transparent 0%, black 10%);
} }
.actor-name { .actor-name {
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
top: -30px; top: -30px;
gap: 20px; gap: 20px;
padding: 0 20px; padding: 0 20px;
margin-bottom: -30px; margin-bottom: -30px;
input[type='text'] { input[type='text'] {
font-size: 24px; font-size: 24px;
height: 32px; height: 32px;
text-align: center; text-align: center;
border: 1px solid transparent; border: 1px solid transparent;
outline: 2px solid transparent; outline: 2px solid transparent;
transition: all 0.3s ease; transition: all 0.3s ease;
&:hover { &:hover {
outline: 2px solid light-dark(@dark, @golden); outline: 2px solid light-dark(@dark, @golden);
} }
} }
} }
.status-section { .status-section {
display: flex; display: flex;
gap: 5px; gap: 5px;
justify-content: center; justify-content: center;
.status-number { .status-number {
justify-items: center; justify-items: center;
.status-value { .status-value {
position: relative; position: relative;
display: flex; display: flex;
width: 50px; width: 50px;
height: 40px; height: 40px;
border: 1px solid light-dark(@dark-blue, @golden); border: 1px solid light-dark(@dark-blue, @golden);
border-bottom: none; border-bottom: none;
border-radius: 6px 6px 0 0; border-radius: 6px 6px 0 0;
padding: 0 6px; padding: 0 6px;
font-size: 1.5rem; font-size: 1.5rem;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: light-dark(transparent, @dark-blue); background: light-dark(transparent, @dark-blue);
z-index: 2; z-index: 2;
&.armor-slots { &.armor-slots {
width: 80px; width: 80px;
height: 30px; height: 30px;
} }
} }
.status-label { .status-label {
padding: 2px 10px; padding: 2px 10px;
width: 100%; width: 100%;
border-radius: 3px; border-radius: 3px;
background: light-dark(@dark-blue, @golden); background: light-dark(@dark-blue, @golden);
h4 { h4 {
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
line-height: 18px; line-height: 18px;
font-size: 12px; font-size: 12px;
color: light-dark(@beige, @dark-blue); color: light-dark(@beige, @dark-blue);
} }
} }
} }
.status-bar { .status-bar {
position: relative; position: relative;
width: 100px; width: 100px;
height: 40px; height: 40px;
justify-items: center; justify-items: center;
.status-label { .status-label {
position: relative; position: relative;
top: 40px; top: 40px;
height: 22px; height: 22px;
width: 79px; width: 79px;
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z'); clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
background: light-dark(@dark-blue, @golden); background: light-dark(@dark-blue, @golden);
h4 { h4 {
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
line-height: 18px; line-height: 18px;
color: light-dark(@beige, @dark-blue); color: light-dark(@beige, @dark-blue);
} }
} }
.status-value { .status-value {
position: absolute; position: absolute;
display: flex; display: flex;
padding: 0 6px; padding: 0 6px;
font-size: 1.5rem; font-size: 1.5rem;
align-items: center; align-items: center;
width: 100px; width: 100px;
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;
input[type='number'] { input[type='number'] {
background: transparent; background: transparent;
font-size: 1.5rem; font-size: 1.5rem;
width: 40px; width: 40px;
height: 30px; height: 30px;
text-align: center; text-align: center;
border: none; border: none;
outline: 2px solid transparent; outline: 2px solid transparent;
color: @beige; color: @beige;
&.bar-input { &.bar-input {
padding: 0; padding: 0;
color: @beige; color: @beige;
backdrop-filter: none; backdrop-filter: none;
background: transparent; background: transparent;
transition: all 0.3s ease; transition: all 0.3s ease;
&:hover, &:hover,
&:focus { &:focus {
background: @semi-transparent-dark-blue; background: @semi-transparent-dark-blue;
backdrop-filter: blur(9.5px); backdrop-filter: blur(9.5px);
} }
} }
} }
.bar-label { .bar-label {
width: 40px; width: 40px;
} }
} }
.progress-bar { .progress-bar {
position: absolute; position: absolute;
appearance: none; appearance: none;
width: 100px; width: 100px;
height: 40px; height: 40px;
border: 1px solid light-dark(@dark-blue, @golden); border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px; border-radius: 6px;
z-index: 1; z-index: 1;
background: @dark-blue; background: @dark-blue;
&::-webkit-progress-bar { &::-webkit-progress-bar {
border: none; border: none;
background: @dark-blue; background: @dark-blue;
border-radius: 6px; border-radius: 6px;
} }
&::-webkit-progress-value { &::-webkit-progress-value {
background: @gradient-hp; background: @gradient-hp;
border-radius: 6px; border-radius: 6px;
} }
&.stress-color::-webkit-progress-value { &.stress-color::-webkit-progress-value {
background: @gradient-stress; background: @gradient-stress;
border-radius: 6px; border-radius: 6px;
} }
&::-moz-progress-bar { &::-moz-progress-bar {
background: @gradient-hp; background: @gradient-hp;
border-radius: 6px; border-radius: 6px;
} }
&.stress-color::-moz-progress-bar { &.stress-color::-moz-progress-bar {
background: @gradient-stress; background: @gradient-stress;
border-radius: 6px; border-radius: 6px;
} }
} }
} }
.level-up-label { .level-up-label {
font-size: 24px; font-size: 24px;
padding-top: 8px; padding-top: 8px;
} }
} }
.companion-navigation { .companion-navigation {
display: flex; display: flex;
gap: 8px; gap: 8px;
align-items: center; align-items: center;
width: 100%; width: 100%;
} }
} }
} }

View file

@ -1,6 +1,4 @@
// Theme header backgrounds // Theme header backgrounds
.appTheme({ .appTheme({
&.companion { &.companion {
background-image: url('../assets/parchments/dh-parchment-dark.png'); background-image: url('../assets/parchments/dh-parchment-dark.png');
@ -12,7 +10,6 @@
}); });
.application.sheet.daggerheart.actor.dh-style.companion { .application.sheet.daggerheart.actor.dh-style.companion {
// .profile { // .profile {
// height: 80px; // height: 80px;
// width: 80px; // width: 80px;

View file

@ -12,7 +12,6 @@
}); });
.application.sheet.daggerheart.actor.dh-style.environment { .application.sheet.daggerheart.actor.dh-style.environment {
.tab { .tab {
max-height: 300px; max-height: 300px;
overflow-y: auto; overflow-y: auto;

View file

@ -0,0 +1,59 @@
.theme-light .application.daggerheart.dh-style.views.beastform-selection {
.beastforms-container .beastforms-tier .beastform-container .beastform-title {
background-image: url('../assets/parchments/dh-parchment-dark.png');
}
}
.application.daggerheart.dh-style.views.beastform-selection {
.beastforms-container {
display: flex;
flex-direction: column;
gap: 4px;
.beastforms-tier {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 4px;
.beastform-container {
position: relative;
display: flex;
justify-content: center;
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
cursor: pointer;
&.inactive {
opacity: 0.4;
}
img {
width: 100%;
border-radius: 6px;
}
.beastform-title {
position: absolute;
top: 4px;
display: flex;
flex-wrap: wrap;
font-size: 16px;
margin: 0 4px;
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
color: light-dark(@beige, @dark);
background-image: url('../assets/parchments/dh-parchment-light.png');
}
}
}
}
footer {
margin-top: 8px;
display: flex;
button {
flex: 1;
}
}
}

View file

@ -1,43 +1,43 @@
@import '../utils/colors.less'; @import '../utils/colors.less';
@import '../utils/fonts.less'; @import '../utils/fonts.less';
.appTheme({ .appTheme({
&.dialog { &.dialog {
background-image: url('../assets/parchments/dh-parchment-dark.png'); background-image: url('../assets/parchments/dh-parchment-dark.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
} }
}, { }, {
&.dialog { &.dialog {
background-image: url('../assets/parchments/dh-parchment-light.png'); background-image: url('../assets/parchments/dh-parchment-light.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
} }
}); });
.application.dialog.dh-style { .application.dialog.dh-style {
border: none; border: none;
.window-header { .window-header {
background: transparent; background: transparent;
border-bottom: none; border-bottom: none;
color: light-dark(@dark-blue, @beige); color: light-dark(@dark-blue, @beige);
h1 { h1 {
color: light-dark(@dark-blue, @beige); color: light-dark(@dark-blue, @beige);
font-family: @font-body; font-family: @font-body;
} }
button { button {
color: light-dark(@dark-blue, @beige); color: light-dark(@dark-blue, @beige);
background: light-dark(transparent, @deep-black); background: light-dark(transparent, @deep-black);
border: 1px solid light-dark(@dark-blue, transparent); border: 1px solid light-dark(@dark-blue, transparent);
padding: 0; padding: 0;
&:hover { &:hover {
border: 1px solid light-dark(@dark-blue, @golden); border: 1px solid light-dark(@dark-blue, @golden);
color: light-dark(@dark-blue, @golden); color: light-dark(@dark-blue, @golden);
} }
} }
} }
} }

View file

@ -0,0 +1,50 @@
@import '../utils/colors.less';
@import '../utils/fonts.less';
.sheet.daggerheart.dh-style {
.tab.features {
.features-list {
display: flex;
flex-direction: column;
list-style: none;
padding: 0;
margin: 0;
width: 100%;
gap: 5px;
.feature-item {
display: grid;
align-items: center;
grid-template-columns: 1fr 4fr 1fr;
cursor: pointer;
img {
height: 40px;
width: 40px;
object-fit: cover;
border-radius: 3px;
}
h4 {
font-family: @font-body;
font-weight: lighter;
color: @beige;
}
.image {
height: 40px;
width: 40px;
object-fit: cover;
border-radius: 6px;
border: none;
}
.controls {
display: flex;
justify-content: center;
gap: 10px;
}
}
}
}
}

View file

@ -5,7 +5,7 @@
"version": "0.0.1", "version": "0.0.1",
"compatibility": { "compatibility": {
"minimum": "13", "minimum": "13",
"verified": "13.345", "verified": "13.346",
"maximum": "13" "maximum": "13"
}, },
"authors": [ "authors": [
@ -247,7 +247,11 @@
}, },
"armor": { "armor": {
"htmlFields": ["description"] "htmlFields": ["description"]
} },
"beastform": {}
},
"ActiveEffect": {
"beastform": {}
}, },
"Combat": { "Combat": {
"combat": {} "combat": {}

View file

@ -123,7 +123,7 @@
<div class="dice-result"> <div class="dice-result">
<div class="dice-tooltip"> <div class="dice-tooltip">
<div class="wrapper"> <div class="wrapper">
{{!-- {{> 'systems/daggerheart/templates/chat/parts/damage-chat.hbs' damage=damage noTitle=true}} --}} {{> 'systems/daggerheart/templates/chat/parts/damage-chat.hbs' damage=damage noTitle=true}}
</div> </div>
</div> </div>
</div> </div>

View file

@ -17,7 +17,8 @@
{{/each}} {{/each}}
</ol> </ol>
</div> </div>
{{/each}} {{/each}}
{{#if damage.roll.modifierTotal}}<div class="duality-modifier">{{#if (gt damage.roll.modifierTotal 0)}}+{{/if}}{{damage.roll.modifierTotal}}</div>{{/if}}
<div class="duality-result">Total: {{damage.roll.total}}</div> <div class="duality-result">Total: {{damage.roll.total}}</div>
</section> </section>
</div> </div>

View file

@ -14,11 +14,6 @@
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=action type=../type}} {{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=action type=../type}}
{{/if}} {{/if}}
{{/each}} {{/each}}
{{#each document.system.ancestry.system.actions as |action|}}
{{#if (or (eq ../type 'ancestry'))}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=action type=../type}}
{{/if}}
{{/each}}
{{#each document.system.class.value.system.classFeatures as |classFeature|}} {{#each document.system.class.value.system.classFeatures as |classFeature|}}
{{#if (or (eq ../type 'class'))}} {{#if (or (eq ../type 'class'))}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=classFeature type=../type}} {{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=classFeature type=../type}}

View file

@ -1,4 +1,4 @@
<li class="inventory-item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-companion="{{companion}}" {{#if (not noTooltip)}}data-tooltip="{{concat "#item#" item.uuid}}"{{/if}}> <li class="inventory-item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-type="{{type}}" data-companion="{{companion}}" {{#if (not noTooltip)}}data-tooltip="{{concat "#item#" item.uuid}}"{{/if}}>
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" data-action="useItem"/> <img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" data-action="useItem"/>
<div class="item-label"> <div class="item-label">
{{#if isCompanion}} {{#if isCompanion}}

View file

@ -0,0 +1,23 @@
<section
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'
>
<fieldset class="one-column drop-section">
<legend>{{localize "DAGGERHEART.Sheets.Global.Features"}}</legend>
<div class="features-list">
{{#each document.system.features as |feature index|}}
<div class="feature-item"
data-action="editFeature"
data-index="{{index}}"
>
<img class="image" src="{{feature.img}}" />
<span>{{feature.name}}</span>
<div class="controls">
<a data-action="removeFeature" data-index="{{index}}"><i class="fa-solid fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
</section>

View file

@ -0,0 +1,10 @@
<header class='item-sheet-header'>
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
<div class='item-info'>
<line-div></line-div>
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
<div class='item-description'>
<h3>{{localize 'TYPES.Item.beastform'}}</h3>
</div>
</div>
</header>

View file

@ -0,0 +1,27 @@
<section
class='tab {{tabs.settings.cssClass}} {{tabs.settings.id}}'
data-tab='{{tabs.settings.id}}'
data-group='{{tabs.settings.group}}'
>
<div class="two-columns">
{{formGroup systemFields.tier value=source.system.tier localize=true}}
{{formGroup systemFields.examples value=source.system.examples localize=true}}
</div>
<fieldset class="two-columns">
<legend>{{localize "DAGGERHEART.Sheets.Beastform.FIELDS.advantageOn.label"}}</legend>
{{!-- {{formGroup systemFields.examples value=source.system.examples localize=true}} --}}
</fieldset>
<fieldset class="two-columns even">
<legend>{{localize "DAGGERHEART.Sheets.Beastform.tokenTitle"}}</legend>
<div class="full-width">
{{formGroup systemFields.tokenImg value=source.system.tokenImg localize=true}}
</div>
{{formGroup systemFields.tokenSize.fields.height value=source.system.tokenSize.height localize=true placeholder=(localize "DAGGERHEART.Sheets.Beastform.FIELDS.tokenSize.placeholder") }}
{{formGroup systemFields.tokenSize.fields.width value=source.system.tokenSize.width localize=true placeholder=(localize "DAGGERHEART.Sheets.Beastform.FIELDS.tokenSize.placeholder")}}
</fieldset>
</section>

View file

@ -14,7 +14,8 @@
<span>-</span> <span>-</span>
{{localize (concat 'DAGGERHEART.Range.' source.system.range '.name')}} {{localize (concat 'DAGGERHEART.Range.' source.system.range '.name')}}
<span>-</span> <span>-</span>
{{source.system.damage.value}} {{log this}}
{{source.system.damage.dice}} + {{source.system.damage.bonus}}
({{localize (concat 'DAGGERHEART.DamageType.' source.system.damage.type '.abbreviation')}}) ({{localize (concat 'DAGGERHEART.DamageType.' source.system.damage.type '.abbreviation')}})
<span>-</span> <span>-</span>
{{localize (concat 'DAGGERHEART.Burden.' source.system.burden)}} {{localize (concat 'DAGGERHEART.Burden.' source.system.burden)}}

View file

@ -19,8 +19,10 @@
<fieldset class="two-columns"> <fieldset class="two-columns">
<legend>{{localize "DAGGERHEART.Sheets.Weapon.Damage.Title"}}</legend> <legend>{{localize "DAGGERHEART.Sheets.Weapon.Damage.Title"}}</legend>
<span>{{localize "DAGGERHEART.Sheets.Weapon.Damage.Value"}}</span> <span>{{localize "DAGGERHEART.Sheets.Weapon.Damage.Die"}}</span>
{{formGroup systemFields.damage.fields.value value=source.system.damage.value}} {{formGroup systemFields.damage.fields.dice value=source.system.damage.dice}}
<span>{{localize "DAGGERHEART.Sheets.Weapon.Damage.Bonus"}}</span>
{{formGroup systemFields.damage.fields.bonus value=source.system.damage.bonus}}
<span>{{localize "DAGGERHEART.Sheets.Weapon.Damage.Type"}}</span> <span>{{localize "DAGGERHEART.Sheets.Weapon.Damage.Type"}}</span>
{{formGroup systemFields.damage.fields.type value=source.system.damage.type localize=true}} {{formGroup systemFields.damage.fields.type value=source.system.damage.type localize=true}}
</fieldset> </fieldset>

View file

@ -0,0 +1,6 @@
<div>
<div>{{name}}</div>
<img src="{{system.tokenImg}}" />
<div>{{{system.examples}}}</div>
<div>{{system.advantageOn}}</div>
</div>

View file

@ -44,7 +44,8 @@
{{#if fields.healing}}{{> 'systems/daggerheart/templates/views/actionTypes/healing.hbs' fields=fields.healing.fields source=source.healing}}{{/if}} {{#if fields.healing}}{{> 'systems/daggerheart/templates/views/actionTypes/healing.hbs' fields=fields.healing.fields source=source.healing}}{{/if}}
{{#if fields.resource}}{{> 'systems/daggerheart/templates/views/actionTypes/resource.hbs' fields=fields.resource.fields source=source.resource}}{{/if}} {{#if fields.resource}}{{> 'systems/daggerheart/templates/views/actionTypes/resource.hbs' fields=fields.resource.fields source=source.resource}}{{/if}}
{{#if fields.documentUUID}}{{> 'systems/daggerheart/templates/views/actionTypes/uuid.hbs' fields=fields.documentUUID source=source.documentUUID}}{{/if}} {{#if fields.documentUUID}}{{> 'systems/daggerheart/templates/views/actionTypes/uuid.hbs' fields=fields.documentUUID source=source.documentUUID}}{{/if}}
{{#if fields.effects}}{{> 'systems/daggerheart/templates/views/actionTypes/effect.hbs' fields=fields.effects.element.fields source=source.effects}}{{/if}} {{#if fields.effects}}{{> 'systems/daggerheart/templates/views/actionTypes/effect.hbs' fields=fields.effects.element.fields source=source.effects}}{{/if}}
{{#if fields.beastform}}{{> 'systems/daggerheart/templates/views/actionTypes/beastform.hbs' fields=fields.effects.element.fields source=source.beastform}}{{/if}}
</div> </div>
</section> </section>
</div> </div>

View file

@ -0,0 +1,17 @@
<fieldset class="action-category">
<legend class="action-category-label">
<div>{{localize "DAGGERHEART.Actions.Config.Beastform.label"}}</div>
</legend>
<div class="action-category-data open">
<div class="hint-group">
<div class="form-fields">
<label>{{localize "DAGGERHEART.Actions.Config.Beastform.exact"}}</label>
<select name="beastform.tierAccess.exact" data-dtype="Number">
{{selectOptions tierOptions selected=@root.source.beastform.tierAccess.exact labelAttr="label" valueAttr="key" blank="" }}
</select>
</div>
<p class="hint">{{localize "DAGGERHEART.Actions.Config.Beastform.exactHint"}}</p>
</div>
</div>
</fieldset>

View file

@ -0,0 +1,18 @@
<div>
<div class="beastforms-container">
{{#each beastformTiers as |tier tierKey|}}
<fieldset class="beastforms-tier">
<legend>{{tier.label}}</legend>
{{#each tier.values as |form uuid|}}
<div data-action="selectBeastform" data-uuid="{{uuid}}" data-tooltip="{{concat "#item#" uuid}}" class="beastform-container {{#if (and @root.canSubmit (not form.selected))}}inactive{{/if}}">
<img src="{{form.value.img}}" />
<div class="beastform-title">{{form.value.name}}</div>
</div>
{{/each}}
</fieldset>
{{/each}}
</div>
<footer>
<button type="button" data-action="submitBeastform" {{#if (not canSubmit)}}disabled{{/if}}>{{localize "DAGGERHEART.Sheets.Beastform.transform"}}</button>
</footer>
</div>