From f04619f73b169b03df0fd1e6b27721512f9bfe13 Mon Sep 17 00:00:00 2001 From: Dapoulp <74197441+Dapoulp@users.noreply.github.com> Date: Fri, 5 Sep 2025 02:45:05 +0200 Subject: [PATCH] Fix/1144 fix experiences roll use costs (#1150) * Temp ActionField attack type missing * Move missing attack type to getModel * Fix costs object being updated during getRealCosts --- module/data/fields/action/costField.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/data/fields/action/costField.mjs b/module/data/fields/action/costField.mjs index f4d942b1..4c8fad88 100644 --- a/module/data/fields/action/costField.mjs +++ b/module/data/fields/action/costField.mjs @@ -94,7 +94,8 @@ export default class CostField extends fields.ArrayField { } static getRealCosts(costs) { - const realCosts = costs?.length ? costs.filter(c => c.enabled) : []; + const cloneCosts = foundry.utils.deepClone(costs), + realCosts = cloneCosts?.length ? cloneCosts.filter(c => c.enabled) : []; let mergedCosts = []; realCosts.forEach(c => { const getCost = Object.values(mergedCosts).find(gc => gc.key === c.key);