From a72d4583cd3167c72327f762a11b51bd2b0f0879 Mon Sep 17 00:00:00 2001 From: Dapoulp <74197441+Dapoulp@users.noreply.github.com> Date: Sat, 23 Aug 2025 14:54:57 +0200 Subject: [PATCH] [PR]Add custom formula to weapon base attack (#964) * Add custom formula to weapon base attack * Remove log * Update weapon custom damage formula label + update font-size in px --- lang/en.json | 9 ++++++ module/data/fields/action/damageField.mjs | 12 ++++---- module/data/item/weapon.mjs | 4 +-- styles/less/dialog/beastform/sheet.less | 4 +-- .../selections-container.less | 20 ++++++------- .../damage-reduction-container.less | 4 +-- .../less/dialog/dice-roll/roll-selection.less | 8 ++--- .../dialog/downtime/downtime-container.less | 6 ++-- .../dialog/level-up/selections-container.less | 8 ++--- .../dialog/level-up/summary-container.less | 6 ++-- .../less/dialog/level-up/tiers-container.less | 4 +-- styles/less/dialog/reroll-dialog/sheet.less | 6 ++-- styles/less/global/chat.less | 2 +- styles/less/global/dialog.less | 2 +- styles/less/global/elements.less | 18 ++++++------ styles/less/global/inventory-item.less | 29 ++++++++++--------- styles/less/global/item-header.less | 6 ++-- styles/less/global/prose-mirror.less | 8 ++--- .../character-settings/sheet.less | 2 +- styles/less/sheets-settings/header.less | 2 +- .../less/sheets/actors/adversary/header.less | 6 ++-- .../less/sheets/actors/adversary/sidebar.less | 12 ++++---- .../less/sheets/actors/character/header.less | 16 +++++----- .../sheets/actors/character/inventory.less | 2 +- .../less/sheets/actors/character/loadout.less | 2 +- .../less/sheets/actors/character/sidebar.less | 10 +++---- .../less/sheets/actors/companion/details.less | 6 ++-- .../less/sheets/actors/companion/header.less | 6 ++-- .../sheets/actors/environment/header.less | 8 ++--- styles/less/ui/chat/ability-use.less | 4 +-- styles/less/ui/chat/action.less | 4 +-- styles/less/ui/chat/chat.less | 4 +-- styles/less/ui/chat/downtime.less | 4 +-- .../less/ui/combat-sidebar/token-actions.less | 2 +- styles/less/ui/countdown/sheet.less | 2 +- styles/less/ui/item-browser/item-browser.less | 10 +++---- .../settings/homebrew-settings/domains.less | 4 +-- styles/less/ui/settings/settings.less | 6 ++-- styles/less/utils/mixin.less | 6 ++-- styles/less/ux/autocomplete/autocomplete.less | 4 +-- styles/less/ux/tooltip/tooltip.less | 2 +- templates/sheets/items/weapon/header.hbs | 6 +++- templates/sheets/items/weapon/settings.hbs | 15 +++++++--- 43 files changed, 161 insertions(+), 140 deletions(-) diff --git a/lang/en.json b/lang/en.json index 1c614fc2..beeffd41 100755 --- a/lang/en.json +++ b/lang/en.json @@ -72,6 +72,14 @@ "exactHint": "The Character's Tier is used if empty", "label": "Beastform" }, + "damage": { + "multiplier": "Multiplier", + "flatMultiplier": "Flat Multiplier" + }, + "general": { + "customFormula": "Custom Formula", + "formula": "Formula" + }, "displayInChat": "Display in chat" }, "RollField": { @@ -1929,6 +1937,7 @@ "continue": "Continue", "criticalSuccess": "Critical Success", "criticalShort": "Critical", + "custom": "Custom", "d20Roll": "D20 Roll", "damage": "Damage", "damageRoll": "Damage Roll", diff --git a/module/data/fields/action/damageField.mjs b/module/data/fields/action/damageField.mjs index cf327204..7f1b61e9 100644 --- a/module/data/fields/action/damageField.mjs +++ b/module/data/fields/action/damageField.mjs @@ -23,14 +23,14 @@ export class DHActionDiceData extends foundry.abstract.DataModel { multiplier: new fields.StringField({ choices: CONFIG.DH.GENERAL.multiplierTypes, initial: 'prof', - label: 'Multiplier' + label: "DAGGERHEART.ACTIONS.Config.damage.multiplier" }), - flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: 'Flat Multiplier' }), - dice: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceTypes, initial: 'd6', label: 'Dice' }), - bonus: new fields.NumberField({ nullable: true, initial: null, label: 'Bonus' }), + flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: "DAGGERHEART.ACTIONS.Config.damage.flatMultiplier" }), + dice: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceTypes, initial: 'd6', label: "DAGGERHEART.GENERAL.Dice.single" }), + bonus: new fields.NumberField({ nullable: true, initial: null, label: "DAGGERHEART.GENERAL.bonus" }), custom: new fields.SchemaField({ - enabled: new fields.BooleanField({ label: 'Custom Formula' }), - formula: new FormulaField({ label: 'Formula', initial: '' }) + enabled: new fields.BooleanField({ label: "DAGGERHEART.ACTIONS.Config.general.customFormula" }), + formula: new FormulaField({ label: "DAGGERHEART.ACTIONS.Config.general.formula", initial: '' }) }) }; } diff --git a/module/data/item/weapon.mjs b/module/data/item/weapon.mjs index 66025cc5..ee4b997c 100644 --- a/module/data/item/weapon.mjs +++ b/module/data/item/weapon.mjs @@ -199,8 +199,8 @@ export default class DHWeapon extends AttachableItem { ]; for (const { value, type } of attack.damage.parts) { - const parts = [value.dice]; - if (value.bonus) parts.push(value.bonus.signedString()); + const parts = value.custom.enabled ? [game.i18n.localize("DAGGERHEART.GENERAL.custom")] : [value.dice]; + if (!value.custom.enabled && value.bonus) parts.push(value.bonus.signedString()); if (type.size > 0) { const typeTags = Array.from(type) diff --git a/styles/less/dialog/beastform/sheet.less b/styles/less/dialog/beastform/sheet.less index c13ee95e..9e87f53b 100644 --- a/styles/less/dialog/beastform/sheet.less +++ b/styles/less/dialog/beastform/sheet.less @@ -41,7 +41,7 @@ display: flex; flex-wrap: wrap; text-align: center; - font-size: 16px; + font-size: var(--font-size-16); margin: 0 4px; border: 1px solid light-dark(@dark-blue, @golden); border-radius: 6px; @@ -135,7 +135,7 @@ align-items: center; i { - font-size: 24px; + font-size: var(--font-size-24); } } diff --git a/styles/less/dialog/character-creation/selections-container.less b/styles/less/dialog/character-creation/selections-container.less index bc7a6987..3b93313a 100644 --- a/styles/less/dialog/character-creation/selections-container.less +++ b/styles/less/dialog/character-creation/selections-container.less @@ -75,7 +75,7 @@ label { position: absolute; - font-size: 18px; + font-size: var(--font-size-18); font-weight: bold; padding: 0 2px; background-image: url(../assets/parchments/dh-parchment-light.png); @@ -141,7 +141,7 @@ .ancestry-preview-feature { flex: 1; - font-size: 14px; + font-size: var(--font-size-14); white-space: wrap; padding: 0 2px; border: 1px solid light-dark(@golden, @dark-blue); @@ -178,7 +178,7 @@ legend { margin-left: auto; margin-right: auto; - font-size: 28px; + font-size: var(--font-size-28); font-weight: bold; padding: 0 8px; } @@ -191,7 +191,7 @@ justify-content: center; legend { - font-size: 20px; + font-size: var(--font-size-20); white-space: nowrap; } @@ -343,7 +343,7 @@ border-radius: 50%; height: 20px; width: 20px; - font-size: 14px; + font-size: var(--font-size-14); display: flex; align-items: center; justify-content: center; @@ -358,7 +358,7 @@ .descriptor { position: absolute; bottom: -8px; - font-size: 12px; + font-size: var(--font-size-12); border-radius: 8px; width: 56px; text-align: center; @@ -400,7 +400,7 @@ legend { margin-left: auto; margin-right: auto; - font-size: 28px; + font-size: var(--font-size-28); font-weight: bold; padding: 0 8px; white-space: nowrap; @@ -444,7 +444,7 @@ label { position: absolute; top: -8px; - font-size: 12px; + font-size: var(--font-size-12); white-space: nowrap; border: 1px solid light-dark(@dark-blue, @golden); border-radius: 6px; @@ -472,7 +472,7 @@ legend { margin-left: auto; margin-right: auto; - font-size: 12px; + font-size: var(--font-size-12); } .suggestion-inner-container { @@ -490,7 +490,7 @@ label { position: absolute; top: -2px; - font-size: 12px; + font-size: var(--font-size-12); } img { diff --git a/styles/less/dialog/damage-reduction/damage-reduction-container.less b/styles/less/dialog/damage-reduction/damage-reduction-container.less index 9e1d1472..2f343fb3 100644 --- a/styles/less/dialog/damage-reduction/damage-reduction-container.less +++ b/styles/less/dialog/damage-reduction/damage-reduction-container.less @@ -76,7 +76,7 @@ border-radius: 6px; height: 26px; padding: 0 1px; - font-size: 18px; + font-size: var(--font-size-18); display: flex; align-items: center; justify-content: center; @@ -108,7 +108,7 @@ border-radius: 6px; height: 26px; padding: 0 4px; - font-size: 18px; + font-size: var(--font-size-18); display: flex; align-items: center; justify-content: center; diff --git a/styles/less/dialog/dice-roll/roll-selection.less b/styles/less/dialog/dice-roll/roll-selection.less index 9113bc03..a0ac42b6 100644 --- a/styles/less/dialog/dice-roll/roll-selection.less +++ b/styles/less/dialog/dice-roll/roll-selection.less @@ -23,7 +23,7 @@ width: auto; opacity: 0.3; border-radius: 50%; - font-size: 18px; + font-size: var(--font-size-18); font-weight: bold; &:hover { @@ -74,7 +74,7 @@ font-family: @font-subtitle; font-style: normal; font-weight: 700; - font-size: 16px; + font-size: var(--font-size-16); line-height: 19px; color: light-dark(@dark, @beige); @@ -102,7 +102,7 @@ .label { font-style: normal; font-weight: 400; - font-size: 14px; + font-size: var(--font-size-14); line-height: 17px; } @@ -127,7 +127,7 @@ .label { font-style: normal; font-weight: 400; - font-size: 14px; + font-size: var(--font-size-14); line-height: 17px; } diff --git a/styles/less/dialog/downtime/downtime-container.less b/styles/less/dialog/downtime/downtime-container.less index f9f8df17..16edd3b0 100644 --- a/styles/less/dialog/downtime/downtime-container.less +++ b/styles/less/dialog/downtime/downtime-container.less @@ -35,7 +35,7 @@ gap: 4px; .activity-marker { - font-size: 8px; + font-size: .5rem; flex: none; color: light-dark(@dark-blue, @golden); margin-right: 4px; @@ -54,7 +54,7 @@ } .activity-selected-marker { - font-size: 14px; + font-size: var(--font-size-14); border: 1px solid light-dark(@dark-blue, @golden); border-radius: 6px; color: light-dark(@dark, @beige); @@ -71,7 +71,7 @@ display: grid; grid-template-columns: 1fr 1fr; gap: 4px; - font-size: 12px; + font-size: var(--font-size-12); &.wide { grid-template-columns: 1fr 1fr 1fr 1fr; diff --git a/styles/less/dialog/level-up/selections-container.less b/styles/less/dialog/level-up/selections-container.less index 96cadd29..6a551865 100644 --- a/styles/less/dialog/level-up/selections-container.less +++ b/styles/less/dialog/level-up/selections-container.less @@ -21,7 +21,7 @@ background: light-dark(@dark-blue-40, @golden-40); border-radius: 3px; padding: 5px; - font-size: 16px; + font-size: var(--font-size-16); gap: 4px; width: 100%; @@ -38,7 +38,7 @@ display: flex; align-items: center; justify-content: center; - font-size: 12px; + font-size: var(--font-size-12); } } } @@ -96,7 +96,7 @@ width: 54px; border-radius: 50%; border: 2px solid; - font-size: 48px; + font-size: var(--font-size-48); display: flex; align-items: center; justify-content: center; @@ -133,7 +133,7 @@ .levelup-selections-title { margin-left: auto; margin-right: auto; - font-size: 22px; + font-size: 1.375rem; font-weight: bold; padding: 0 12px; } diff --git a/styles/less/dialog/level-up/summary-container.less b/styles/less/dialog/level-up/summary-container.less index f192d5ec..d67abff6 100644 --- a/styles/less/dialog/level-up/summary-container.less +++ b/styles/less/dialog/level-up/summary-container.less @@ -41,7 +41,7 @@ display: flex; align-items: center; gap: 4px; - font-size: 14px; + font-size: var(--font-size-14); color: light-dark(@dark, @beige); } @@ -49,7 +49,7 @@ display: flex; align-items: center; gap: 4px; - font-size: 16px; + font-size: var(--font-size-16); color: light-dark(@dark, @beige); margin-bottom: 5px; } @@ -62,7 +62,7 @@ border: 2px solid; border-radius: 3px; padding: 0 4px; - font-size: 14px; + font-size: var(--font-size-14); color: light-dark(@dark, @beige); } } diff --git a/styles/less/dialog/level-up/tiers-container.less b/styles/less/dialog/level-up/tiers-container.less index d4efa46b..270b9b80 100644 --- a/styles/less/dialog/level-up/tiers-container.less +++ b/styles/less/dialog/level-up/tiers-container.less @@ -21,7 +21,7 @@ legend { margin-left: auto; margin-right: auto; - font-size: 22px; + font-size: 1.375rem; font-weight: bold; padding: 0 12px; } @@ -60,7 +60,7 @@ } .checkbox-group-label { - font-size: 12px; + font-size: var(--font-size-12); font-style: italic; } } diff --git a/styles/less/dialog/reroll-dialog/sheet.less b/styles/less/dialog/reroll-dialog/sheet.less index f8687009..71c94d80 100644 --- a/styles/less/dialog/reroll-dialog/sheet.less +++ b/styles/less/dialog/reroll-dialog/sheet.less @@ -37,7 +37,7 @@ display: flex; align-items: center; justify-content: center; - font-size: 22px; + font-size: 1.375rem; opacity: 0.8; &.selected { @@ -99,12 +99,12 @@ &:before, &:after { line-height: 12px; - font-size: 12px; + font-size: var(--font-size-12); } } i { - font-size: 10px; + font-size: var(--font-size-10); } } } diff --git a/styles/less/global/chat.less b/styles/less/global/chat.less index bf29a05c..d2822b1b 100644 --- a/styles/less/global/chat.less +++ b/styles/less/global/chat.less @@ -71,7 +71,7 @@ color: @beige; h4 { - font-size: 16px; + font-size: var(--font-size-16); font-weight: bold; margin-bottom: 0; font-family: @font-subtitle; diff --git a/styles/less/global/dialog.less b/styles/less/global/dialog.less index 42fdb07e..f164b701 100644 --- a/styles/less/global/dialog.less +++ b/styles/less/global/dialog.less @@ -50,7 +50,7 @@ .formula-label { font-style: normal; font-weight: 500; - font-size: 14px; + font-size: var(--font-size-14); line-height: 17px; white-space: nowrap; color: light-dark(@dark, @beige); diff --git a/styles/less/global/elements.less b/styles/less/global/elements.less index 2f4912c5..397420b2 100755 --- a/styles/less/global/elements.less +++ b/styles/less/global/elements.less @@ -165,7 +165,7 @@ z-index: 1; .remove { - font-size: 10px; + font-size: var(--font-size-10); } } } @@ -400,7 +400,7 @@ display: flex; flex-direction: column; white-space: nowrap; - font-size: 14px; + font-size: var(--font-size-14); font-weight: 400; &.modifier-label { @@ -527,7 +527,7 @@ font-family: @font-body; margin-top: 4px; color: light-dark(#14142599, #efe6d850); - font-size: 12px; + font-size: var(--font-size-12); padding-left: 3px; } } @@ -541,7 +541,7 @@ text-align: center; } .title-hint { - font-size: 12px; + font-size: var(--font-size-12); font-variant: small-caps; text-align: center; } @@ -605,7 +605,7 @@ align-items: center; label { - font-size: 16px; + font-size: var(--font-size-16); } .form-fields { @@ -776,7 +776,7 @@ .preview-text-container { padding: 10px 0; text-align: center; - font-size: 16px; + font-size: var(--font-size-16); color: light-dark(@beige, @dark); background-image: url(../assets/parchments/dh-parchment-light.png); border-radius: 0 0 4px 4px; @@ -799,14 +799,14 @@ justify-content: center; .preview-add-icon { - font-size: 40px; + font-size: var(--font-size-40); color: light-dark(@dark-blue-50, @beige-50); } .preview-empty-subtext { position: absolute; bottom: 5%; - font-size: 10px; + font-size: var(--font-size-10); font-variant: small-caps; text-align: center; font-style: italic; @@ -821,7 +821,7 @@ width: 54px; border-radius: 50%; border: 2px solid; - font-size: 48px; + font-size: var(--font-size-48); display: flex; align-items: center; justify-content: center; diff --git a/styles/less/global/inventory-item.less b/styles/less/global/inventory-item.less index d63c658e..e221f4e7 100644 --- a/styles/less/global/inventory-item.less +++ b/styles/less/global/inventory-item.less @@ -105,7 +105,7 @@ align-self: center; .item-name { - font-size: 14px; + font-size: var(--font-size-14); .expanded-icon { display: none; @@ -121,9 +121,10 @@ .label { display: flex; flex-direction: row; - justify-content: center; align-items: center; - font-size: 12px; + font-size: var(--font-size-12); + flex-wrap: wrap; + justify-content: start; } .tag { @@ -179,18 +180,18 @@ overflow: hidden; h1 { - font-size: 32px; + font-size: var(--font-size-32); } h2 { - font-size: 28px; + font-size: var(--font-size-28); font-weight: 600; } h3 { - font-size: 20px; + font-size: var(--font-size-20); font-weight: 600; } h4 { - font-size: 16px; + font-size: var(--font-size-16); color: @beige; font-weight: 600; } @@ -231,7 +232,7 @@ label { color: light-dark(white, black); filter: drop-shadow(0 0 1px light-dark(@dark-blue, @golden)); - font-size: 18px; + font-size: var(--font-size-18); } img { @@ -243,7 +244,7 @@ text-shadow: 0 0 3px white; filter: drop-shadow(0 1px white); color: black; - font-size: 26px; + font-size: 1.625rem; } } } @@ -310,7 +311,7 @@ .card-name { font-style: normal; font-weight: 400; - font-size: 12px; + font-size: var(--font-size-12); line-height: 15px; color: @beige; @@ -351,7 +352,7 @@ gap: 4px; .resource-edit { - font-size: 14px; + font-size: var(--font-size-14); } } @@ -363,7 +364,7 @@ i { flex: none; - font-size: 14px; + font-size: var(--font-size-14); } input { @@ -383,7 +384,7 @@ color: light-dark(white, black); filter: drop-shadow(0 0 1px light-dark(@dark-blue, @golden)); z-index: 2; - font-size: 18px; + font-size: var(--font-size-18); cursor: pointer; } @@ -397,7 +398,7 @@ text-shadow: 0 0 3px white; filter: drop-shadow(0 1px white); color: black; - font-size: 26px; + font-size: 1.625rem; } } } diff --git a/styles/less/global/item-header.less b/styles/less/global/item-header.less index 7b2c907f..073762e0 100755 --- a/styles/less/global/item-header.less +++ b/styles/less/global/item-header.less @@ -35,7 +35,7 @@ width: 80%; .item-name input[type='text'] { - font-size: 32px; + font-size: var(--font-size-32); height: 42px; text-align: center; width: 90%; @@ -103,7 +103,7 @@ transition: all 0.3s ease; .recall-label { - font-size: 14px; + font-size: var(--font-size-14); opacity: 0; margin-right: 0.3rem; transition: all 0.3s ease; @@ -141,7 +141,7 @@ .item-name { input[type='text'] { - font-size: 32px; + font-size: var(--font-size-32); height: 42px; text-align: center; width: 90%; diff --git a/styles/less/global/prose-mirror.less b/styles/less/global/prose-mirror.less index cb7933a4..506fb8b7 100644 --- a/styles/less/global/prose-mirror.less +++ b/styles/less/global/prose-mirror.less @@ -12,18 +12,18 @@ scrollbar-width: thin; scrollbar-color: light-dark(@dark-blue, @golden) transparent; h1 { - font-size: 32px; + font-size: var(--font-size-32); } h2 { - font-size: 28px; + font-size: var(--font-size-28); font-weight: 600; } h3 { - font-size: 20px; + font-size: var(--font-size-20); font-weight: 600; } h4 { - font-size: 16px; + font-size: var(--font-size-16); color: @beige; font-weight: 600; } diff --git a/styles/less/sheets-settings/character-settings/sheet.less b/styles/less/sheets-settings/character-settings/sheet.less index 78bbf9c5..f0c7c94e 100644 --- a/styles/less/sheets-settings/character-settings/sheet.less +++ b/styles/less/sheets-settings/character-settings/sheet.less @@ -33,7 +33,7 @@ div { filter: drop-shadow(0 0 3px black); text-shadow: 0 0 3px black; - font-size: 12px; + font-size: var(--font-size-12); } input { diff --git a/styles/less/sheets-settings/header.less b/styles/less/sheets-settings/header.less index 6ac2663f..82f3c488 100644 --- a/styles/less/sheets-settings/header.less +++ b/styles/less/sheets-settings/header.less @@ -10,7 +10,7 @@ font-family: @font-subtitle; font-style: normal; font-weight: 700; - font-size: 24px; + font-size: var(--font-size-24); margin: 0; text-align: center; color: light-dark(@dark-blue, @golden); diff --git a/styles/less/sheets/actors/adversary/header.less b/styles/less/sheets/actors/adversary/header.less index 22a769ae..d4a7812e 100644 --- a/styles/less/sheets/actors/adversary/header.less +++ b/styles/less/sheets/actors/adversary/header.less @@ -18,7 +18,7 @@ flex: 1; input[type='text'] { - font-size: 32px; + font-size: var(--font-size-32); height: 42px; text-align: start; border: 1px solid transparent; @@ -42,7 +42,7 @@ justify-content: center; align-items: center; padding: 3px 5px; - font-size: 12px; + font-size: var(--font-size-12); font: @font-body; background: light-dark(@dark-15, @beige-15); @@ -55,7 +55,7 @@ flex-direction: row; justify-content: center; align-items: center; - font-size: 12px; + font-size: var(--font-size-12); } } diff --git a/styles/less/sheets/actors/adversary/sidebar.less b/styles/less/sheets/actors/adversary/sidebar.less index 70cd92ed..ab15fa46 100644 --- a/styles/less/sheets/actors/adversary/sidebar.less +++ b/styles/less/sheets/actors/adversary/sidebar.less @@ -74,7 +74,7 @@ height: 30px; h4 { - font-size: 14px; + font-size: var(--font-size-14); font-weight: bold; text-transform: uppercase; color: light-dark(@dark-blue, @golden); @@ -255,7 +255,7 @@ font-weight: bold; text-align: center; line-height: 18px; - font-size: 12px; + font-size: var(--font-size-12); color: light-dark(@beige, @dark-blue); } } @@ -295,7 +295,7 @@ align-items: center; h3 { - font-size: 20px; + font-size: var(--font-size-20); } } .items-list { @@ -315,7 +315,7 @@ align-items: center; h3 { - font-size: 20px; + font-size: var(--font-size-20); } } @@ -337,7 +337,7 @@ .experience-name { width: 180px; text-align: start; - font-size: 14px; + font-size: var(--font-size-14); color: light-dark(@dark, @beige); } } @@ -345,7 +345,7 @@ .experience-value { height: 25px; width: 35px; - font-size: 14px; + font-size: var(--font-size-14); color: light-dark(@dark, @beige); align-content: center; text-align: center; diff --git a/styles/less/sheets/actors/character/header.less b/styles/less/sheets/actors/character/header.less index 2d261a6a..80089cf7 100644 --- a/styles/less/sheets/actors/character/header.less +++ b/styles/less/sheets/actors/character/header.less @@ -41,7 +41,7 @@ flex: 1; input[type='text'] { - font-size: 32px; + font-size: var(--font-size-32); height: 42px; text-align: start; border: 1px solid transparent; @@ -72,7 +72,7 @@ .level-button { color: light-dark(@dark, @beige); - font-size: 18px; + font-size: var(--font-size-18); line-height: 1; min-height: unset; height: min-content; @@ -97,7 +97,7 @@ justify-content: space-between; padding: 5px 0; margin-bottom: 10px; - font-size: 12px; + font-size: var(--font-size-12); color: light-dark(@dark-blue, @golden); .missing-header-feature { @@ -158,7 +158,7 @@ height: 30px; h4 { - font-size: 14px; + font-size: var(--font-size-14); font-weight: bold; text-transform: uppercase; color: light-dark(@dark-blue, @golden); @@ -170,7 +170,7 @@ gap: 5px; .label { - font-size: 14px; + font-size: var(--font-size-14); font-weight: bold; text-transform: uppercase; color: light-dark(@dark-blue, @golden); @@ -205,7 +205,7 @@ align-items: center; padding-top: 5px; color: light-dark(@dark-blue, @golden); - font-size: 14px; + font-size: var(--font-size-14); font-weight: 600; align-items: center; justify-content: center; @@ -213,14 +213,14 @@ i { line-height: 17px; - font-size: 10px; + font-size: var(--font-size-10); } } .trait-value { font-style: normal; font-weight: 400; - font-size: 20px; + font-size: var(--font-size-20); text-align: center; } } diff --git a/styles/less/sheets/actors/character/inventory.less b/styles/less/sheets/actors/character/inventory.less index 0870c0c3..9fd48921 100644 --- a/styles/less/sheets/actors/character/inventory.less +++ b/styles/less/sheets/actors/character/inventory.less @@ -41,7 +41,7 @@ height: 32px; position: absolute; right: 20px; - font-size: 16px; + font-size: var(--font-size-16); z-index: 1; color: light-dark(@dark-blue-50, @beige-50); } diff --git a/styles/less/sheets/actors/character/loadout.less b/styles/less/sheets/actors/character/loadout.less index 35dffb79..08246efb 100644 --- a/styles/less/sheets/actors/character/loadout.less +++ b/styles/less/sheets/actors/character/loadout.less @@ -41,7 +41,7 @@ height: 32px; position: absolute; right: 20px; - font-size: 16px; + font-size: var(--font-size-16); z-index: 1; color: light-dark(@dark-blue-50, @beige-50); } diff --git a/styles/less/sheets/actors/character/sidebar.less b/styles/less/sheets/actors/character/sidebar.less index 3ff8576d..3d244cdd 100644 --- a/styles/less/sheets/actors/character/sidebar.less +++ b/styles/less/sheets/actors/character/sidebar.less @@ -89,7 +89,7 @@ transition: all 0.3s ease; .spellcast-label { - font-size: 14px; + font-size: var(--font-size-14); opacity: 0; margin-right: 0.3rem; transition: all 0.3s ease; @@ -258,7 +258,7 @@ text-align: center; line-height: 18px; color: light-dark(@beige, @dark-blue); - font-size: 12px; + font-size: var(--font-size-12); } } .status-value { @@ -402,7 +402,7 @@ font-weight: bold; text-align: center; line-height: 18px; - font-size: 12px; + font-size: var(--font-size-12); color: light-dark(@beige, @dark-blue); } } @@ -424,7 +424,7 @@ height: 30px; h4 { - font-size: 14px; + font-size: var(--font-size-14); font-weight: bold; text-transform: uppercase; color: light-dark(@dark-blue, @golden); @@ -490,7 +490,7 @@ .experience-value { height: 25px; width: 35px; - font-size: 14px; + font-size: var(--font-size-14); color: light-dark(@dark, @beige); align-content: center; text-align: center; diff --git a/styles/less/sheets/actors/companion/details.less b/styles/less/sheets/actors/companion/details.less index 9823825f..2df14b23 100644 --- a/styles/less/sheets/actors/companion/details.less +++ b/styles/less/sheets/actors/companion/details.less @@ -16,7 +16,7 @@ width: 100%; h3 { - font-size: 20px; + font-size: var(--font-size-20); } } .items-list { @@ -58,7 +58,7 @@ .experience-name { width: 180px; text-align: start; - font-size: 14px; + font-size: var(--font-size-14); color: light-dark(@dark, @beige); } } @@ -66,7 +66,7 @@ .experience-value { height: 25px; width: 35px; - font-size: 14px; + font-size: var(--font-size-14); color: light-dark(@dark, @beige); align-content: center; text-align: center; diff --git a/styles/less/sheets/actors/companion/header.less b/styles/less/sheets/actors/companion/header.less index 240f9df8..b85a1819 100644 --- a/styles/less/sheets/actors/companion/header.less +++ b/styles/less/sheets/actors/companion/header.less @@ -24,7 +24,7 @@ margin-bottom: -30px; input[type='text'] { - font-size: 24px; + font-size: var(--font-size-24); height: 32px; text-align: center; border: 1px solid transparent; @@ -78,7 +78,7 @@ font-weight: bold; text-align: center; line-height: 18px; - font-size: 12px; + font-size: var(--font-size-12); color: light-dark(@beige, @dark-blue); } } @@ -209,7 +209,7 @@ .level-button { color: light-dark(@dark, @beige); - font-size: 18px; + font-size: var(--font-size-18); line-height: 1; min-height: unset; height: min-content; diff --git a/styles/less/sheets/actors/environment/header.less b/styles/less/sheets/actors/environment/header.less index 0ac361a1..670f6c92 100644 --- a/styles/less/sheets/actors/environment/header.less +++ b/styles/less/sheets/actors/environment/header.less @@ -39,7 +39,7 @@ justify-content: center; align-items: center; padding: 3px 5px; - font-size: 12px; + font-size: var(--font-size-12); font: @font-body; background: light-dark(@dark-15, @beige-15); @@ -52,7 +52,7 @@ flex-direction: row; justify-content: center; align-items: center; - font-size: 12px; + font-size: var(--font-size-12); } } @@ -100,7 +100,7 @@ font-weight: bold; text-align: center; line-height: 18px; - font-size: 12px; + font-size: var(--font-size-12); color: light-dark(@beige, @dark-blue); } } @@ -108,7 +108,7 @@ .item-name { input[type='text'] { - font-size: 32px; + font-size: var(--font-size-32); height: 42px; text-align: start; transition: all 0.3s ease; diff --git a/styles/less/ui/chat/ability-use.less b/styles/less/ui/chat/ability-use.less index 58897697..d313638f 100644 --- a/styles/less/ui/chat/ability-use.less +++ b/styles/less/ui/chat/ability-use.less @@ -87,7 +87,7 @@ gap: 5px; .title { - font-size: 20px; + font-size: var(--font-size-20); color: @golden; font-weight: 700; } @@ -103,7 +103,7 @@ justify-content: center; align-items: center; padding: 3px 5px; - font-size: 12px; + font-size: var(--font-size-12); background: @beige-15; border: 1px solid @beige; diff --git a/styles/less/ui/chat/action.less b/styles/less/ui/chat/action.less index 82cc3210..a849315a 100644 --- a/styles/less/ui/chat/action.less +++ b/styles/less/ui/chat/action.less @@ -81,13 +81,13 @@ gap: 5px; .title { - font-size: 20px; + font-size: var(--font-size-20); color: @golden; font-weight: 700; } .label { - font-size: 12px; + font-size: var(--font-size-12); color: @beige; margin: 0; } diff --git a/styles/less/ui/chat/chat.less b/styles/less/ui/chat/chat.less index c6ed95ca..9eb35cd6 100644 --- a/styles/less/ui/chat/chat.less +++ b/styles/less/ui/chat/chat.less @@ -49,7 +49,7 @@ &.resource-roll { .reroll-message { text-align: center; - font-size: 18px; + font-size: var(--font-size-18); margin-bottom: 0; } } @@ -191,7 +191,7 @@ position: absolute; top: 0; right: 0; - font-size: 10px; + font-size: var(--font-size-10); z-index: 2; filter: drop-shadow(0 0 3px black); } diff --git a/styles/less/ui/chat/downtime.less b/styles/less/ui/chat/downtime.less index 8b898c43..ca29e85f 100644 --- a/styles/less/ui/chat/downtime.less +++ b/styles/less/ui/chat/downtime.less @@ -82,12 +82,12 @@ .header-label { padding: 8px; .title { - font-size: 16px; + font-size: var(--font-size-16); color: @golden; font-weight: 700; } .label { - font-size: 12px; + font-size: var(--font-size-12); color: @beige; margin: 0; } diff --git a/styles/less/ui/combat-sidebar/token-actions.less b/styles/less/ui/combat-sidebar/token-actions.less index 6fc84d29..41fb38ab 100644 --- a/styles/less/ui/combat-sidebar/token-actions.less +++ b/styles/less/ui/combat-sidebar/token-actions.less @@ -17,7 +17,7 @@ display: flex; align-items: center; justify-content: center; - font-size: 10px; + font-size: var(--font-size-10); padding: 8px; --button-size: 0; diff --git a/styles/less/ui/countdown/sheet.less b/styles/less/ui/countdown/sheet.less index 1692773e..0ce7c4af 100644 --- a/styles/less/ui/countdown/sheet.less +++ b/styles/less/ui/countdown/sheet.less @@ -47,7 +47,7 @@ position: absolute; top: 8px; right: 8px; - font-size: 18px; + font-size: var(--font-size-18); } .countdown-container { diff --git a/styles/less/ui/item-browser/item-browser.less b/styles/less/ui/item-browser/item-browser.less index 7be45b8c..d891e73d 100644 --- a/styles/less/ui/item-browser/item-browser.less +++ b/styles/less/ui/item-browser/item-browser.less @@ -161,7 +161,7 @@ height: 32px; position: absolute; right: 20px; - font-size: 16px; + font-size: var(--font-size-16); z-index: 1; color: light-dark(@dark-blue-50, @beige-50); } @@ -304,18 +304,18 @@ gap: 5px; h1 { - font-size: 32px; + font-size: var(--font-size-32); } h2 { - font-size: 28px; + font-size: var(--font-size-28); font-weight: 600; } h3 { - font-size: 20px; + font-size: var(--font-size-20); font-weight: 600; } h4 { - font-size: 16px; + font-size: var(--font-size-16); color: @beige; font-weight: 600; } diff --git a/styles/less/ui/settings/homebrew-settings/domains.less b/styles/less/ui/settings/homebrew-settings/domains.less index c2ba3ef7..84e013c2 100644 --- a/styles/less/ui/settings/homebrew-settings/domains.less +++ b/styles/less/ui/settings/homebrew-settings/domains.less @@ -44,7 +44,7 @@ border-radius: 50%; width: 24px; height: 24px; - font-size: 12px; + font-size: var(--font-size-12); } } } @@ -118,7 +118,7 @@ button { border-radius: 50%; - font-size: 12px; + font-size: var(--font-size-12); height: 24px; width: 24px; margin-right: 4px; diff --git a/styles/less/ui/settings/settings.less b/styles/less/ui/settings/settings.less index 8062ff73..cee5475f 100644 --- a/styles/less/ui/settings/settings.less +++ b/styles/less/ui/settings/settings.less @@ -53,7 +53,7 @@ } i { - font-size: 18px; + font-size: var(--font-size-18); } } } @@ -80,7 +80,7 @@ width: 80%; .item-name input[type='text'] { - font-size: 32px; + font-size: var(--font-size-32); height: 42px; text-align: center; width: 90%; @@ -117,7 +117,7 @@ label { position: absolute; top: -7px; - font-size: 12px; + font-size: var(--font-size-12); font-variant: petite-caps; z-index: 2; } diff --git a/styles/less/utils/mixin.less b/styles/less/utils/mixin.less index 2f1aa907..49e97a1f 100644 --- a/styles/less/utils/mixin.less +++ b/styles/less/utils/mixin.less @@ -30,7 +30,7 @@ align-items: center; h3 { - font-size: 20px; + font-size: var(--font-size-20); } } @@ -70,7 +70,7 @@ h4 { font-family: @font-body; - font-size: 14px; + font-size: var(--font-size-14); border: none; font-weight: 700; margin: 0; @@ -80,7 +80,7 @@ h5 { font-family: @font-body; - font-size: 14px; + font-size: var(--font-size-14); margin: 0; font-weight: normal; } diff --git a/styles/less/ux/autocomplete/autocomplete.less b/styles/less/ux/autocomplete/autocomplete.less index 868b4f43..808a8972 100644 --- a/styles/less/ux/autocomplete/autocomplete.less +++ b/styles/less/ux/autocomplete/autocomplete.less @@ -22,12 +22,12 @@ .group { font-weight: bold; - font-size: 14px; + font-size: var(--font-size-14); padding-left: 8px; } li[role='option'] { - font-size: 14px; + font-size: var(--font-size-14); padding-left: 10px; cursor: pointer; diff --git a/styles/less/ux/tooltip/tooltip.less b/styles/less/ux/tooltip/tooltip.less index 43f47da5..1d7079ee 100644 --- a/styles/less/ux/tooltip/tooltip.less +++ b/styles/less/ux/tooltip/tooltip.less @@ -85,7 +85,7 @@ gap: 8px; .tooltip-chip { - font-size: 18px; + font-size: var(--font-size-18); padding: 2px 4px; border: 1px solid light-dark(@dark-blue, @golden); border-radius: 6px; diff --git a/templates/sheets/items/weapon/header.hbs b/templates/sheets/items/weapon/header.hbs index ee0198ba..349a9516 100644 --- a/templates/sheets/items/weapon/header.hbs +++ b/templates/sheets/items/weapon/header.hbs @@ -14,7 +14,11 @@ - {{localize (concat 'DAGGERHEART.CONFIG.Range.' source.system.attack.range '.name')}} - - {{source.system.attack.damage.parts.0.value.dice}}{{#if source.system.attack.damage.parts.0.value.bonus}} + {{source.system.attack.damage.parts.0.value.bonus}}{{/if}} + {{#if source.system.attack.damage.parts.0.value.custom.enabled}} + {{localize "DAGGERHEART.GENERAL.custom"}} + {{else}} + {{source.system.attack.damage.parts.0.value.dice}}{{#if source.system.attack.damage.parts.0.value.bonus}} + {{source.system.attack.damage.parts.0.value.bonus}}{{/if}} + {{/if}} ( {{#each source.system.attack.damage.parts.0.type}} {{localize (concat 'DAGGERHEART.CONFIG.DamageType.' this '.abbreviation')}} diff --git a/templates/sheets/items/weapon/settings.hbs b/templates/sheets/items/weapon/settings.hbs index b2738c75..f9499221 100644 --- a/templates/sheets/items/weapon/settings.hbs +++ b/templates/sheets/items/weapon/settings.hbs @@ -21,10 +21,17 @@ {{#with systemFields.attack.fields.damage.fields.parts.element.fields as | fields | }} {{#with (lookup ../document.system.attack.damage.parts 0) as | source | }} {{localize "DAGGERHEART.GENERAL.damage"}} - {{localize "DAGGERHEART.GENERAL.Dice.single"}} - {{formInput fields.value.fields.dice value=source.value.dice name="system.attack.damage.parts.0.value.dice"}} - {{localize "DAGGERHEART.GENERAL.bonus"}} - {{formInput fields.value.fields.bonus value=source.value.bonus name="system.attack.damage.parts.0.value.bonus" localize=true}} + {{localize "DAGGERHEART.ACTIONS.Config.general.customFormula"}} + {{formInput fields.value.fields.custom.fields.enabled value=source.value.custom.enabled name="system.attack.damage.parts.0.value.custom.enabled"}} + {{#if source.value.custom.enabled}} + {{localize "DAGGERHEART.ACTIONS.Config.general.formula"}} + {{formInput fields.value.fields.custom.fields.formula value=source.value.custom.formula name="system.attack.damage.parts.0.value.custom.formula"}} + {{else}} + {{localize "DAGGERHEART.GENERAL.Dice.single"}} + {{formInput fields.value.fields.dice value=source.value.dice name="system.attack.damage.parts.0.value.dice"}} + {{localize "DAGGERHEART.GENERAL.bonus"}} + {{formInput fields.value.fields.bonus value=source.value.bonus name="system.attack.damage.parts.0.value.bonus" localize=true}} + {{/if}} {{localize "DAGGERHEART.GENERAL.type"}} {{formInput fields.type value=source.type name="system.attack.damage.parts.0.type" localize=true}} {{localize "DAGGERHEART.CONFIG.DamageType.direct.name"}}