[Fix] 1086 - Enrichment Buttons (#1087)

* Fixed so enriched buttons are button type

* Fixed DamageEnrihed button
This commit is contained in:
WBHarry 2025-08-26 02:04:22 +02:00 committed by GitHub
parent 0a5828c8fa
commit ff65a85458
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View file

@ -44,7 +44,7 @@ function getDamageMessage(damage, type, inline, defaultElement) {
const dualityElement = document.createElement('span');
dualityElement.innerHTML = `
<button class="enriched-damage-button${inline ? ' inline' : ''}"
<button type="button" class="enriched-damage-button${inline ? ' inline' : ''}"
data-value="${damage}"
data-type="${type}"
data-tooltip="${game.i18n.localize('DAGGERHEART.GENERAL.damage')}"
@ -71,6 +71,11 @@ export const renderDamageButton = async event => {
title: game.i18n.localize('Damage Roll'),
data: { bonuses: [] },
source: {},
hasDamage: true,
hasTarget: true,
targets: Array.from(game.user.targets).map(t =>
game.system.api.fields.ActionFields.TargetField.formatTarget(t)
),
roll: [
{
formula: value,