diff --git a/daggerheart.mjs b/daggerheart.mjs index d6b180d3..65084450 100644 --- a/daggerheart.mjs +++ b/daggerheart.mjs @@ -5,13 +5,13 @@ import * as documents from './module/documents/_module.mjs'; import RegisterHandlebarsHelpers from './module/helpers/handlebarsHelper.mjs'; import DhpCombatTracker from './module/ui/combatTracker.mjs'; import { GMUpdateEvent, handleSocketEvent, socketEvent } from './module/helpers/socket.mjs'; -import { registerDHPSettings } from './module/applications/settings.mjs'; +import { registerDHSettings } from './module/applications/settings.mjs'; import DhpChatLog from './module/ui/chatLog.mjs'; import DhpPlayers from './module/ui/players.mjs'; import DhpRuler from './module/ui/ruler.mjs'; import DhpTokenRuler from './module/ui/tokenRuler.mjs'; -import { dualityRollEnricher, getDualityMessage } from './module/enrichers/DualityRollEnricher.mjs'; -import { getCommandTarget, rollCommandToJSON } from './module/helpers/utils.mjs'; +import { dualityRollEnricher } from './module/enrichers/DualityRollEnricher.mjs'; +import { getCommandTarget, rollCommandToJSON, setDiceSoNiceForDualityRoll } from './module/helpers/utils.mjs'; import { abilities } from './module/config/actorConfig.mjs'; globalThis.SYSTEM = SYSTEM; @@ -97,7 +97,7 @@ Hooks.once('init', () => { game.socket.on(`system.${SYSTEM.id}`, handleSocketEvent); - registerDHPSettings(); + registerDHSettings(); RegisterHandlebarsHelpers.registerHelpers(); return preloadHandlebarsTemplates(); @@ -213,12 +213,19 @@ Hooks.on('chatMessage', (_, message) => { const attributeRoll = `${attribute?.data?.value ? `${attribute.data.value > 0 ? `+${attribute.data.value}` : `${attribute.data.value}`}` : ''}`; const roll = new Roll(`${hopeAndFearRoll}${advantageRoll}${attributeRoll}`); await roll.evaluate(); + + setDiceSoNiceForDualityRoll( + roll, + rollCommand.advantage && !rollCommand.disadvantage, + rollCommand.disadvantage && !rollCommand.advantage + ); + resolve({ roll, attribute: attribute ? { value: attribute.data.value, - label: `${game.i18n.localize(abilities[attributeValue].label)} ${attribute.data.value >= 0 ? `+` : `-`}${attribute.data.value}` + label: `${game.i18n.localize(abilities[attributeValue].label)} ${attribute.data.value >= 0 ? `+` : ``}${attribute.data.value}` } : undefined, title diff --git a/lang/en.json b/lang/en.json index 93c090db..93b82f79 100755 --- a/lang/en.json +++ b/lang/en.json @@ -46,6 +46,21 @@ "CloseLabel": "Close", "FarLabel": "Far", "VeryFarLabel": "Very Far" + }, + "Appearance": { + "title": "Appearance Settings", + "label": "Appearance Settings", + "hint": "Modify the look of various parts of the system", + "name": "Appearance Settings", + "duality": "Duality Rolls", + "DiceSoNice": { + "title": "Dice So Nice", + "hint": "Coloration of Hope and Fear dice if the Dice So Nice module is used.", + "foreground": "Foreground", + "background": "Background", + "outline": "Outline", + "edge": "Edge" + } } }, "Automation": { @@ -139,52 +154,58 @@ "Reaction": "Reaction" }, "Abilities": { - "Agility": { - "Name": "Agility", - "Verb": { - "Sprint": "Sprint", - "Leap": "Leap", - "Maneuver": "Maneuver" + "agility": { + "name": "Agility", + "short": "AGI", + "verb": { + "sprint": "Sprint", + "leap": "Leap", + "maneuver": "Maneuver" } }, - "Strength": { - "Name": "Strength", - "Verb": { - "Lift": "Lift", - "Smash": "Smash", - "Grapple": "Grapple" + "strength": { + "name": "Strength", + "short": "STR", + "verb": { + "lift": "Lift", + "smash": "Smash", + "grapple": "Grapple" } }, - "Finesse": { - "Name": "Finesse", - "Verb": { - "Control": "Control", - "Hide": "Hide", - "Tinker": "Tinker" + "finesse": { + "name": "Finesse", + "short": "FIN", + "verb": { + "control": "Control", + "hide": "Hide", + "tinker": "Tinker" } }, - "Instinct": { - "Name": "Instinct", - "Verb": { - "Perceive": "Perceive", - "Sense": "Sense", - "Navigate": "Navigate" + "instinct": { + "name": "Instinct", + "short": "INS", + "verb": { + "perceive": "Perceive", + "sense": "Sense", + "navigate": "Navigate" } }, - "Presence": { - "Name": "Presence", - "Verb": { - "Charm": "Charm", - "Perform": "Perform", - "Deceive": "Deceive" + "presence": { + "name": "Presence", + "short": "PRE", + "verb": { + "charm": "Charm", + "perform": "Perform", + "deceive": "Deceive" } }, - "Knowledge": { - "Name": "Knowledge", - "Verb": { - "Recall": "Recall", - "Analyze": "Analyze", - "Comprehend": "Comprehend" + "knowledge": { + "name": "Knowledge", + "short": "KNO", + "verb": { + "recall": "Recall", + "analyze": "Analyze", + "comprehend": "Comprehend" } } }, @@ -383,39 +404,39 @@ } }, "Burden": { - "OneHanded": "One-Handed", - "TwoHanded": "Two-Handed" + "oneHanded": "One-Handed", + "twoHanded": "Two-Handed" }, "Range": { - "Melee": { - "Name": "Melee", - "Description": "means a character is within touching distance of the target. PCs can generally touch targets up to a few feet away from them, but melee range may be greater for especially large NPCs." + "melee": { + "name": "Melee", + "description": "means a character is within touching distance of the target. PCs can generally touch targets up to a few feet away from them, but melee range may be greater for especially large NPCs." }, - "VeryClose": { - "Name": "Very Close", - "Description": "means a distance where one can see fine details of a target- within moments of reaching, if need be. This is usually anywhere from about 5-10 feet away. While in danger, a PC can usually get to anything that’s very close as part of any other action they take. Anything on a battle map that is within the shortest length of a game card (~2-3 inches) can usually be considered very close." + "veryClose": { + "name": "Very Close", + "description": "means a distance where one can see fine details of a target- within moments of reaching, if need be. This is usually anywhere from about 5-10 feet away. While in danger, a PC can usually get to anything that’s very close as part of any other action they take. Anything on a battle map that is within the shortest length of a game card (~2-3 inches) can usually be considered very close." }, - "Close": { - "Name": "Close", - "Description": "means a distance where one can see prominent details of a target-- across a room or to a neighboring market stall, generally about 10-30 feet away. While in danger, a PC can usually get to anything that’s close as part of any other action they take. Anything on a battle map that is within the length of a standard pen or pencil (~5-6 inches) can usually be considered close." + "close": { + "name": "Close", + "description": "means a distance where one can see prominent details of a target-- across a room or to a neighboring market stall, generally about 10-30 feet away. While in danger, a PC can usually get to anything that’s close as part of any other action they take. Anything on a battle map that is within the length of a standard pen or pencil (~5-6 inches) can usually be considered close." }, - "Far": { - "Name": "Far", - "Description": "means a distance where one can see the appearance of a person or object, but probably not in great detail-- across a small battlefield or down a large corridor. This is usually about 30-100 feet away. While under danger, a PC will likely have to make an Agility check to get here safely. Anything on a battle map that is within the length of a standard piece of paper (~10-11 inches) can usually be considered far." + "far": { + "name": "Far", + "description": "means a distance where one can see the appearance of a person or object, but probably not in great detail-- across a small battlefield or down a large corridor. This is usually about 30-100 feet away. While under danger, a PC will likely have to make an Agility check to get here safely. Anything on a battle map that is within the length of a standard piece of paper (~10-11 inches) can usually be considered far." }, - "VeryFar": { - "Name": "Very Far", - "Description": "means a distance where you can see the shape of a person or object, but probably not make outany details-- across a large battlefield or down a long street, generally about 100-300 feet away. While under danger, a PC likely has to make an Agility check to get here safely. Anything on a battle map that is beyond far distance, but still within sight of the characters can usually be considered very far." + "veryFar": { + "name": "Very Far", + "description": "means a distance where you can see the shape of a person or object, but probably not make outany details-- across a large battlefield or down a long street, generally about 100-300 feet away. While under danger, a PC likely has to make an Agility check to get here safely. Anything on a battle map that is beyond far distance, but still within sight of the characters can usually be considered very far." } }, "DamageType": { - "Physical": { - "Name": "Physical", - "Abbreviation": "Phy" + "physical": { + "name": "Physical", + "abbreviation": "Phy" }, - "Magical": { - "Name": "Magical", - "Abbreviation": "Mag" + "magical": { + "name": "Magical", + "abbreviation": "Mag" } }, "HealingType": { @@ -923,13 +944,13 @@ "NewFeature": "New Feature" }, "Armor": { - "BaseScore": "Base Score", - "Feature": "Feature", - "Description": "Description", - "BaseThresholds": { - "Base": "Base Thresholds", - "Major": "Major Threshold", - "Severe": "Severe Threshold" + "baseScore": "Base Score", + "feature": "Feature", + "description": "Description", + "baseThresholds": { + "base": "Base Thresholds", + "major": "Major Threshold", + "severe": "Severe Threshold" } }, "Class": { @@ -1051,6 +1072,7 @@ } }, "Weapon": { + "PrimaryWeapon": "Primary Weapon", "SecondaryWeapon": "Secondary Weapon", "Trait": "Trait", "Range": "Range", diff --git a/module/applications/_module.mjs b/module/applications/_module.mjs index 1e280d81..cc1bc90e 100644 --- a/module/applications/_module.mjs +++ b/module/applications/_module.mjs @@ -8,7 +8,7 @@ export { default as DhpAncestry } from './sheets/ancestry.mjs'; export { default as DhpCommunity } from './sheets/community.mjs'; export { default as DhpMiscellaneous } from './sheets/items/miscellaneous.mjs'; export { default as DhpConsumable } from './sheets/items/consumable.mjs'; -export { default as DhpWeapon } from './sheets/weapon.mjs'; -export { default as DhpArmor } from './sheets/armor.mjs'; +export { default as DhpWeapon } from './sheets/items/weapon.mjs'; +export { default as DhpArmor } from './sheets/items/armor.mjs'; export { default as DhpChatMessage } from './chatMessage.mjs'; export { default as DhpEnvironment } from './sheets/environment.mjs'; diff --git a/module/applications/chatMessage.mjs b/module/applications/chatMessage.mjs index c5964023..fb4cc613 100644 --- a/module/applications/chatMessage.mjs +++ b/module/applications/chatMessage.mjs @@ -1,5 +1,5 @@ -import { DualityRollColor } from '../config/settingsConfig.mjs'; import DhpDualityRoll from '../data/dualityRoll.mjs'; +import { DualityRollColor } from '../data/settings/Appearance.mjs'; export default class DhpChatMesssage extends ChatMessage { async renderHTML() { @@ -16,7 +16,7 @@ export default class DhpChatMesssage extends ChatMessage { const html = await super.renderHTML(); if ( this.type === 'dualityRoll' && - game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.DualityRollColor) === + game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).dualityColorScheme === DualityRollColor.colorful.value ) { html.classList.add('duality'); diff --git a/module/applications/config/Action.mjs b/module/applications/config/Action.mjs index 109ad503..52a30918 100644 --- a/module/applications/config/Action.mjs +++ b/module/applications/config/Action.mjs @@ -70,7 +70,9 @@ export default class DaggerheartActionConfig extends DaggerheartSheet(Applicatio } static async updateForm(event, _, formData) { - const data = foundry.utils.expandObject(foundry.utils.mergeObject(this.action.toObject(), formData.object)); + const data = foundry.utils.expandObject( + foundry.utils.mergeObject(this.action.toObject(), foundry.utils.expandObject(formData.object)) + ); const newActions = this.action.parent.actions.map(x => x.toObject()); if (!newActions.findSplice(x => x.id === data.id, data)) { newActions.push(data); diff --git a/module/applications/settings.mjs b/module/applications/settings.mjs index c8aba5c4..738cbe66 100644 --- a/module/applications/settings.mjs +++ b/module/applications/settings.mjs @@ -1,5 +1,7 @@ import { DualityRollColor } from '../config/settingsConfig.mjs'; import { defaultLevelTiers, DhLevelTiers } from '../data/levelTier.mjs'; +import DhAppearance from '../data/settings/Appearance.mjs'; +import DHAppearanceSettings from './settings/appearanceSettings.mjs'; class DhpAutomationSettings extends FormApplication { constructor(object = {}, options = {}) { @@ -161,7 +163,7 @@ class DhpRangeSettings extends FormApplication { } } -export const registerDHPSettings = () => { +export const registerDHSettings = () => { // const debouncedReload = foundry.utils.debounce(() => window.location.reload(), 100); game.settings.register(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.General.AbilityArray, { @@ -216,14 +218,11 @@ export const registerDHPSettings = () => { } }); - game.settings.register(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.DualityRollColor, { - name: game.i18n.localize('DAGGERHEART.Settings.DualityRollColor.Name'), - hint: game.i18n.localize('DAGGERHEART.Settings.DualityRollColor.Hint'), - scope: 'world', - config: true, - type: Number, - choices: Object.values(DualityRollColor), - default: DualityRollColor.colorful.value + game.settings.register(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance, { + scope: 'client', + config: false, + type: DhAppearance, + default: DhAppearance.defaultSchema }); game.settings.register(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.DualityRollColor, { @@ -267,53 +266,13 @@ export const registerDHPSettings = () => { type: DhpRangeSettings, restricted: true }); + + game.settings.registerMenu(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance, { + name: game.i18n.localize('DAGGERHEART.Settings.Menu.Appearance.title'), + label: game.i18n.localize('DAGGERHEART.Settings.Menu.Appearance.label'), + hint: game.i18n.localize('DAGGERHEART.Settings.Menu.Appearance.hint'), + icon: 'fa-solid fa-palette', + type: DHAppearanceSettings, + restricted: false + }); }; - -// const {HandlebarsApplicationMixin, ApplicationV2} = foundry.applications.api; - -// export default class DhpSettings extends HandlebarsApplicationMixin(ApplicationV2) { -// constructor(actor, shortrest){ -// super({}); - -// this.actor = actor; -// this.selectedActivity = null; -// this.shortrest = shortrest; - -// this.customActivity = SYSTEM.GENERAL.downtime.custom; -// } - -// get title(){ -// return game.i18n.localize("DAGGERHEART.Application.Settings.Title"); -// } - -// static DEFAULT_OPTIONS = { -// tag: 'form', -// classes: ["daggerheart", "application", "settings"], -// position: { width: 800, height: 'auto' }, -// actions: { -// selectActivity: this.selectActivity, -// }, -// form: { handler: this.updateData } -// }; - -// static PARTS = { -// application: { -// id: "settings", -// template: "systems/daggerheart/templates/application/settings.hbs" -// } -// } - -// async _prepareContext(_options) { -// const context = await super._prepareContext(_options); - -// return context; -// } - -// static async updateData(event, element, formData){ -// this.render(); -// } - -// static close(){ -// super.close(); -// } -// } diff --git a/module/applications/settings/appearanceSettings.mjs b/module/applications/settings/appearanceSettings.mjs new file mode 100644 index 00000000..e906012b --- /dev/null +++ b/module/applications/settings/appearanceSettings.mjs @@ -0,0 +1,59 @@ +import DhAppearance from '../../data/settings/Appearance.mjs'; + +const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api; + +export default class DHAppearanceSettings extends HandlebarsApplicationMixin(ApplicationV2) { + constructor() { + super({}); + + this.settings = new DhAppearance( + game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).toObject() + ); + } + + get title() { + return game.i18n.localize('DAGGERHEART.Settings.Menu.Appearance.name'); + } + + static DEFAULT_OPTIONS = { + tag: 'form', + id: 'daggerheart-appearance-settings', + classes: ['daggerheart', 'setting', 'dh-style'], + position: { width: '600', height: 'auto' }, + actions: { + reset: this.reset, + save: this.save + }, + form: { handler: this.updateData, submitOnChange: true } + }; + + static PARTS = { + main: { + template: 'systems/daggerheart/templates/settings/appearance-settings.hbs' + } + }; + + async _prepareContext(_options) { + const context = await super._prepareContext(_options); + context.settingFields = this.settings; + + return context; + } + + static async updateData(event, element, formData) { + const updatedSettings = foundry.utils.expandObject(formData.object); + + await this.settings.updateSource(updatedSettings); + this.render(); + } + + static async reset() { + this.settings = new DhAppearance(); + this.render(); + } + + static async save() { + await game.settings.set(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance, this.settings.toObject()); + this.close(); + } +} diff --git a/module/applications/sheets/armor.mjs b/module/applications/sheets/armor.mjs deleted file mode 100644 index 0c6c933a..00000000 --- a/module/applications/sheets/armor.mjs +++ /dev/null @@ -1,63 +0,0 @@ -// import DhpApplicationMixin from '../daggerheart-sheet.mjs'; - -// export default class ArmorSheet extends DhpApplicationMixin(ItemSheet) { -// static documentType = "armor"; - -// /** @override */ -// static get defaultOptions() { -// return foundry.utils.mergeObject(super.defaultOptions, { -// classes: ["daggerheart", "sheet", "armor"], -// width: 400, -// height: 'auto', -// }); -// } - -// /** @override */ -// getData() { -// const context = super.getData(); -// context.config = CONFIG.daggerheart; - -// return context; -// } - -// async _handleAction(action, event, button) { -// switch(action){ -// } -// } -// } -import DaggerheartSheet from './daggerheart-sheet.mjs'; - -const { ItemSheetV2 } = foundry.applications.sheets; -export default class ArmorSheet extends DaggerheartSheet(ItemSheetV2) { - static DEFAULT_OPTIONS = { - tag: 'form', - classes: ['daggerheart', 'sheet', 'armor'], - position: { width: 400 }, - form: { - handler: this.updateForm, - submitOnChange: true, - closeOnSubmit: false - }, - dragDrop: [{ dragSelector: null, dropSelector: null }] - }; - - static PARTS = { - form: { - id: 'feature', - template: 'systems/daggerheart/templates/sheets/armor.hbs' - } - }; - - async _prepareContext(_options) { - const context = await super._prepareContext(_options); - context.document = this.document; - context.config = CONFIG.daggerheart; - - return context; - } - - static async updateForm(event, _, formData) { - await this.document.update(formData.object); - this.render(); - } -} diff --git a/module/applications/sheets/items/armor.mjs b/module/applications/sheets/items/armor.mjs new file mode 100644 index 00000000..25b2ddb5 --- /dev/null +++ b/module/applications/sheets/items/armor.mjs @@ -0,0 +1,59 @@ +import DaggerheartSheet from '../daggerheart-sheet.mjs'; + +const { ItemSheetV2 } = foundry.applications.sheets; +export default class ArmorSheet extends DaggerheartSheet(ItemSheetV2) { + static DEFAULT_OPTIONS = { + tag: 'form', + classes: ['daggerheart', 'sheet', 'dh-style', 'armor'], + position: { width: 600 }, + form: { + handler: this.updateForm, + submitOnChange: true, + closeOnSubmit: false + }, + dragDrop: [{ dragSelector: null, dropSelector: null }] + }; + + static PARTS = { + header: { template: 'systems/daggerheart/templates/sheets/items/armor/header.hbs' }, + tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' }, + description: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-description.hbs' }, + settings: { + template: 'systems/daggerheart/templates/sheets/items/armor/settings.hbs', + scrollable: ['.settings'] + } + }; + + static TABS = { + description: { + active: true, + cssClass: '', + group: 'primary', + id: 'description', + icon: null, + label: 'DAGGERHEART.Sheets.Feature.Tabs.Description' + }, + settings: { + active: false, + cssClass: '', + group: 'primary', + id: 'settings', + icon: null, + label: 'DAGGERHEART.Sheets.Feature.Tabs.Settings' + } + }; + + async _prepareContext(_options) { + const context = await super._prepareContext(_options); + context.document = this.document; + context.config = CONFIG.daggerheart; + context.tabs = super._getTabs(this.constructor.TABS); + + return context; + } + + static async updateForm(event, _, formData) { + await this.document.update(formData.object); + this.render(); + } +} diff --git a/module/applications/sheets/items/weapon.mjs b/module/applications/sheets/items/weapon.mjs new file mode 100644 index 00000000..e12564df --- /dev/null +++ b/module/applications/sheets/items/weapon.mjs @@ -0,0 +1,58 @@ +import DaggerheartSheet from '../daggerheart-sheet.mjs'; + +const { ItemSheetV2 } = foundry.applications.sheets; +export default class WeaponSheet extends DaggerheartSheet(ItemSheetV2) { + static DEFAULT_OPTIONS = { + tag: 'form', + classes: ['daggerheart', 'sheet', 'dh-style', 'weapon'], + position: { width: 600 }, + form: { + handler: this.updateForm, + submitOnChange: true, + closeOnSubmit: false + } + }; + + static PARTS = { + header: { template: 'systems/daggerheart/templates/sheets/items/weapon/header.hbs' }, + tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' }, + description: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-description.hbs' }, + settings: { + template: 'systems/daggerheart/templates/sheets/items/weapon/settings.hbs', + scrollable: ['.settings'] + } + }; + + static TABS = { + description: { + active: true, + cssClass: '', + group: 'primary', + id: 'description', + icon: null, + label: 'DAGGERHEART.Sheets.Feature.Tabs.Description' + }, + settings: { + active: false, + cssClass: '', + group: 'primary', + id: 'settings', + icon: null, + label: 'DAGGERHEART.Sheets.Feature.Tabs.Settings' + } + }; + + async _prepareContext(_options) { + const context = await super._prepareContext(_options); + context.document = this.document; + context.config = CONFIG.daggerheart; + context.tabs = super._getTabs(this.constructor.TABS); + + return context; + } + + static async updateForm(event, _, formData) { + await this.document.update(formData.object); + this.render(); + } +} diff --git a/module/applications/sheets/pc.mjs b/module/applications/sheets/pc.mjs index fba2d335..466e8b40 100644 --- a/module/applications/sheets/pc.mjs +++ b/module/applications/sheets/pc.mjs @@ -489,7 +489,7 @@ export default class PCSheet extends DaggerheartSheet(ActorSheetV2) { static async rollAttribute(event, button) { const { roll, hope, fear, advantage, disadvantage, modifiers } = await this.document.dualityRoll( - { title: 'Attribute Bonus', value: button.dataset.value }, + { title: game.i18n.localize(abilities[button.dataset.attribute].label), value: button.dataset.value }, event.shiftKey ); diff --git a/module/applications/sheets/weapon.mjs b/module/applications/sheets/weapon.mjs deleted file mode 100644 index af979c2b..00000000 --- a/module/applications/sheets/weapon.mjs +++ /dev/null @@ -1,63 +0,0 @@ -// import DhpApplicationMixin from '../daggerheart-sheet.mjs'; - -// export default class WeaponSheet extends DhpApplicationMixin(ItemSheet) { -// static documentType = "weapon"; - -// /** @override */ -// static get defaultOptions() { -// return foundry.utils.mergeObject(super.defaultOptions, { -// classes: ["daggerheart", "sheet", "weapon"], -// width: 400, -// height: 'auto', -// }); -// } - -// /** @override */ -// getData() { -// const context = super.getData(); -// context.config = CONFIG.daggerheart; - -// return context; -// } - -// async _handleAction(action, event, button) { -// switch(action){ -// } -// } -// } - -import DaggerheartSheet from './daggerheart-sheet.mjs'; - -const { ItemSheetV2 } = foundry.applications.sheets; -export default class WeaponSheet extends DaggerheartSheet(ItemSheetV2) { - static DEFAULT_OPTIONS = { - tag: 'form', - classes: ['daggerheart', 'sheet', 'weapon'], - position: { width: 400 }, - form: { - handler: this.updateForm, - submitOnChange: true, - closeOnSubmit: false - } - }; - - static PARTS = { - form: { - id: 'feature', - template: 'systems/daggerheart/templates/sheets/weapon.hbs' - } - }; - - async _prepareContext(_options) { - const context = await super._prepareContext(_options); - context.document = this.document; - context.config = CONFIG.daggerheart; - - return context; - } - - static async updateForm(event, _, formData) { - await this.document.update(formData.object); - this.render(); - } -} diff --git a/module/config/actorConfig.mjs b/module/config/actorConfig.mjs index d9fd44f1..4db5ca9c 100644 --- a/module/config/actorConfig.mjs +++ b/module/config/actorConfig.mjs @@ -1,77 +1,77 @@ export const abilities = { agility: { - label: 'DAGGERHEART.Abilities.Agility.Name', + label: 'DAGGERHEART.Abilities.agility.name', verbs: [ - 'DAGGERHEART.Abilities.Agility.Verb.Sprint', - 'DAGGERHEART.Abilities.Agility.Verb.Leap', - 'DAGGERHEART.Abilities.Agility.Verb.Maneuver' + 'DAGGERHEART.Abilities.agility.verb.sprint', + 'DAGGERHEART.Abilities.agility.verb.leap', + 'DAGGERHEART.Abilities.agility.verb.maneuver' ] }, strength: { - label: 'DAGGERHEART.Abilities.Strength.Name', + label: 'DAGGERHEART.Abilities.strength.name', verbs: [ - 'DAGGERHEART.Abilities.Strength.Verb.Lift', - 'DAGGERHEART.Abilities.Strength.Verb.Smash', - 'DAGGERHEART.Abilities.Strength.Verb.Grapple' + 'DAGGERHEART.Abilities.strength.verb.lift', + 'DAGGERHEART.Abilities.strength.verb.smash', + 'DAGGERHEART.Abilities.strength.verb.grapple' ] }, finesse: { - label: 'DAGGERHEART.Abilities.Finesse.Name', + label: 'DAGGERHEART.Abilities.finesse.name', verbs: [ - 'DAGGERHEART.Abilities.Finesse.Verb.Control', - 'DAGGERHEART.Abilities.Finesse.Verb.Hide', - 'DAGGERHEART.Abilities.Finesse.Verb.Tinker' + 'DAGGERHEART.Abilities.finesse.verb.control', + 'DAGGERHEART.Abilities.finesse.verb.hide', + 'DAGGERHEART.Abilities.finesse.verb.tinker' ] }, instinct: { - label: 'DAGGERHEART.Abilities.Instinct.Name', + label: 'DAGGERHEART.Abilities.instinct.name', verbs: [ - 'DAGGERHEART.Abilities.Instinct.Verb.Perceive', - 'DAGGERHEART.Abilities.Instinct.Verb.Sense', - 'DAGGERHEART.Abilities.Instinct.Verb.Navigate' + 'DAGGERHEART.Abilities.instinct.verb.perceive', + 'DAGGERHEART.Abilities.instinct.verb.sense', + 'DAGGERHEART.Abilities.instinct.verb.navigate' ] }, presence: { - label: 'DAGGERHEART.Abilities.Presence.Name', + label: 'DAGGERHEART.Abilities.presence.name', verbs: [ - 'DAGGERHEART.Abilities.Presence.Verb.Charm', - 'DAGGERHEART.Abilities.Presence.Verb.Perform', - 'DAGGERHEART.Abilities.Presence.Verb.Deceive' + 'DAGGERHEART.Abilities.presence.verb.charm', + 'DAGGERHEART.Abilities.presence.verb.perform', + 'DAGGERHEART.Abilities.presence.verb.deceive' ] }, knowledge: { - label: 'DAGGERHEART.Abilities.Knowledge.Name', + label: 'DAGGERHEART.Abilities.knowledge.name', verbs: [ - 'DAGGERHEART.Abilities.Knowledge.Verb.Recall', - 'DAGGERHEART.Abilities.Knowledge.Verb.Analyze', - 'DAGGERHEART.Abilities.Knowledge.Verb.Comprehend' + 'DAGGERHEART.Abilities.knowledge.verb.recall', + 'DAGGERHEART.Abilities.knowledge.verb.analyze', + 'DAGGERHEART.Abilities.knowledge.verb.comprehend' ] } }; export const featureProperties = { agility: { - name: 'DAGGERHEART.Abilities.Agility.Name', + name: 'DAGGERHEART.Abilities.agility.name', path: actor => actor.system.traits.agility.data.value }, strength: { - name: 'DAGGERHEART.Abilities.Strength.Name', + name: 'DAGGERHEART.Abilities.strength.name', path: actor => actor.system.traits.strength.data.value }, finesse: { - name: 'DAGGERHEART.Abilities.Finesse.Name', + name: 'DAGGERHEART.Abilities.finesse.name', path: actor => actor.system.traits.finesse.data.value }, instinct: { - name: 'DAGGERHEART.Abilities.Instinct.Name', + name: 'DAGGERHEART.Abilities.instinct.name', path: actor => actor.system.traits.instinct.data.value }, presence: { - name: 'DAGGERHEART.Abilities.Presence.Name', + name: 'DAGGERHEART.Abilities.presence.name', path: actor => actor.system.traits.presence.data.value }, knowledge: { - name: 'DAGGERHEART.Abilities.Knowledge.Name', + name: 'DAGGERHEART.Abilities.knowledge.name', path: actor => actor.system.traits.knowledge.data.value }, spellcastingTrait: { diff --git a/module/config/generalConfig.mjs b/module/config/generalConfig.mjs index 90c7e6e6..fb596347 100644 --- a/module/config/generalConfig.mjs +++ b/module/config/generalConfig.mjs @@ -1,27 +1,27 @@ export const range = { melee: { - label: 'DAGGERHEART.Range.Melee.Name', - description: 'DAGGERHEART.Range.Melee.Description', + label: 'DAGGERHEART.Range.melee.name', + description: 'DAGGERHEART.Range.melee.description', distance: 1 }, veryClose: { - label: 'DAGGERHEART.Range.VeryClose.Name', - description: 'DAGGERHEART.Range.VeryClose.Description', + label: 'DAGGERHEART.Range.veryClose.name', + description: 'DAGGERHEART.Range.veryClose.description', distance: 3 }, close: { - label: 'DAGGERHEART.Range.Close.Name', - description: 'DAGGERHEART.Range.Close.Description', + label: 'DAGGERHEART.Range.close.name', + description: 'DAGGERHEART.Range.close.description', distance: 10 }, far: { - label: 'DAGGERHEART.Range.Far.Name', - description: 'DAGGERHEART.Range.Far.Description', + label: 'DAGGERHEART.Range.far.name', + description: 'DAGGERHEART.Range.far.description', distance: 20 }, veryFar: { - label: 'DAGGERHEART.Range.VeryFar.Name', - description: 'DAGGERHEART.Range.VeryFar.Description', + label: 'DAGGERHEART.Range.veryFar.name', + description: 'DAGGERHEART.Range.veryFar.description', distance: 30 } }; @@ -29,24 +29,24 @@ export const range = { export const burden = { oneHanded: { value: 'oneHanded', - label: 'DAGGERHEART.Burden.OneHanded' + label: 'DAGGERHEART.Burden.oneHanded' }, twoHanded: { value: 'twoHanded', - label: 'DAGGERHEART.Burden.TwoHanded' + label: 'DAGGERHEART.Burden.twoHanded' } }; export const damageTypes = { physical: { id: 'physical', - label: 'DAGGERHEART.DamageType.Physical.Name', - abbreviation: 'DAGGERHEART.DamageType.Physical.Abbreviation' + label: 'DAGGERHEART.DamageType.physical.name', + abbreviation: 'DAGGERHEART.DamageType.physical.abbreviation' }, magical: { id: 'magical', - label: 'DAGGERHEART.DamageType.Magical.Name', - abbreviation: 'DAGGERHEART.DamageType.Magical.Abbreviation' + label: 'DAGGERHEART.DamageType.magical.name', + abbreviation: 'DAGGERHEART.DamageType.magical.abbreviation' } }; @@ -247,6 +247,45 @@ export const diceTypes = { d20: 'd20' }; +export const getDiceSoNicePresets = () => { + const { diceSoNice } = game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance); + + return { + hope: { + ...diceSoNice.hope, + colorset: 'inspired', + texture: 'bloodmoon', + material: 'metal', + font: 'Arial Black', + system: 'standard' + }, + fear: { + ...diceSoNice.fear, + colorset: 'bloodmoon', + texture: 'bloodmoon', + material: 'metal', + font: 'Arial Black', + system: 'standard' + }, + advantage: { + ...diceSoNice.advantage, + colorset: 'bloodmoon', + texture: 'bloodmoon', + material: 'metal', + font: 'Arial Black', + system: 'standard' + }, + disadvantage: { + ...diceSoNice.disadvantage, + colorset: 'bloodmoon', + texture: 'bloodmoon', + material: 'metal', + font: 'Arial Black', + system: 'standard' + } + }; +}; + export const refreshTypes = { session: { id: 'session', diff --git a/module/config/settingsConfig.mjs b/module/config/settingsConfig.mjs index 311ab935..15049d2b 100644 --- a/module/config/settingsConfig.mjs +++ b/module/config/settingsConfig.mjs @@ -26,7 +26,8 @@ export const gameSettings = { RangeMeasurement: 'RangeMeasurement' }, DualityRollColor: 'DualityRollColor', - LevelTiers: 'LevelTiers' + LevelTiers: 'LevelTiers', + appearance: 'Appearance' }; export const DualityRollColor = { diff --git a/module/data/armor.mjs b/module/data/armor.mjs index dc6cda19..ee4f4a4b 100644 --- a/module/data/armor.mjs +++ b/module/data/armor.mjs @@ -3,7 +3,7 @@ export default class DhpArmor extends foundry.abstract.TypeDataModel { const fields = foundry.data.fields; return { equipped: new fields.BooleanField({ initial: false }), - baseScore: new fields.NumberField({ initial: 1, integer: true }), + baseScore: new fields.NumberField({ integer: true, initial: 0 }), feature: new fields.StringField({ choices: SYSTEM.ITEM.armorFeatures, integer: false, @@ -14,10 +14,10 @@ export default class DhpArmor extends foundry.abstract.TypeDataModel { value: new fields.NumberField({ initial: 0, integer: true }) }), baseThresholds: new fields.SchemaField({ - major: new fields.NumberField({ initial: 0, integer: true }), - severe: new fields.NumberField({ initial: 0, integer: true }) + major: new fields.NumberField({ integer: true, initial: 0 }), + severe: new fields.NumberField({ integer: true, initial: 0 }) }), - quantity: new fields.NumberField({ initial: 1, integer: true }), + quantity: new fields.NumberField({ integer: true, initial: 1 }), description: new fields.HTMLField({}) }; } diff --git a/module/data/dualityRoll.mjs b/module/data/dualityRoll.mjs index 50909a46..1c37f5e6 100644 --- a/module/data/dualityRoll.mjs +++ b/module/data/dualityRoll.mjs @@ -1,4 +1,4 @@ -import { DualityRollColor } from '../config/settingsConfig.mjs'; +import { DualityRollColor } from './settings/Appearance.mjs'; const fields = foundry.data.fields; const diceField = () => @@ -81,7 +81,7 @@ export default class DhpDualityRoll extends foundry.abstract.TypeDataModel { const total = this.modifiers.reduce((acc, x) => acc + x.value, 0); return { value: total, - label: total > 0 ? `+${total}` : total < 0 ? `-${total}` : '' + label: total > 0 ? `+${total}` : total < 0 ? `${total}` : '' }; } @@ -106,7 +106,7 @@ export default class DhpDualityRoll extends foundry.abstract.TypeDataModel { get colorful() { return ( - game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.DualityRollColor) === + game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).dualityColorScheme === DualityRollColor.colorful.value ); } diff --git a/module/data/settings/Appearance.mjs b/module/data/settings/Appearance.mjs new file mode 100644 index 00000000..fdbd925c --- /dev/null +++ b/module/data/settings/Appearance.mjs @@ -0,0 +1,51 @@ +export default class DhAppearance extends foundry.abstract.DataModel { + static defineSchema() { + const fields = foundry.data.fields; + return { + dualityColorScheme: new fields.StringField({ + required: true, + choices: DualityRollColor, + initial: DualityRollColor.normal.value + }), + diceSoNice: new fields.SchemaField({ + hope: new fields.SchemaField({ + foreground: new fields.ColorField({ required: true, initial: '#ffffff' }), + background: new fields.ColorField({ required: true, initial: '#ffe760' }), + outline: new fields.ColorField({ required: true, initial: '#000000' }), + edge: new fields.ColorField({ required: true, initial: '#ffffff' }) + }), + fear: new fields.SchemaField({ + foreground: new fields.ColorField({ required: true, initial: '#000000' }), + background: new fields.ColorField({ required: true, initial: '#0032b1' }), + outline: new fields.ColorField({ required: true, initial: '#ffffff' }), + edge: new fields.ColorField({ required: true, initial: '#000000' }) + }), + advantage: new fields.SchemaField({ + foreground: new fields.ColorField({ required: true, initial: '#ffffff' }), + background: new fields.ColorField({ required: true, initial: '#008000' }), + outline: new fields.ColorField({ required: true, initial: '#000000' }), + edge: new fields.ColorField({ required: true, initial: '#ffffff' }) + }), + disadvantage: new fields.SchemaField({ + foreground: new fields.ColorField({ required: true, initial: '#000000' }), + background: new fields.ColorField({ required: true, initial: '#b30000' }), + outline: new fields.ColorField({ required: true, initial: '#ffffff' }), + edge: new fields.ColorField({ required: true, initial: '#000000' }) + }) + }) + }; + } + + static defaultSchema = {}; +} + +export const DualityRollColor = { + colorful: { + value: 'colorful', + label: 'DAGGERHEART.Settings.DualityRollColor.Options.Colorful' + }, + normal: { + value: 'normal', + label: 'DAGGERHEART.Settings.DualityRollColor.Options.Normal' + } +}; diff --git a/module/data/weapon.mjs b/module/data/weapon.mjs index 263a4fb4..a0ef07b2 100644 --- a/module/data/weapon.mjs +++ b/module/data/weapon.mjs @@ -5,13 +5,17 @@ export default class DhpWeapon extends foundry.abstract.TypeDataModel { equipped: new fields.BooleanField({ initial: false }), inventoryWeapon: new fields.NumberField({ initial: null, nullable: true, integer: true }), secondary: new fields.BooleanField({ initial: false }), - trait: new fields.StringField({ choices: SYSTEM.ACTOR.abilities, integer: false }), - range: new fields.StringField({ choices: SYSTEM.GENERAL.range, integer: false }), + trait: new fields.StringField({ choices: SYSTEM.ACTOR.abilities, integer: false, initial: 'agility' }), + range: new fields.StringField({ choices: SYSTEM.GENERAL.range, integer: false, initial: 'melee' }), damage: new fields.SchemaField({ - value: new fields.StringField({}), - type: new fields.StringField({ choices: SYSTEM.GENERAL.damageTypes, integer: false }) + value: new fields.StringField({ initial: 'd6' }), + type: new fields.StringField({ + choices: SYSTEM.GENERAL.damageTypes, + integer: false, + initial: 'physical' + }) }), - burden: new fields.StringField({ choices: SYSTEM.GENERAL.burden, integer: false }), + burden: new fields.StringField({ choices: SYSTEM.GENERAL.burden, integer: false, initial: 'oneHanded' }), feature: new fields.StringField({ choices: SYSTEM.ITEM.weaponFeatures, integer: false, blank: true }), quantity: new fields.NumberField({ initial: 1, integer: true }), description: new fields.HTMLField({}) diff --git a/module/documents/actor.mjs b/module/documents/actor.mjs index 23d27582..d4dc433e 100644 --- a/module/documents/actor.mjs +++ b/module/documents/actor.mjs @@ -2,6 +2,7 @@ import DamageSelectionDialog from '../applications/damageSelectionDialog.mjs'; import NpcRollSelectionDialog from '../applications/npcRollSelectionDialog.mjs'; import RollSelectionDialog from '../applications/rollSelectionDialog.mjs'; import { GMUpdateEvent, socketEvent } from '../helpers/socket.mjs'; +import { setDiceSoNiceForDualityRoll } from '../helpers/utils.mjs'; export default class DhpActor extends Actor { _preCreate(data, changes, user) { @@ -116,16 +117,19 @@ export default class DhpActor extends Actor { disadvantageDice = null, bonusDamageString = ''; - const modifiers = [ - { - value: modifier.value ? Number.parseInt(modifier.value) : 0, - label: - modifier.value >= 0 - ? `${modifier.title} +${modifier.value}` - : `${modifier.title} -${modifier.value}`, - title: modifier.title - } - ]; + const modifiers = + modifier.value !== null + ? [ + { + value: modifier.value ? Number.parseInt(modifier.value) : 0, + label: + modifier.value >= 0 + ? `${modifier.title} +${modifier.value}` + : `${modifier.title} ${modifier.value}`, + title: modifier.title + } + ] + : []; if (!shiftKey) { const dialogClosed = new Promise((resolve, _) => { new RollSelectionDialog( @@ -161,53 +165,7 @@ export default class DhpActor extends Actor { `1${hopeDice} + 1${fearDice}${advantageDice ? ` + 1${advantageDice}` : disadvantageDice ? ` - 1${disadvantageDice}` : ''} ${modifiers.map(x => `+ ${x.value}`).join(' ')}` ); let rollResult = await roll.evaluate(); - rollResult.dice[0].options.appearance = { - colorset: 'inspired', - foreground: '#FFFFFF', - background: '#008080', - outline: '#000000', - edge: '#806400', - texture: 'bloodmoon', - material: 'metal', - font: 'Arial Black', - system: 'standard' - }; - if (advantageDice || disadvantageDice) { - rollResult.dice[1].options.appearance = { - colorset: 'inspired', - foreground: disadvantageDice ? '#b30000' : '#FFFFFF', - background: '#008080', - outline: disadvantageDice ? '#000000' : '#000000', - edge: '#806400', - texture: 'bloodmoon', - material: 'metal', - font: 'Arial Black', - system: 'standard' - }; - rollResult.dice[2].options.appearance = { - colorset: 'bloodmoon', - foreground: '#000000', - background: '#430070', - outline: '#b30000', - edge: '#000000', - texture: 'bloodmoon', - material: 'metal', - font: 'Arial Black', - system: 'standard' - }; - } else { - rollResult.dice[1].options.appearance = { - colorset: 'bloodmoon', - foreground: '#000000', - background: '#430070', - outline: '#b30000', - edge: '#000000', - texture: 'bloodmoon', - material: 'metal', - font: 'Arial Black', - system: 'standard' - }; - } + setDiceSoNiceForDualityRoll(rollResult, advantageDice, disadvantageDice); const hope = rollResult.dice[0].results[0].result; const fear = rollResult.dice[1].results[0].result; diff --git a/module/helpers/utils.mjs b/module/helpers/utils.mjs index 1c09970f..7a58a1f2 100644 --- a/module/helpers/utils.mjs +++ b/module/helpers/utils.mjs @@ -1,3 +1,5 @@ +import { diceSoNicePresets, getDiceSoNicePresets } from '../config/generalConfig.mjs'; + export const loadCompendiumOptions = async compendiums => { const compendiumValues = []; @@ -118,3 +120,14 @@ export const getCommandTarget = () => { return target; }; + +export const setDiceSoNiceForDualityRoll = (rollResult, advantage, disadvantage) => { + const diceSoNicePresets = getDiceSoNicePresets(); + rollResult.dice[0].options.appearance = diceSoNicePresets.hope; + rollResult.dice[1].options.appearance = diceSoNicePresets.fear; + if (advantage) { + rollResult.dice[2].options.appearance = diceSoNicePresets.advantage; + } else if (disadvantage) { + rollResult.dice[2].options.appearance = diceSoNicePresets.disadvantage; + } +}; diff --git a/styles/chat.less b/styles/chat.less index f54de5d2..e6bb20c2 100644 --- a/styles/chat.less +++ b/styles/chat.less @@ -21,15 +21,6 @@ align-items: end; justify-content: space-between; padding: 0 8px; - - .duality-result-value { - border: 1px solid var(--color-dark-5); - padding: 2px; - font-weight: bold; - background: var(--color-dark-1); - margin-bottom: 4px; - font-size: 16px; - } } .duality-modifiers { @@ -211,7 +202,7 @@ text-shadow: 0 0 1px black; font-weight: bold; background: var(--color-dark-1); - padding: 4px; + padding: 4px 4px 0 4px; border-radius: 6px 0 0 0; } @@ -506,6 +497,15 @@ margin-top: 5px; } } + + .dice-actions { + margin-top: 5px; + display: flex; + + button { + flex: 1; + } + } } &.domain-card { diff --git a/styles/daggerheart.css b/styles/daggerheart.css index 01387025..ba499816 100755 --- a/styles/daggerheart.css +++ b/styles/daggerheart.css @@ -1369,14 +1369,6 @@ justify-content: space-between; padding: 0 8px; } -.chat-message.duality .duality-data .duality-title .duality-result-value { - border: 1px solid var(--color-dark-5); - padding: 2px; - font-weight: bold; - background: var(--color-dark-1); - margin-bottom: 4px; - font-size: 16px; -} .chat-message.duality .duality-data .duality-modifiers { display: flex; gap: 2px; @@ -1504,7 +1496,7 @@ text-shadow: 0 0 1px black; font-weight: bold; background: var(--color-dark-1); - padding: 4px; + padding: 4px 4px 0 4px; border-radius: 6px 0 0 0; } .chat-message.duality .duality-actions { @@ -1736,6 +1728,13 @@ .daggerheart.chat.roll .dice-result .damage-button { margin-top: 5px; } +.daggerheart.chat.roll .dice-actions { + margin-top: 5px; + display: flex; +} +.daggerheart.chat.roll .dice-actions button { + flex: 1; +} .daggerheart.chat.domain-card { display: flex; flex-direction: column; @@ -3117,6 +3116,11 @@ div.daggerheart.views.multiclass { align-items: center; gap: 5px; } +.application.sheet.dh-style fieldset .form-group label { + font-family: 'Montserrat', sans-serif; + font-weight: bold; + font-size: smaller; +} .application.sheet.dh-style line-div { display: block; height: 1px; @@ -3136,6 +3140,39 @@ div.daggerheart.views.multiclass { transform: translateY(-20px); transform-origin: top; } +.application.setting.dh-style fieldset h2, +.application.setting.dh-style fieldset h3, +.application.setting.dh-style fieldset h4 { + margin: 8px 0 4px; + text-align: center; +} +.application.setting.dh-style fieldset .title-hint { + font-size: 12px; + font-variant: small-caps; + text-align: center; +} +.application.setting.dh-style fieldset .field-section .split-section { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 10px; +} +.application.setting.dh-style fieldset .label-container { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 10px; +} +.application.setting.dh-style fieldset .label-container label { + align-self: center; + text-align: center; +} +.application.setting.dh-style footer { + margin-top: 8px; + display: flex; + gap: 8px; +} +.application.setting.dh-style footer button { + flex: 1; +} .sheet.daggerheart.dh-style .tab-navigation { margin: 5px 0; height: 40px; @@ -3186,6 +3223,7 @@ div.daggerheart.views.multiclass { } .application.sheet.daggerheart.dh-style .item-sheet-header .item-info .item-description { display: flex; + flex-direction: column; gap: 10px; } .application.sheet.daggerheart.dh-style .item-sheet-header .item-info h3 { diff --git a/styles/less/global/elements.less b/styles/less/global/elements.less index 1ebfcb44..9001e65e 100755 --- a/styles/less/global/elements.less +++ b/styles/less/global/elements.less @@ -1,161 +1,214 @@ -@import '../utils/colors.less'; -@import '../utils/fonts.less'; - -.application.sheet.dh-style { - border: 1px solid light-dark(@dark-blue, @golden); - - input[type='text'], - input[type='number'] { - background: light-dark(transparent, transparent); - border-radius: 6px; - box-shadow: 0 4px 30px @soft-shadow; - backdrop-filter: blur(9.5px); - -webkit-backdrop-filter: blur(9.5px); - outline: none; - color: light-dark(@dark-blue, @golden); - border: 1px solid light-dark(@dark, @beige); - - &:hover[type='text'], - &:hover[type='number'], - &:focus[type='text'], - &:focus[type='number'] { - background: light-dark(@soft-shadow, @semi-transparent-dark-blue); - box-shadow: none; - outline: 2px solid light-dark(@dark, @beige); - } - } - - input[type='checkbox'] { - &:checked::after { - color: light-dark(@dark, @golden); - } - &:checked::before { - color: light-dark(transparent, @dark-blue); - } - &::before { - color: light-dark(@dark, @beige); - } - } - - button { - background: light-dark(transparent, @golden); - border: 1px solid light-dark(@dark-blue, @dark-blue); - color: light-dark(@dark-blue, @dark-blue); - outline: none; - box-shadow: none; - - &:hover { - background: light-dark(@light-black, @dark-blue); - color: light-dark(@dark-blue, @golden); - } - } - - select { - background: light-dark(transparent, transparent); - color: light-dark(@dark, @beige); - font-family: @font-body; - outline: 2px solid transparent; - border: 1px solid light-dark(@dark, @beige); - - &:focus, - &:hover { - outline: 2px solid light-dark(@dark, @beige); - box-shadow: none; - } - - & option { - color: @beige; - background-color: @dark-blue; - border-radius: 6px; - } - } - - p { - margin: 0; - } - - ul { - margin: 0; - padding: 0; - list-style: none; - } - - li { - margin: 0; - } - - fieldset { - align-items: center; - margin-top: 5px; - border-radius: 6px; - border-color: light-dark(@dark-blue, @golden); - - &.one-column { - display: flex; - flex-direction: column; - align-items: start; - gap: 10px; - min-height: 64px; - } - - &.two-columns { - display: grid; - grid-template-columns: 1fr 2fr; - gap: 10px; - } - - legend { - font-family: @font-body; - font-weight: bold; - color: light-dark(@dark-blue, @golden); - - a { - text-shadow: none; - } - } - - input[type='text'], - input[type='number'] { - color: light-dark(@dark, @beige); - font-family: @font-body; - transition: all 0.3s ease; - outline: 2px solid transparent; - - &:focus, - &:hover { - outline: 2px solid light-dark(@dark, @beige); - } - } - - .nest-inputs { - display: flex; - align-items: center; - gap: 5px; - } - } - - line-div { - display: block; - height: 1px; - width: 100%; - border-bottom: 1px solid light-dark(@dark-blue, @golden); - mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); - } - - .item-description { - opacity: 1; - transform: translateY(0); - - transition: - opacity 0.3s ease-out, - transform 0.3s ease-out; - } - - .item-description.invisible { - height: 0; - opacity: 0; - overflow: hidden; - transform: translateY(-20px); - transform-origin: top; - } -} +@import '../utils/colors.less'; +@import '../utils/fonts.less'; + +.application.sheet.dh-style { + border: 1px solid light-dark(@dark-blue, @golden); + + input[type='text'], + input[type='number'] { + background: light-dark(transparent, transparent); + border-radius: 6px; + box-shadow: 0 4px 30px @soft-shadow; + backdrop-filter: blur(9.5px); + -webkit-backdrop-filter: blur(9.5px); + outline: none; + color: light-dark(@dark-blue, @golden); + border: 1px solid light-dark(@dark, @beige); + + &:hover[type='text'], + &:hover[type='number'], + &:focus[type='text'], + &:focus[type='number'] { + background: light-dark(@soft-shadow, @semi-transparent-dark-blue); + box-shadow: none; + outline: 2px solid light-dark(@dark, @beige); + } + } + + input[type='checkbox'] { + &:checked::after { + color: light-dark(@dark, @golden); + } + &:checked::before { + color: light-dark(transparent, @dark-blue); + } + &::before { + color: light-dark(@dark, @beige); + } + } + + button { + background: light-dark(transparent, @golden); + border: 1px solid light-dark(@dark-blue, @dark-blue); + color: light-dark(@dark-blue, @dark-blue); + outline: none; + box-shadow: none; + + &:hover { + background: light-dark(@light-black, @dark-blue); + color: light-dark(@dark-blue, @golden); + } + } + + select { + background: light-dark(transparent, transparent); + color: light-dark(@dark, @beige); + font-family: @font-body; + outline: 2px solid transparent; + border: 1px solid light-dark(@dark, @beige); + + &:focus, + &:hover { + outline: 2px solid light-dark(@dark, @beige); + box-shadow: none; + } + + & option { + color: @beige; + background-color: @dark-blue; + border-radius: 6px; + } + } + + p { + margin: 0; + } + + ul { + margin: 0; + padding: 0; + list-style: none; + } + + li { + margin: 0; + } + + fieldset { + align-items: center; + margin-top: 5px; + border-radius: 6px; + border-color: light-dark(@dark-blue, @golden); + + &.one-column { + display: flex; + flex-direction: column; + align-items: start; + gap: 10px; + min-height: 64px; + } + + &.two-columns { + display: grid; + grid-template-columns: 1fr 2fr; + gap: 10px; + } + + legend { + font-family: @font-body; + font-weight: bold; + color: light-dark(@dark-blue, @golden); + + a { + text-shadow: none; + } + } + + input[type='text'], + input[type='number'] { + color: light-dark(@dark, @beige); + font-family: @font-body; + transition: all 0.3s ease; + outline: 2px solid transparent; + + &:focus, + &:hover { + outline: 2px solid light-dark(@dark, @beige); + } + } + + .nest-inputs { + display: flex; + align-items: center; + gap: 5px; + } + + .form-group { + label { + font-family: @font-body; + font-weight: bold; + font-size: smaller; + } + } + } + + line-div { + display: block; + height: 1px; + width: 100%; + border-bottom: 1px solid light-dark(@dark-blue, @golden); + mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); + } + + .item-description { + opacity: 1; + transform: translateY(0); + + transition: + opacity 0.3s ease-out, + transform 0.3s ease-out; + } + + .item-description.invisible { + height: 0; + opacity: 0; + overflow: hidden; + transform: translateY(-20px); + transform-origin: top; + } +} + +.application.setting.dh-style { + fieldset { + h2, + h3, + h4 { + margin: 8px 0 4px; + text-align: center; + } + .title-hint { + font-size: 12px; + font-variant: small-caps; + text-align: center; + } + + .field-section { + .split-section { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 10px; + } + } + + .label-container { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 10px; + + label { + align-self: center; + text-align: center; + } + } + } + + footer { + margin-top: 8px; + display: flex; + gap: 8px; + + button { + flex: 1; + } + } +} diff --git a/styles/less/global/item-header.less b/styles/less/global/item-header.less index e34bc30f..1c92e11c 100755 --- a/styles/less/global/item-header.less +++ b/styles/less/global/item-header.less @@ -1,52 +1,53 @@ -@import '../utils/colors.less'; - -.application.sheet.daggerheart.dh-style { - .item-sheet-header { - display: flex; - - .profile { - height: 150px; - width: 150px; - object-fit: cover; - border-right: 1px solid light-dark(@dark-blue, @golden); - border-bottom: 1px solid light-dark(@dark-blue, @golden); - box-sizing: border-box; - cursor: pointer; - } - - .item-info { - display: flex; - flex-direction: column; - align-items: center; - gap: 5px; - margin-top: 36px; - text-align: center; - width: 80%; - - .item-name input[type='text'] { - font-size: 32px; - height: 42px; - text-align: center; - width: 90%; - transition: all 0.3s ease; - outline: 2px solid transparent; - border: 1px solid transparent; - - &:hover[type='text'], - &:focus[type='text'] { - box-shadow: none; - outline: 2px solid light-dark(@dark-blue, @golden); - } - } - - .item-description { - display: flex; - gap: 10px; - } - - h3 { - font-size: 1rem; - } - } - } -} +@import '../utils/colors.less'; + +.application.sheet.daggerheart.dh-style { + .item-sheet-header { + display: flex; + + .profile { + height: 150px; + width: 150px; + object-fit: cover; + border-right: 1px solid light-dark(@dark-blue, @golden); + border-bottom: 1px solid light-dark(@dark-blue, @golden); + box-sizing: border-box; + cursor: pointer; + } + + .item-info { + display: flex; + flex-direction: column; + align-items: center; + gap: 5px; + margin-top: 36px; + text-align: center; + width: 80%; + + .item-name input[type='text'] { + font-size: 32px; + height: 42px; + text-align: center; + width: 90%; + transition: all 0.3s ease; + outline: 2px solid transparent; + border: 1px solid transparent; + + &:hover[type='text'], + &:focus[type='text'] { + box-shadow: none; + outline: 2px solid light-dark(@dark-blue, @golden); + } + } + + .item-description { + display: flex; + flex-direction: column; + gap: 10px; + } + + h3 { + font-size: 1rem; + } + } + } +} diff --git a/templates/chat/attack-roll.hbs b/templates/chat/attack-roll.hbs index 3daf7485..ccc93087 100644 --- a/templates/chat/attack-roll.hbs +++ b/templates/chat/attack-roll.hbs @@ -1,9 +1,8 @@ -
- {{#if this.colorful}} +{{#if this.colorful}} +
{{localize "DAGGERHEART.Chat.AttackRoll.Title" attack=this.title}}
-
{{this.total}}
{{#each this.modifiers}} @@ -62,7 +61,7 @@
{{#if (not this.damage.value)}}
-
{{#if (eq dualityResult 1)}}With Hope{{else}}{{#if (eq dualityResult 2)}}With Fear{{else}}Critical Success{{/if}}{{/if}}
+
{{this.total}} {{#if (eq dualityResult 1)}}With Hope{{else}}{{#if (eq dualityResult 2)}}With Fear{{else}}Critical Success{{/if}}{{/if}}
{{/if}}
@@ -83,90 +82,90 @@
-
{{#if (eq dualityResult 1)}}With Hope{{else}}{{#if (eq dualityResult 2)}}With Fear{{else}}Critical Success{{/if}}{{/if}}
+
{{this.total}} {{#if (eq dualityResult 1)}}With Hope{{else}}{{#if (eq dualityResult 2)}}With Fear{{else}}Critical Success{{/if}}{{/if}}
{{/if}} - {{else}} -
-
{{localize "DAGGERHEART.Chat.AttackRoll.Title" attack=this.title}}
-
-
{{roll}}
+
+{{else}} +
+
{{localize "DAGGERHEART.Chat.AttackRoll.Title" attack=this.title}}
+
+
{{roll}}
-
-
-
+
+
+
+
+
+ + 1{{hope.dice}} + | + 1{{fear.dice}} + + {{this.diceTotal}} +
+
+
    +
  1. {{hope.value}}
  2. +
  3. {{fear.value}}
  4. +
+
+
+ {{#if advantage.value}}
- 1{{hope.dice}} - | - 1{{fear.dice}} + 1{{advantage.dice}} - {{this.diceTotal}} + {{advantage.value}}
-
    -
  1. {{hope.value}}
  2. -
  3. {{fear.value}}
  4. +
      +
    1. {{advantage.value}}
- {{#if advantage.value}} -
-
- - 1{{advantage.dice}} - - {{advantage.value}} -
-
-
    -
  1. {{advantage.value}}
  2. -
-
-
- {{/if}} - {{#if disadvantage.value}} -
-
- - 1{{disadvantage.dice}} - - {{disadvantage.value}} -
-
-
    -
  1. {{disadvantage.value}}
  2. -
-
-
- {{/if}} -
-
-
-
-
{{totalLabel}}
-
- {{this.total}} -
-
- {{#if (gt targets.length 0)}} -
- {{#each targets as |target|}} -
- -
- {{#if target.hit}}{{localize "Hit"}}{{else}}{{#if (not ../total.alternate)}}{{localize "Miss"}}{{else}}?{{/if}}{{/if}} -
+ {{/if}} + {{#if disadvantage.value}} +
+
+ + 1{{disadvantage.dice}} + + {{disadvantage.value}} +
+
+
    +
  1. {{disadvantage.value}}
  2. +
+
- {{/each}} -
- {{/if}} -
- + {{/if}} +
+
+
{{totalLabel}}
+
+ {{this.total}} +
+
+ {{#if (gt targets.length 0)}} +
+ {{#each targets as |target|}} +
+ +
+ {{#if target.hit}}{{localize "Hit"}}{{else}}{{#if (not ../total.alternate)}}{{localize "Miss"}}{{else}}?{{/if}}{{/if}} +
+
+ {{/each}} +
+ {{/if}} +
+ +
- {{/if}} -
\ No newline at end of file +
+{{/if}} \ No newline at end of file diff --git a/templates/chat/duality-roll.hbs b/templates/chat/duality-roll.hbs index 1e906196..047e88e7 100644 --- a/templates/chat/duality-roll.hbs +++ b/templates/chat/duality-roll.hbs @@ -1,9 +1,8 @@ -
- {{#if this.colorful}} +{{#if this.colorful}} +
{{this.title}}
-
{{this.total}}
{{#each this.modifiers}} @@ -62,7 +61,7 @@
{{#if (not this.damage.value)}}
-
{{#if (eq dualityResult 1)}}With Hope{{else}}{{#if (eq dualityResult 2)}}With Fear{{else}}Critical Success{{/if}}{{/if}}
+
{{this.total}} {{#if (eq dualityResult 1)}}With Hope{{else}}{{#if (eq dualityResult 2)}}With Fear{{else}}Critical Success{{/if}}{{/if}}
{{/if}}
@@ -75,7 +74,9 @@
{{/if}} - {{else}} +
+{{else}} +
{{this.title}}
{{roll}}
@@ -138,5 +139,5 @@
- {{/if}} - \ No newline at end of file + +{{/if}} diff --git a/templates/settings/appearance-settings.hbs b/templates/settings/appearance-settings.hbs new file mode 100644 index 00000000..e0a16235 --- /dev/null +++ b/templates/settings/appearance-settings.hbs @@ -0,0 +1,119 @@ +
+
+ {{localize "DAGGERHEART.Settings.Menu.Appearance.duality"}} + + {{formInput settingFields.schema.fields.dualityColorScheme value=settingFields._source.dualityColorScheme localize=true}} + +

{{localize "DAGGERHEART.Settings.Menu.Appearance.DiceSoNice.title"}}

+
{{localize "DAGGERHEART.Settings.Menu.Appearance.DiceSoNice.hint"}}
+ +
+ {{localize "DAGGERHEART.General.Hope"}} + +
+
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.hope.fields.foreground value=settingFields._source.diceSoNice.hope.foreground localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.hope.fields.background value=settingFields._source.diceSoNice.hope.background localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.hope.fields.outline value=settingFields._source.diceSoNice.hope.outline localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.hope.fields.edge value=settingFields._source.diceSoNice.hope.edge localize=true}} +
+
+
+
+
+ {{localize "DAGGERHEART.General.Fear"}} + +
+
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.fear.fields.foreground value=settingFields._source.diceSoNice.fear.foreground localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.fear.fields.background value=settingFields._source.diceSoNice.fear.background localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.fear.fields.outline value=settingFields._source.diceSoNice.fear.outline localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.fear.fields.edge value=settingFields._source.diceSoNice.fear.edge localize=true}} +
+
+
+
+
+ {{localize "DAGGERHEART.General.Advantage.Full"}} + +
+
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.advantage.fields.foreground value=settingFields._source.diceSoNice.advantage.foreground localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.advantage.fields.background value=settingFields._source.diceSoNice.advantage.background localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.advantage.fields.outline value=settingFields._source.diceSoNice.advantage.outline localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.advantage.fields.edge value=settingFields._source.diceSoNice.advantage.edge localize=true}} +
+
+
+
+
+ {{localize "DAGGERHEART.General.Disadvantage.Full"}} + +
+
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.disadvantage.fields.foreground value=settingFields._source.diceSoNice.disadvantage.foreground localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.disadvantage.fields.background value=settingFields._source.diceSoNice.disadvantage.background localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.disadvantage.fields.outline value=settingFields._source.diceSoNice.disadvantage.outline localize=true}} +
+
+ + {{formInput settingFields.schema.fields.diceSoNice.fields.disadvantage.fields.edge value=settingFields._source.diceSoNice.disadvantage.edge localize=true}} +
+
+
+
+
+ + +
+ \ No newline at end of file diff --git a/templates/sheets/armor.hbs b/templates/sheets/armor.hbs deleted file mode 100644 index aee89005..00000000 --- a/templates/sheets/armor.hbs +++ /dev/null @@ -1,42 +0,0 @@ -
-
-
- -
- {{formInput fields.name value=source.name rootId=partId}} -
-
-
- -
- {{formField systemFields.baseScore value=source.system.baseScore label=(localize "DAGGERHEART.Sheets.Armor.BaseScore") }} - {{formField systemFields.feature value=source.system.feature label=(localize "DAGGERHEART.Sheets.Armor.Feature") localize=true blank=""}} -
-

{{localize "DAGGERHEART.Sheets.Armor.BaseThresholds.Base"}}

- {{ formField systemFields.baseThresholds.fields.major value=source.system.baseThresholds.major label=(localize "DAGGERHEART.Sheets.Armor.BaseThresholds.Major") }}/ - {{ formField systemFields.baseThresholds.fields.severe value=source.system.baseThresholds.severe label=(localize "DAGGERHEART.Sheets.Armor.BaseThresholds.Severe") }} -
-
-

{{localize "DAGGERHEART.Sheets.Armor.Description"}}

- {{formInput systemFields.description value=source.system.description enriched=source.system.description localize=true toggled=true}} -
- {{!--
- -
- -
-
--}} - {{!--
- -
- -
-
-
-

{{localize "DAGGERHEART.Sheets.Armor.Description"}}

- {{editor item.system.description target="system.description" button=true}} -
--}} -
-
\ No newline at end of file diff --git a/templates/sheets/class.hbs b/templates/sheets/class.hbs index 99da282d..935b1019 100644 --- a/templates/sheets/class.hbs +++ b/templates/sheets/class.hbs @@ -80,13 +80,13 @@
- +
- +
diff --git a/templates/sheets/items/armor/header.hbs b/templates/sheets/items/armor/header.hbs new file mode 100644 index 00000000..c7453077 --- /dev/null +++ b/templates/sheets/items/armor/header.hbs @@ -0,0 +1,21 @@ +
+ +
+ +

+
+

+ {{localize 'TYPES.Item.armor'}} +

+

+ {{localize "DAGGERHEART.Sheets.Armor.baseScore"}}: + {{source.system.baseScore}} + - + {{localize "DAGGERHEART.Sheets.Armor.baseThresholds.base"}}: + {{source.system.baseThresholds.major}} + / + {{source.system.baseThresholds.severe}} +

+
+
+
\ No newline at end of file diff --git a/templates/sheets/items/armor/settings.hbs b/templates/sheets/items/armor/settings.hbs new file mode 100644 index 00000000..cf0fea50 --- /dev/null +++ b/templates/sheets/items/armor/settings.hbs @@ -0,0 +1,21 @@ +
+ +
+ {{localize tabs.settings.label}} + {{localize "DAGGERHEART.Sheets.Armor.baseScore"}} + {{formField systemFields.baseScore value=source.system.baseScore}} + + {{localize "DAGGERHEART.Sheets.Armor.feature"}} + {{formField systemFields.feature value=source.system.feature localize=true blank=""}} + + {{localize "DAGGERHEART.Sheets.Armor.baseThresholds.base"}} +
+ {{ formField systemFields.baseThresholds.fields.major value=source.system.baseThresholds.major label=(localize "DAGGERHEART.Sheets.Armor.baseThresholds.major") }} + {{ formField systemFields.baseThresholds.fields.severe value=source.system.baseThresholds.severe label=(localize "DAGGERHEART.Sheets.Armor.baseThresholds.severe") }} +
+
+
\ No newline at end of file diff --git a/templates/sheets/items/weapon/header.hbs b/templates/sheets/items/weapon/header.hbs new file mode 100644 index 00000000..5d33c6ae --- /dev/null +++ b/templates/sheets/items/weapon/header.hbs @@ -0,0 +1,24 @@ +
+ +
+ +

+
+ {{#if source.system.secondary}} +

{{localize "DAGGERHEART.Sheets.Weapon.SecondaryWeapon"}}

+ {{else}} +

{{localize "DAGGERHEART.Sheets.Weapon.PrimaryWeapon"}}

+ {{/if}} +

+ {{localize (concat 'DAGGERHEART.Abilities.' source.system.trait '.short')}} + - + {{localize (concat 'DAGGERHEART.Range.' source.system.range '.name')}} + - + {{source.system.damage.value}} + ({{localize (concat 'DAGGERHEART.DamageType.' source.system.damage.type '.abbreviation')}}) + - + {{localize (concat 'DAGGERHEART.Burden.' source.system.burden)}} +

+
+
+
\ No newline at end of file diff --git a/templates/sheets/items/weapon/settings.hbs b/templates/sheets/items/weapon/settings.hbs new file mode 100644 index 00000000..00d2e432 --- /dev/null +++ b/templates/sheets/items/weapon/settings.hbs @@ -0,0 +1,30 @@ +
+
+ {{localize tabs.settings.label}} + {{localize "DAGGERHEART.Sheets.Weapon.SecondaryWeapon"}} + {{formField systemFields.secondary value=source.system.secondary}} + {{localize "DAGGERHEART.Sheets.Weapon.Trait"}} + {{formField systemFields.trait value=source.system.trait localize=true}} + {{localize "DAGGERHEART.Sheets.Weapon.Range"}} + {{formField systemFields.range value=source.system.range localize=true}} + {{localize "DAGGERHEART.Sheets.Weapon.Burden"}} + {{formField systemFields.burden value=source.system.burden localize=true}} +
+ +
+ {{localize "DAGGERHEART.Sheets.Weapon.Damage.Title"}} + {{localize "DAGGERHEART.Sheets.Weapon.Damage.Value"}} + {{formGroup systemFields.damage.fields.value value=source.system.damage.value}} + {{localize "DAGGERHEART.Sheets.Weapon.Damage.Type"}} + {{formGroup systemFields.damage.fields.type value=source.system.damage.type localize=true}} +
+
+ {{localize "DAGGERHEART.Sheets.Weapon.Feature"}} + {{localize "DAGGERHEART.Sheets.Weapon.Feature"}} + {{formField systemFields.feature value=source.system.feature localize=true}} +
+
\ No newline at end of file diff --git a/templates/sheets/weapon.hbs b/templates/sheets/weapon.hbs deleted file mode 100644 index 7d5739b7..00000000 --- a/templates/sheets/weapon.hbs +++ /dev/null @@ -1,86 +0,0 @@ -
-
- {{!--
- -
-

-
-
--}} -
- -
- {{formInput fields.name value=source.name rootId=partId}} -
-
-
- -
- {{formField systemFields.secondary value=source.system.secondary label=(localize "DAGGERHEART.Sheets.Weapon.SecondaryWeapon") }} - {{formField systemFields.trait value=source.system.trait label=(localize "DAGGERHEART.Sheets.Weapon.Trait") localize=true }} - {{formField systemFields.range value=source.system.range label=(localize "DAGGERHEART.Sheets.Weapon.Range") localize=true }} -
- -
- {{formGroup systemFields.damage.fields.value value=source.system.damage.value label=(localize "DAGGERHEART.Sheets.Weapon.Damage.Value") }} - {{formGroup systemFields.damage.fields.type value=source.system.damage.type label=(localize "DAGGERHEART.Sheets.Weapon.Damage.Type") localize=true }} -
-
- {{formField systemFields.burden value=source.system.burden label=(localize "DAGGERHEART.Sheets.Weapon.Burden") localize=true }} - {{formField systemFields.feature value=source.system.feature label=(localize "DAGGERHEART.Sheets.Weapon.Feature") localize=true }} - {{!--
- -
- -
-
--}} - {{!--
- -
- -
-
--}} - {{!--
- -
- -
-
--}} - {{!--
- -
- - - - -
-
--}} - - {{!--
- -
- -
-
--}} - {{!--
- -
- -
-
--}} -
-

{{localize "DAGGERHEART.Sheets.Weapon.Description"}}

- {{formInput systemFields.description value=source.system.description enriched=source.system.description localize=true toggled=true}} - {{!-- {{editor item.system.description target="system.description" button=true}} --}} -
-
-
\ No newline at end of file diff --git a/templates/views/action.hbs b/templates/views/action.hbs index 45d91c80..0b034ea4 100644 --- a/templates/views/action.hbs +++ b/templates/views/action.hbs @@ -1,6 +1,6 @@
- {{formField fields.name value=source.name label="Name" rootId=partId}} + {{formField fields.name value=source.name label="Name" name="name" rootId=partId}}
@@ -39,16 +37,15 @@
Cost
-
-
- {{formField fields.cost.fields.type value=source.cost.type label="Cost Type" rootId=partId}} - {{formField fields.cost.fields.value value=source.cost.value label="Value" rootId=partId}} +
+ {{formField fields.cost.fields.type value=source.cost.type label="Cost Type" name="cost.type" rootId=partId}} + {{formField fields.cost.fields.value value=source.cost.value label="Value" name="cost.value" rootId=partId}}
- {{formField fields.target.fields.type value=source.target.type label="Target Type" rootId=partId}} + {{formField fields.target.fields.type value=source.target.type label="Target Type" name="target.type" rootId=partId}}
{{!--