diff --git a/module/data/activeEffect/armorEffect.mjs b/module/data/activeEffect/armorEffect.mjs index 93a7ed3d..d32d24b2 100644 --- a/module/data/activeEffect/armorEffect.mjs +++ b/module/data/activeEffect/armorEffect.mjs @@ -107,9 +107,13 @@ export default class ArmorEffect extends foundry.data.ActiveEffectTypeDataModel const actor = this.parent.actor?.type === 'character' ? this.parent.actor : null; const changeData = this.changes[0]; + const maxParse = actor ? itemAbleRollParse(changeData.max, actor, this.parent.parent) : null; + const maxRoll = maxParse ? new Roll(maxParse).evaluateSync() : null; + const maxEvaluated = maxRoll ? (maxRoll.isDeterministic ? maxRoll.total : null) : null; + return { ...changeData, - max: actor ? itemAbleRollParse(changeData.max, actor, this.parent.parent) : changeData.max + max: maxEvaluated ?? changeData.max }; } @@ -153,9 +157,11 @@ export default class ArmorEffect extends foundry.data.ActiveEffectTypeDataModel } }; - return armorEffects.sort((a, b) => - increasing ? getEffectWeight(b) - getEffectWeight(a) : getEffectWeight(a) - getEffectWeight(b) - ); + return armorEffects + .filter(x => !x.disabled && !x.isSuppressed) + .sort((a, b) => + increasing ? getEffectWeight(b) - getEffectWeight(a) : getEffectWeight(a) - getEffectWeight(b) + ); } /* Overrides */ diff --git a/src/packs/domains/domainCard_Armorer_cy8GjBPGc9w9RaGO.json b/src/packs/domains/domainCard_Armorer_cy8GjBPGc9w9RaGO.json index aa9910dc..cb7bec9f 100644 --- a/src/packs/domains/domainCard_Armorer_cy8GjBPGc9w9RaGO.json +++ b/src/packs/domains/domainCard_Armorer_cy8GjBPGc9w9RaGO.json @@ -90,46 +90,42 @@ "effects": [ { "name": "Armorer", - "type": "base", + "type": "armor", "system": { - "rangeDependence": { - "enabled": false, - "type": "withinRange", - "target": "hostile", - "range": "melee" - } + "changes": [ + { + "key": "system.armorScore", + "type": "armor", + "phase": "initial", + "priority": 20, + "value": 0, + "max": "1" + } + ] }, - "_id": "cED730OjuMW5haJR", + "_id": "PczrmraHWZ54NJsW", "img": "icons/tools/hand/hammer-and-nail.webp", - "changes": [ - { - "key": "system.armorScore", - "mode": 2, - "value": "1", - "priority": null - } - ], "disabled": false, + "start": null, "duration": { - "startTime": null, - "combat": null, - "seconds": null, - "rounds": null, - "turns": null, - "startRound": null, - "startTurn": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, - "description": "
While you’re wearing armor, gain a +1 bonus to your Armor Score.
", + "description": "While you’re wearing armor, gain a +1 bonus to your Armor Score.
", "origin": null, "tint": "#ffffff", "transfer": true, "statuses": [], + "showIcon": 1, + "folder": null, "sort": 0, "flags": {}, "_stats": { "compendiumSource": null }, - "_key": "!items.effects!cy8GjBPGc9w9RaGO.cED730OjuMW5haJR" + "_key": "!items.effects!cy8GjBPGc9w9RaGO.PczrmraHWZ54NJsW" } ], "ownership": { diff --git a/src/packs/domains/domainCard_Bare_Bones_l5D9kq901JDESaXw.json b/src/packs/domains/domainCard_Bare_Bones_l5D9kq901JDESaXw.json index 3b1ea76a..f6474623 100644 --- a/src/packs/domains/domainCard_Bare_Bones_l5D9kq901JDESaXw.json +++ b/src/packs/domains/domainCard_Bare_Bones_l5D9kq901JDESaXw.json @@ -4,7 +4,7 @@ "type": "domainCard", "folder": "QpOL7jPbMBzH96qR", "system": { - "description": "When you choose not to equip armor, you have a base Armor Score of 3 + your Strength and use the following as your base damage thresholds:
Equip the below armor to use Bare Bones.
@UUID[Compendium.daggerheart.armors.Item.ITAjcigTcUw5pMCN]{Bare Bones}
", + "description": "When you choose not to equip armor, you have a base Armor Score of 3 + your Strength and use the following as your base damage thresholds:
Tier 1: 9/19
Tier 2: 11/24
Tier 3: 13/31
Tier 4: 15/38
Equip the below armor to use Bare Bones.
", "domain": "valor", "recallCost": 0, "level": 1, @@ -19,7 +19,98 @@ } }, "flags": {}, - "effects": [], + "effects": [ + { + "name": "Bare Bones Armor", + "type": "armor", + "system": { + "changes": [ + { + "value": 0, + "max": "3 + @system.traits.strength.value", + "key": "system.armorScore", + "type": "armor", + "phase": "initial", + "priority": 20 + } + ] + }, + "_id": "Zn1nNUwjlkbRfbMc", + "img": "icons/magic/control/buff-strength-muscle-damage-orange.webp", + "disabled": false, + "start": null, + "duration": { + "value": null, + "units": "seconds", + "expiry": null, + "expired": false + }, + "description": "You have a base Armor Score of 3 + your Strength
", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "showIcon": 1, + "folder": null, + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null + }, + "_key": "!items.effects!l5D9kq901JDESaXw.Zn1nNUwjlkbRfbMc" + }, + { + "name": "Bare Bones", + "type": "base", + "system": { + "changes": [ + { + "key": "system.damageThresholds.major", + "type": "add", + "value": "9 + (@tier - 1) * 5 + max(0, (@tier -2) * 2 )", + "priority": null, + "phase": "initial" + }, + { + "key": "system.damageThresholds.severe", + "type": "add", + "value": "19 + (@tier - 1) * 5 + max(0, (@tier -2) * 2 )", + "priority": null, + "phase": "initial" + } + ], + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "FazU8RFjMmTpXs7Z", + "img": "icons/magic/control/buff-strength-muscle-damage-orange.webp", + "disabled": false, + "start": null, + "duration": { + "value": null, + "units": "seconds", + "expiry": null, + "expired": false + }, + "description": "You use the following as your base damage thresholds:
Tier 1: 9/19
Tier 2: 11/24
Tier 3: 13/31
Tier 4: 15/38
+1 bonus to your Armor Score until your next rest, or the caster cast's Tava’s Armor again.
", + "description": "Spend a Hope to give a target you can touch a +1 bonus to their Armor Score until their next rest or you cast Tava’s Armor again.
", "tint": "#ffffff", "statuses": [], + "showIcon": 1, + "folder": null, "sort": 0, "flags": {}, "_stats": { "compendiumSource": null }, - "_key": "!items.effects!YtZzYBtR0yLPPA93.LdcT1nrkd5ORCU4n" + "_key": "!items.effects!YtZzYBtR0yLPPA93.OKf8Kjr6Px8A3ubJ" } ], "ownership": { diff --git a/src/packs/domains/domainCard_Valor_Touched_k1AtYd3lSchIymBr.json b/src/packs/domains/domainCard_Valor_Touched_k1AtYd3lSchIymBr.json index 20fe18ea..ee6e377e 100644 --- a/src/packs/domains/domainCard_Valor_Touched_k1AtYd3lSchIymBr.json +++ b/src/packs/domains/domainCard_Valor_Touched_k1AtYd3lSchIymBr.json @@ -91,46 +91,42 @@ "effects": [ { "name": "Valor-Touched", - "type": "base", + "type": "armor", "system": { - "rangeDependence": { - "enabled": false, - "type": "withinRange", - "target": "hostile", - "range": "melee" - } + "changes": [ + { + "key": "system.armorScore", + "type": "armor", + "phase": "initial", + "priority": 20, + "value": 0, + "max": "1" + } + ] }, - "_id": "H9lgIqqp1imSNOv9", + "_id": "JLw50ONfq1KJh1iM", "img": "icons/magic/control/control-influence-rally-purple.webp", - "changes": [ - { - "key": "system.armorScore", - "mode": 2, - "value": "1", - "priority": null - } - ], "disabled": false, + "start": null, "duration": { - "startTime": null, - "combat": null, - "seconds": null, - "rounds": null, - "turns": null, - "startRound": null, - "startTurn": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, - "description": "+1 bonus to your Armor Score
When you mark 1 or more Hit Points without marking an Armor Slot, clear an Armor Slot.
+1 bonus to your Armor Score
", "origin": null, "tint": "#ffffff", "transfer": true, "statuses": [], + "showIcon": 1, + "folder": null, "sort": 0, "flags": {}, "_stats": { "compendiumSource": null }, - "_key": "!items.effects!k1AtYd3lSchIymBr.H9lgIqqp1imSNOv9" + "_key": "!items.effects!k1AtYd3lSchIymBr.JLw50ONfq1KJh1iM" } ], "ownership": { diff --git a/src/packs/domains/folders_Splendor_TL1TutmbeCVJ06nR.json b/src/packs/domains/folders_Splendor_TL1TutmbeCVJ06nR.json index d7032288..9c220def 100644 --- a/src/packs/domains/folders_Splendor_TL1TutmbeCVJ06nR.json +++ b/src/packs/domains/folders_Splendor_TL1TutmbeCVJ06nR.json @@ -6,7 +6,7 @@ "sorting": "m", "_id": "TL1TutmbeCVJ06nR", "description": "", - "sort": 900000, + "sort": 750000, "flags": {}, "_key": "!folders!TL1TutmbeCVJ06nR" } diff --git a/src/packs/items/armors/armor_Bare_Bones_ITAjcigTcUw5pMCN.json b/src/packs/items/armors/armor_Bare_Bones_ITAjcigTcUw5pMCN.json deleted file mode 100644 index e555854d..00000000 --- a/src/packs/items/armors/armor_Bare_Bones_ITAjcigTcUw5pMCN.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "folder": "tI3bfr6Sgi16Z7zm", - "name": "Bare Bones", - "type": "armor", - "_id": "ITAjcigTcUw5pMCN", - "img": "icons/magic/control/buff-strength-muscle-damage.webp", - "system": { - "description": "When you choose not to equip armor, you have a base Armor Score of 3 + your Strength and use the following as your base damage thresholds:
When you choose not to equip armor, you have a base Armor Score of 3 + your Strength and use the following as your base damage thresholds: