mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
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
This commit is contained in:
parent
3c893df175
commit
f04619f73b
1 changed files with 2 additions and 1 deletions
|
|
@ -94,7 +94,8 @@ export default class CostField extends fields.ArrayField {
|
||||||
}
|
}
|
||||||
|
|
||||||
static getRealCosts(costs) {
|
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 = [];
|
let mergedCosts = [];
|
||||||
realCosts.forEach(c => {
|
realCosts.forEach(c => {
|
||||||
const getCost = Object.values(mergedCosts).find(gc => gc.key === c.key);
|
const getCost = Object.values(mergedCosts).find(gc => gc.key === c.key);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue