diff --git a/lang/en.json b/lang/en.json index 9f528c14..14218311 100755 --- a/lang/en.json +++ b/lang/en.json @@ -751,11 +751,6 @@ "bruiser": "for each Bruiser adversary.", "solo": "for each Solo adversary." }, - "ArmorInteraction": { - "none": { "label": "Ignores Armor" }, - "active": { "label": "Only Active With Armor" }, - "inactive": { "label": "Only Active Without Armor" } - }, "ArmorFeature": { "burning": { "name": "Burning", @@ -1856,13 +1851,7 @@ "transferHint": "If checked, this effect will be applied to any actor that owns this Effect's parent Item. The effect is always applied if this Item is attached to another one." }, "Armor": { - "newArmorEffect": "Armor Effect", - "FIELDS": { - "armorInteraction": { - "label": "Armor Interaction", - "hint": "Does the character wearing armor suppress this effect?" - } - } + "newArmorEffect": "Armor Effect" } }, "GENERAL": { diff --git a/module/applications/sheets-configs/armorActiveEffectConfig.mjs b/module/applications/sheets-configs/armorActiveEffectConfig.mjs index 3dca8ef1..131558a0 100644 --- a/module/applications/sheets-configs/armorActiveEffectConfig.mjs +++ b/module/applications/sheets-configs/armorActiveEffectConfig.mjs @@ -9,7 +9,6 @@ export default class ArmorActiveEffectConfig extends HandlebarsApplicationMixin( submitOnChange: true, closeOnSubmit: false }, - position: { width: 560 }, actions: { finish: ArmorActiveEffectConfig.#finish } @@ -46,13 +45,6 @@ export default class ArmorActiveEffectConfig extends HandlebarsApplicationMixin( const partContext = await super._preparePartContext(partId, context); if (partId in partContext.tabs) partContext.tab = partContext.tabs[partId]; - switch (partId) { - case 'details': - partContext.isActorEffect = this.document.parent?.documentName === 'Actor'; - partContext.isItemEffect = this.document.parent?.documentName === 'Item'; - break; - } - return partContext; } diff --git a/module/applications/ui/progress.mjs b/module/applications/ui/progress.mjs index 2fb1b445..eca4ad6b 100644 --- a/module/applications/ui/progress.mjs +++ b/module/applications/ui/progress.mjs @@ -13,7 +13,7 @@ export default class DhProgress { advance({ by = 1, label = this.label } = {}) { if (this.value === this.max) return; - this.value = (this.value ?? 0) + Math.abs(by); + this.value += Math.abs(by); this.#notification.update({ message: label, pct: this.value / this.max }); } diff --git a/module/config/generalConfig.mjs b/module/config/generalConfig.mjs index b2833580..80ac546e 100644 --- a/module/config/generalConfig.mjs +++ b/module/config/generalConfig.mjs @@ -890,9 +890,3 @@ export const activeEffectModes = { label: 'EFFECT.CHANGES.TYPES.override' } }; - -export const activeEffectArmorInteraction = { - none: { id: 'none', label: 'DAGGERHEART.CONFIG.ArmorInteraction.none.label' }, - active: { id: 'active', label: 'DAGGERHEART.CONFIG.ArmorInteraction.active.label' }, - inactive: { id: 'inactive', label: 'DAGGERHEART.CONFIG.ArmorInteraction.inactive.label' } -}; diff --git a/module/data/activeEffect/armorEffect.mjs b/module/data/activeEffect/armorEffect.mjs index 894bf3ff..d32d24b2 100644 --- a/module/data/activeEffect/armorEffect.mjs +++ b/module/data/activeEffect/armorEffect.mjs @@ -51,30 +51,10 @@ export default class ArmorEffect extends foundry.data.ActiveEffectTypeDataModel } ] } - ), - armorInteraction: new fields.StringField({ - required: true, - choices: CONFIG.DH.GENERAL.activeEffectArmorInteraction, - initial: CONFIG.DH.GENERAL.activeEffectArmorInteraction.none.id, - label: 'DAGGERHEART.EFFECTS.Armor.FIELDS.armorInteraction.label', - hint: 'DAGGERHEART.EFFECTS.Armor.FIELDS.armorInteraction.hint' - }) + ) }; } - get isSuppressed() { - if (this.parent.actor?.type !== 'character') return false; - - switch (this.armorInteraction) { - case CONFIG.DH.GENERAL.activeEffectArmorInteraction.active.id: - return !this.parent.actor.system.armor; - case CONFIG.DH.GENERAL.activeEffectArmorInteraction.inactive.id: - return Boolean(this.parent.actor.system.armor); - default: - return false; - } - } - /* Type Functions */ /** diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index 56981c52..055267b2 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -8,8 +8,6 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { /**@override */ get isSuppressed() { - if (this.system.isSuppressed === true) return true; - // If this is a copied effect from an attachment, never suppress it // (These effects have attachmentSource metadata) if (this.flags?.daggerheart?.attachmentSource) { diff --git a/module/systemRegistration/migrations.mjs b/module/systemRegistration/migrations.mjs index dff85fef..6bfb32ee 100644 --- a/module/systemRegistration/migrations.mjs +++ b/module/systemRegistration/migrations.mjs @@ -248,10 +248,9 @@ export async function runMigrations() { } if (foundry.utils.isNewerVersion('2.0.0', lastMigrationVersion)) { + /* Migrate existing armors to the new Armor Effects */ const progress = game.system.api.applications.ui.DhProgress.createMigrationProgress(0); - const progressBuffer = 50; - //#region Data Setup const lockedPacks = []; const itemPacks = game.packs.filter(x => x.metadata.type === 'Item'); const actorPacks = game.packs.filter(x => x.metadata.type === 'Actor'); @@ -260,7 +259,7 @@ export async function runMigrations() { const indexes = []; for (const pack of packs) { const indexValues = pack.index.values().reduce((acc, index) => { - if (!type || index.type === type) acc.push(index.uuid); + if (index.type === type) acc.push(index.uuid); return acc; }, []); @@ -275,132 +274,54 @@ export async function runMigrations() { return indexes; }; - const itemEntries = await getIndexes(itemPacks); - const characterEntries = await getIndexes(actorPacks, 'character'); + const armorEntries = await getIndexes(itemPacks, 'armor'); + const actorEntries = await getIndexes(actorPacks, 'actor'); - const worldItems = game.items; - const worldCharacters = game.actors.filter(x => x.type === 'character'); + const worldArmors = game.items.filter(x => x instanceof game.system.api.documents.DHItem && x.type === 'armor'); + + for (const character of game.actors.filter(x => x.type === 'character')) { + worldArmors.push(...character.items.filter(x => x.type === 'armor')); + } /* The async fetches are the mainstay of time. Leaving 1 progress for the sync logic */ - const newMax = itemEntries.length + characterEntries.length + progressBuffer; + const newMax = armorEntries.length + actorEntries.length + 1; progress.updateMax(newMax); - const compendiumItems = []; - for (const entry of itemEntries) { - const item = await foundry.utils.fromUuid(entry); - compendiumItems.push(item); + const compendiumArmors = []; + for (const entry of armorEntries) { + const armor = await foundry.utils.fromUuid(entry); + compendiumArmors.push(armor); progress.advance(); } - const compendiumCharacters = []; - for (const entry of characterEntries) { - const character = await foundry.utils.fromUuid(entry); - compendiumCharacters.push(character); + for (const entry of actorEntries) { + const actor = await foundry.utils.fromUuid(entry); + compendiumArmors.push(...actor.items.filter(x => x.type === 'armor')); progress.advance(); } - //#endregion - /* Migrate existing effects modifying armor, creating new Armor Effects instead */ - const migrateEffects = async entity => { - const effectChangeData = []; - for (const effect of entity.effects) { - const oldArmorChanges = effect.system.changes.filter(x => x.key === 'system.armorScore'); - if (!oldArmorChanges.length) continue; - - const changeData = {}; - const newChanges = effect.system.changes.filter(x => x.key !== 'system.armorScore'); - if (newChanges.length) { - await effect.update({ 'system.changes': newChanges }); - } else { - changeData.deleteId = effect.id; - } - - const oldEffectData = effect.toObject(); - changeData.createData = { - ...oldEffectData, - type: 'armor', - system: { - ...oldEffectData.sytem, - changes: oldArmorChanges.map(change => ({ - key: 'system.armorScore', - type: CONFIG.DH.GENERAL.activeEffectModes.armor.id, - phase: 'initial', - priority: 20, - value: 0, - max: change.value - })) - } - }; - effectChangeData.push(changeData); - } - - for (const changeData of effectChangeData) { - const relatedActions = Array.from(entity.system.actions ?? []).filter(x => - x.effects.some(effect => effect._id === changeData.deleteId) - ); - const [newEffect] = await entity.createEmbeddedDocuments('ActiveEffect', [ + for (const armor of [...compendiumArmors, ...worldArmors]) { + const hasArmorEffect = armor.effects.some(x => x.type === 'armor'); + const migrationArmorScore = armor.flags.daggerheart?.baseScoreMigrationValue; + if (migrationArmorScore !== undefined && !hasArmorEffect) { + await armor.createEmbeddedDocuments('ActiveEffect', [ { - ...changeData.createData, - transfer: relatedActions.length ? false : true + ...game.system.api.data.activeEffects.ArmorEffect.getDefaultObject(), + changes: [ + { + type: CONFIG.DH.GENERAL.activeEffectModes.armor.id, + phase: 'initial', + priority: 20, + value: 0, + max: migrationArmorScore.toString() + } + ] } ]); - for (const action of relatedActions) { - await action.update({ - effects: action.effects.map(effect => ({ - ...effect, - _id: effect._id === changeData.deleteId ? newEffect.id : effect._id - })) - }); - } } - - await entity.deleteEmbeddedDocuments( - 'ActiveEffect', - effectChangeData.reduce((acc, data) => { - if (data.deleteId) acc.push(data.deleteId); - return acc; - }, []) - ); - }; - - /* Migrate existing armors to the new Armor Effects */ - const migrateItems = async items => { - for (const item of items) { - await migrateEffects(item); - - if (item instanceof game.system.api.documents.DHItem && item.type === 'armor') { - const hasArmorEffect = item.effects.some(x => x.type === 'armor'); - const migrationArmorScore = item.flags.daggerheart?.baseScoreMigrationValue; - if (migrationArmorScore !== undefined && !hasArmorEffect) { - await item.createEmbeddedDocuments('ActiveEffect', [ - { - ...game.system.api.data.activeEffects.ArmorEffect.getDefaultObject(), - changes: [ - { - key: 'system.armorScore', - type: CONFIG.DH.GENERAL.activeEffectModes.armor.id, - phase: 'initial', - priority: 20, - value: 0, - max: migrationArmorScore.toString() - } - ] - } - ]); - } - } - } - }; - - await migrateItems([...compendiumItems, ...worldItems]); - progress.advance({ by: progressBuffer / 2 }); - - for (const actor of [...compendiumCharacters, ...worldCharacters]) { - await migrateEffects(actor); - await migrateItems(actor.items); } - progress.advance({ by: progressBuffer / 2 }); + progress.advance(); for (let packId of lockedPacks) { const pack = game.packs.get(packId); @@ -409,7 +330,7 @@ export async function runMigrations() { progress.close(); - lastMigrationVersion = '2.0.0'; + // lastMigrationVersion = '2.0.0'; } //#endregion diff --git a/src/packs/domains/domainCard_Armorer_cy8GjBPGc9w9RaGO.json b/src/packs/domains/domainCard_Armorer_cy8GjBPGc9w9RaGO.json index 096be253..cb7bec9f 100644 --- a/src/packs/domains/domainCard_Armorer_cy8GjBPGc9w9RaGO.json +++ b/src/packs/domains/domainCard_Armorer_cy8GjBPGc9w9RaGO.json @@ -101,32 +101,31 @@ "value": 0, "max": "1" } - ], - "armorInteraction": "active" + ] }, - "_id": "tJw2JIPcT9hEMRXg", + "_id": "PczrmraHWZ54NJsW", "img": "icons/tools/hand/hammer-and-nail.webp", "disabled": false, + "start": null, "duration": { "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 }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!cy8GjBPGc9w9RaGO.tJw2JIPcT9hEMRXg" + "_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 40af13a7..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, @@ -33,10 +33,9 @@ "phase": "initial", "priority": 20 } - ], - "armorInteraction": "inactive" + ] }, - "_id": "FCsgz7Tdsw6QUzBs", + "_id": "Zn1nNUwjlkbRfbMc", "img": "icons/magic/control/buff-strength-muscle-damage-orange.webp", "disabled": false, "start": null, @@ -46,7 +45,7 @@ "expiry": null, "expired": false }, - "description": "You have a base Armor Score of 3 + your Strength.
", + "description": "You have a base Armor Score of 3 + your Strength
", "origin": null, "tint": "#ffffff", "transfer": true, @@ -58,7 +57,7 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!l5D9kq901JDESaXw.FCsgz7Tdsw6QUzBs" + "_key": "!items.effects!l5D9kq901JDESaXw.Zn1nNUwjlkbRfbMc" }, { "name": "Bare Bones", @@ -87,7 +86,7 @@ "range": "melee" } }, - "_id": "8flPpWNoBeuFPFTK", + "_id": "FazU8RFjMmTpXs7Z", "img": "icons/magic/control/buff-strength-muscle-damage-orange.webp", "disabled": false, "start": null, @@ -109,7 +108,7 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!l5D9kq901JDESaXw.8flPpWNoBeuFPFTK" + "_key": "!items.effects!l5D9kq901JDESaXw.FazU8RFjMmTpXs7Z" } ], "ownership": { diff --git a/src/packs/domains/domainCard_Book_of_Ava_YtZzYBtR0yLPPA93.json b/src/packs/domains/domainCard_Book_of_Ava_YtZzYBtR0yLPPA93.json index da2d75f1..6dfc851a 100644 --- a/src/packs/domains/domainCard_Book_of_Ava_YtZzYBtR0yLPPA93.json +++ b/src/packs/domains/domainCard_Book_of_Ava_YtZzYBtR0yLPPA93.json @@ -105,7 +105,7 @@ }, "effects": [ { - "_id": "ptYT10JZ2WJHvFMd", + "_id": "OKf8Kjr6Px8A3ubJ", "onSave": false } ], @@ -252,8 +252,8 @@ "img": "icons/magic/defensive/shield-barrier-glowing-triangle-blue.webp", "origin": "Compendium.daggerheart.domains.Item.YtZzYBtR0yLPPA93", "transfer": false, - "_id": "ptYT10JZ2WJHvFMd", "type": "armor", + "_id": "OKf8Kjr6Px8A3ubJ", "system": { "changes": [ { @@ -267,24 +267,24 @@ ] }, "disabled": false, + "start": null, "duration": { "value": null, "units": "seconds", "expiry": null, "expired": false }, - "description": "+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 }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!YtZzYBtR0yLPPA93.ptYT10JZ2WJHvFMd" + "_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 7df5e095..ee6e377e 100644 --- a/src/packs/domains/domainCard_Valor_Touched_k1AtYd3lSchIymBr.json +++ b/src/packs/domains/domainCard_Valor_Touched_k1AtYd3lSchIymBr.json @@ -104,29 +104,29 @@ } ] }, - "_id": "Ma8Zp005QYKPWIEN", + "_id": "JLw50ONfq1KJh1iM", "img": "icons/magic/control/control-influence-rally-purple.webp", "disabled": false, + "start": null, "duration": { "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 }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!k1AtYd3lSchIymBr.Ma8Zp005QYKPWIEN" + "_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_Advanced_Chainmail_Armor_LzLOJ9EVaHWAjoq9.json b/src/packs/items/armors/armor_Advanced_Chainmail_Armor_LzLOJ9EVaHWAjoq9.json index 91b1f890..7287d027 100644 --- a/src/packs/items/armors/armor_Advanced_Chainmail_Armor_LzLOJ9EVaHWAjoq9.json +++ b/src/packs/items/armors/armor_Advanced_Chainmail_Armor_LzLOJ9EVaHWAjoq9.json @@ -71,16 +71,16 @@ "system": { "changes": [ { - "key": "system.armorScore", "type": "armor", "phase": "initial", "priority": 20, "value": 0, - "max": "6" + "max": "6", + "key": "system.armorScore" } ] }, - "_id": "YehcKtTeJ18q0THd", + "_id": "xU3zAv0sBiOGAE4i", "disabled": false, "start": null, "duration": { @@ -101,7 +101,7 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!LzLOJ9EVaHWAjoq9.YehcKtTeJ18q0THd" + "_key": "!items.effects!LzLOJ9EVaHWAjoq9.xU3zAv0sBiOGAE4i" } ], "sort": 0, diff --git a/src/packs/items/armors/armor_Advanced_Full_Plate_Armor_crIbCb9NZ4K0VpoU.json b/src/packs/items/armors/armor_Advanced_Full_Plate_Armor_crIbCb9NZ4K0VpoU.json index f1dd3086..6522c67a 100644 --- a/src/packs/items/armors/armor_Advanced_Full_Plate_Armor_crIbCb9NZ4K0VpoU.json +++ b/src/packs/items/armors/armor_Advanced_Full_Plate_Armor_crIbCb9NZ4K0VpoU.json @@ -76,16 +76,16 @@ "system": { "changes": [ { - "key": "system.armorScore", "type": "armor", "phase": "initial", "priority": 20, "value": 0, - "max": "6" + "max": "6", + "key": "system.armorScore" } ] }, - "_id": "Xp0MlTLdCe2oP36X", + "_id": "TMxnzDzCmVibJWQ0", "disabled": false, "start": null, "duration": { @@ -106,7 +106,7 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!crIbCb9NZ4K0VpoU.Xp0MlTLdCe2oP36X" + "_key": "!items.effects!crIbCb9NZ4K0VpoU.TMxnzDzCmVibJWQ0" } ], "sort": 0, diff --git a/src/packs/items/armors/armor_Advanced_Gambeson_Armor_epkAmlZVk7HOfUUT.json b/src/packs/items/armors/armor_Advanced_Gambeson_Armor_epkAmlZVk7HOfUUT.json index 1618fe85..d9ee9649 100644 --- a/src/packs/items/armors/armor_Advanced_Gambeson_Armor_epkAmlZVk7HOfUUT.json +++ b/src/packs/items/armors/armor_Advanced_Gambeson_Armor_epkAmlZVk7HOfUUT.json @@ -71,16 +71,16 @@ "system": { "changes": [ { - "key": "system.armorScore", "type": "armor", "phase": "initial", "priority": 20, "value": 0, - "max": "5" + "max": "5", + "key": "system.armorScore" } ] }, - "_id": "GyPhsm7zLznZDfN2", + "_id": "HxZEKljAth8b5Wcv", "disabled": false, "start": null, "duration": { @@ -101,7 +101,7 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!epkAmlZVk7HOfUUT.GyPhsm7zLznZDfN2" + "_key": "!items.effects!epkAmlZVk7HOfUUT.HxZEKljAth8b5Wcv" } ], "sort": 0, diff --git a/src/packs/items/armors/armor_Advanced_Leather_Armor_itSOp2GCyem0f7oM.json b/src/packs/items/armors/armor_Advanced_Leather_Armor_itSOp2GCyem0f7oM.json index b7a63b40..09a45a8a 100644 --- a/src/packs/items/armors/armor_Advanced_Leather_Armor_itSOp2GCyem0f7oM.json +++ b/src/packs/items/armors/armor_Advanced_Leather_Armor_itSOp2GCyem0f7oM.json @@ -33,16 +33,16 @@ "system": { "changes": [ { - "key": "system.armorScore", "type": "armor", "phase": "initial", "priority": 20, "value": 0, - "max": "5" + "max": "5", + "key": "system.armorScore" } ] }, - "_id": "XJueICAnl5vu2q2U", + "_id": "jSGmBv0I5FhxmTen", "disabled": false, "start": null, "duration": { @@ -63,7 +63,7 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!itSOp2GCyem0f7oM.XJueICAnl5vu2q2U" + "_key": "!items.effects!itSOp2GCyem0f7oM.jSGmBv0I5FhxmTen" } ], "sort": 0, 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 a0b2aae3..00000000 --- a/src/packs/items/armors/armor_Bare_Bones_ITAjcigTcUw5pMCN.json +++ /dev/null @@ -1,71 +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:
Add the item's Tier to your Armor Score
", "img": "icons/skills/melee/shield-block-gray-orange.webp", - "_id": "7285CRGdZfHCEtT2", - "type": "armor", - "system": { - "changes": [ - { - "key": "system.armorScore", - "type": "armor", - "phase": "initial", - "priority": 20, - "value": 0, - "max": "ITEM.@system.tier" - } - ] - }, + "changes": [ + { + "key": "system.armorScore", + "mode": 2, + "value": "ITEM.@system.tier", + "priority": null + } + ], + "_id": "i5HfkF5aKQuUCTEG", + "type": "base", + "system": {}, "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null }, "origin": null, "tint": "#ffffff", @@ -143,10 +143,7 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!hiEOGF2reabGLUoi.7285CRGdZfHCEtT2" + "_key": "!items.effects!hiEOGF2reabGLUoi.i5HfkF5aKQuUCTEG" } ], "sort": 0, diff --git a/src/packs/items/weapons/weapon_Advanced_Tower_Shield_OfOzQbs4hg6QbfTG.json b/src/packs/items/weapons/weapon_Advanced_Tower_Shield_OfOzQbs4hg6QbfTG.json index 96ac78cb..b2fb16d8 100644 --- a/src/packs/items/weapons/weapon_Advanced_Tower_Shield_OfOzQbs4hg6QbfTG.json +++ b/src/packs/items/weapons/weapon_Advanced_Tower_Shield_OfOzQbs4hg6QbfTG.json @@ -113,25 +113,25 @@ "name": "Barrier", "description": "Gain Weapon Tier + 1 to Armor Score; -1 to Evasion", "img": "icons/skills/melee/shield-block-bash-blue.webp", + "changes": [ + { + "key": "system.armorScore", + "mode": 2, + "value": "ITEM.@system.tier + 1" + }, + { + "key": "system.evasion", + "mode": 2, + "value": "-1" + } + ], "_id": "87gedjJZGdFY81Mt", "type": "base", - "system": { - "changes": [ - { - "key": "system.evasion", - "type": "add", - "value": -1, - "phase": "initial", - "priority": 0 - } - ] - }, + "system": {}, "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null }, "origin": null, "tint": "#ffffff", @@ -142,49 +142,7 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, "_key": "!items.effects!OfOzQbs4hg6QbfTG.87gedjJZGdFY81Mt" - }, - { - "name": "Barrier", - "description": "Gain Weapon Tier + 1 to Armor Score; -1 to Evasion", - "img": "icons/skills/melee/shield-block-bash-blue.webp", - "_id": "J0f7zqqOr61ADpdy", - "type": "armor", - "system": { - "changes": [ - { - "key": "system.armorScore", - "type": "armor", - "phase": "initial", - "priority": 20, - "value": 0, - "max": "ITEM.@system.tier + 1" - } - ] - }, - "disabled": false, - "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false - }, - "origin": null, - "tint": "#ffffff", - "transfer": true, - "statuses": [], - "sort": 0, - "flags": {}, - "_stats": { - "compendiumSource": null - }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!OfOzQbs4hg6QbfTG.J0f7zqqOr61ADpdy" } ], "sort": 0, diff --git a/src/packs/items/weapons/weapon_Improved_Round_Shield_DlinEBGZfIlvreO3.json b/src/packs/items/weapons/weapon_Improved_Round_Shield_DlinEBGZfIlvreO3.json index fcd3caed..53a8e9b6 100644 --- a/src/packs/items/weapons/weapon_Improved_Round_Shield_DlinEBGZfIlvreO3.json +++ b/src/packs/items/weapons/weapon_Improved_Round_Shield_DlinEBGZfIlvreO3.json @@ -113,26 +113,26 @@ "name": "Protective", "description": "Add the item's Tier to your Armor Score
", "img": "icons/skills/melee/shield-block-gray-orange.webp", - "_id": "pZCrWd7zLTarvEQK", - "type": "armor", - "system": { - "changes": [ - { - "key": "system.armorScore", - "type": "armor", - "phase": "initial", - "priority": 20, - "value": 0, - "max": "ITEM.@system.tier" - } - ] - }, + "changes": [ + { + "key": "system.armorScore", + "mode": 2, + "value": "ITEM.@system.tier", + "priority": null + } + ], + "_id": "cXWSV50apzaNQkdA", + "type": "base", + "system": {}, "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null }, "origin": null, "tint": "#ffffff", @@ -143,10 +143,7 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!DlinEBGZfIlvreO3.pZCrWd7zLTarvEQK" + "_key": "!items.effects!DlinEBGZfIlvreO3.cXWSV50apzaNQkdA" } ], "sort": 0, diff --git a/src/packs/items/weapons/weapon_Improved_Tower_Shield_bxt3NsbMqTSdI5ab.json b/src/packs/items/weapons/weapon_Improved_Tower_Shield_bxt3NsbMqTSdI5ab.json index b1b4279f..839d4352 100644 --- a/src/packs/items/weapons/weapon_Improved_Tower_Shield_bxt3NsbMqTSdI5ab.json +++ b/src/packs/items/weapons/weapon_Improved_Tower_Shield_bxt3NsbMqTSdI5ab.json @@ -113,25 +113,25 @@ "name": "Barrier", "description": "Gain Weapon Tier + 1 to Armor Score; -1 to Evasion", "img": "icons/skills/melee/shield-block-bash-blue.webp", + "changes": [ + { + "key": "system.armorScore", + "mode": 2, + "value": "ITEM.@system.tier + 1" + }, + { + "key": "system.evasion", + "mode": 2, + "value": "-1" + } + ], "_id": "tkNEA1PO3jEFhKCa", "type": "base", - "system": { - "changes": [ - { - "key": "system.evasion", - "type": "add", - "value": -1, - "phase": "initial", - "priority": 0 - } - ] - }, + "system": {}, "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null }, "origin": null, "tint": "#ffffff", @@ -142,49 +142,7 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, "_key": "!items.effects!bxt3NsbMqTSdI5ab.tkNEA1PO3jEFhKCa" - }, - { - "name": "Barrier", - "description": "Gain Weapon Tier + 1 to Armor Score; -1 to Evasion", - "img": "icons/skills/melee/shield-block-bash-blue.webp", - "_id": "XugJeHJdnC6IymSa", - "type": "armor", - "system": { - "changes": [ - { - "key": "system.armorScore", - "type": "armor", - "phase": "initial", - "priority": 20, - "value": 0, - "max": "ITEM.@system.tier + 1" - } - ] - }, - "disabled": false, - "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false - }, - "origin": null, - "tint": "#ffffff", - "transfer": true, - "statuses": [], - "sort": 0, - "flags": {}, - "_stats": { - "compendiumSource": null - }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!bxt3NsbMqTSdI5ab.XugJeHJdnC6IymSa" } ], "sort": 0, diff --git a/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json b/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json index 2272926c..4958bbe5 100644 --- a/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json +++ b/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json @@ -113,26 +113,20 @@ "name": "Protective", "description": "Add your character's Tier to your Armor Score", "img": "icons/skills/melee/shield-block-gray-orange.webp", - "_id": "vnR4Zhnb0rOqwrFw", - "type": "armor", - "system": { - "changes": [ - { - "key": "system.armorScore", - "type": "armor", - "phase": "initial", - "priority": 20, - "value": 0, - "max": "ITEM.@system.tier" - } - ] - }, + "changes": [ + { + "key": "system.armorScore", + "mode": 2, + "value": "ITEM.@system.tier" + } + ], + "_id": "qTxADRsQnKiYfOiQ", + "type": "base", + "system": {}, "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null }, "origin": null, "tint": "#ffffff", @@ -143,10 +137,7 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!ijWppQzSOqVCb3rE.vnR4Zhnb0rOqwrFw" + "_key": "!items.effects!ijWppQzSOqVCb3rE.qTxADRsQnKiYfOiQ" } ], "sort": 0, diff --git a/src/packs/items/weapons/weapon_Legendary_Round_Shield_A28WL9E2lJ3iLZHW.json b/src/packs/items/weapons/weapon_Legendary_Round_Shield_A28WL9E2lJ3iLZHW.json index 81045ea3..c7b18355 100644 --- a/src/packs/items/weapons/weapon_Legendary_Round_Shield_A28WL9E2lJ3iLZHW.json +++ b/src/packs/items/weapons/weapon_Legendary_Round_Shield_A28WL9E2lJ3iLZHW.json @@ -113,26 +113,26 @@ "name": "Protective", "description": "Add the item's Tier to your Armor Score
", "img": "icons/skills/melee/shield-block-gray-orange.webp", - "_id": "EixxJrRHyc6kj3Wg", - "type": "armor", - "system": { - "changes": [ - { - "key": "system.armorScore", - "type": "armor", - "phase": "initial", - "priority": 20, - "value": 0, - "max": "ITEM.@system.tier" - } - ] - }, + "changes": [ + { + "key": "system.armorScore", + "mode": 2, + "value": "ITEM.@system.tier", + "priority": null + } + ], + "_id": "Z2p00q5h6x6seXys", + "type": "base", + "system": {}, "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null }, "origin": null, "tint": "#ffffff", @@ -143,10 +143,7 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!A28WL9E2lJ3iLZHW.EixxJrRHyc6kj3Wg" + "_key": "!items.effects!A28WL9E2lJ3iLZHW.Z2p00q5h6x6seXys" } ], "sort": 0, diff --git a/src/packs/items/weapons/weapon_Legendary_Tower_Shield_MaJIROht7A9LxIZx.json b/src/packs/items/weapons/weapon_Legendary_Tower_Shield_MaJIROht7A9LxIZx.json index 6ae5d720..47e707d3 100644 --- a/src/packs/items/weapons/weapon_Legendary_Tower_Shield_MaJIROht7A9LxIZx.json +++ b/src/packs/items/weapons/weapon_Legendary_Tower_Shield_MaJIROht7A9LxIZx.json @@ -113,25 +113,25 @@ "name": "Barrier", "description": "Gain Weapon Tier + 1 to Armor Score; -1 to Evasion", "img": "icons/skills/melee/shield-block-bash-blue.webp", + "changes": [ + { + "key": "system.armorScore", + "mode": 2, + "value": "ITEM.@system.tier + 1" + }, + { + "key": "system.evasion", + "mode": 2, + "value": "-1" + } + ], "_id": "lBJMzxdGO2nJdTQS", "type": "base", - "system": { - "changes": [ - { - "key": "system.evasion", - "type": "add", - "value": -1, - "phase": "initial", - "priority": 0 - } - ] - }, + "system": {}, "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null }, "origin": null, "tint": "#ffffff", @@ -142,49 +142,7 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, "_key": "!items.effects!MaJIROht7A9LxIZx.lBJMzxdGO2nJdTQS" - }, - { - "name": "Barrier", - "description": "Gain Weapon Tier + 1 to Armor Score; -1 to Evasion", - "img": "icons/skills/melee/shield-block-bash-blue.webp", - "_id": "1fgUIaXl6VQrhP7j", - "type": "armor", - "system": { - "changes": [ - { - "key": "system.armorScore", - "type": "armor", - "phase": "initial", - "priority": 20, - "value": 0, - "max": "ITEM.@system.tier + 1" - } - ] - }, - "disabled": false, - "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false - }, - "origin": null, - "tint": "#ffffff", - "transfer": true, - "statuses": [], - "sort": 0, - "flags": {}, - "_stats": { - "compendiumSource": null - }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!MaJIROht7A9LxIZx.1fgUIaXl6VQrhP7j" } ], "sort": 0, diff --git a/src/packs/items/weapons/weapon_Round_Shield_mxwWKDujgsRcZWPT.json b/src/packs/items/weapons/weapon_Round_Shield_mxwWKDujgsRcZWPT.json index d16c550c..47b096af 100644 --- a/src/packs/items/weapons/weapon_Round_Shield_mxwWKDujgsRcZWPT.json +++ b/src/packs/items/weapons/weapon_Round_Shield_mxwWKDujgsRcZWPT.json @@ -113,26 +113,26 @@ "name": "Protective", "description": "Add the item's Tier to your Armor Score
", "img": "icons/skills/melee/shield-block-gray-orange.webp", - "_id": "eV4lFIpQMiKERj4U", - "type": "armor", - "system": { - "changes": [ - { - "key": "system.armorScore", - "type": "armor", - "phase": "initial", - "priority": 20, - "value": 0, - "max": "ITEM.@system.tier" - } - ] - }, + "changes": [ + { + "key": "system.armorScore", + "mode": 2, + "value": "ITEM.@system.tier", + "priority": null + } + ], + "_id": "M70a81e0Mg66jHRL", + "type": "base", + "system": {}, "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null }, "origin": null, "tint": "#ffffff", @@ -143,10 +143,7 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!mxwWKDujgsRcZWPT.eV4lFIpQMiKERj4U" + "_key": "!items.effects!mxwWKDujgsRcZWPT.M70a81e0Mg66jHRL" } ], "sort": 0, diff --git a/src/packs/items/weapons/weapon_Spiked_Shield_vzyzFwLUniWZV1rt.json b/src/packs/items/weapons/weapon_Spiked_Shield_vzyzFwLUniWZV1rt.json index 40e451bd..edadecf9 100644 --- a/src/packs/items/weapons/weapon_Spiked_Shield_vzyzFwLUniWZV1rt.json +++ b/src/packs/items/weapons/weapon_Spiked_Shield_vzyzFwLUniWZV1rt.json @@ -113,31 +113,32 @@ "name": "Double Duty", "description": "+1 to Armor Score; +1 to primary weapon damage within Melee range", "img": "icons/skills/melee/sword-shield-stylized-white.webp", + "changes": [ + { + "key": "system.armorScore", + "mode": 2, + "value": "1" + }, + { + "key": "system.bonuses.damage.primaryWeapon.bonus", + "mode": 2, + "value": "1" + } + ], "system": { "rangeDependence": { "enabled": true, "range": "melee", "target": "hostile", "type": "withinRange" - }, - "changes": [ - { - "key": "system.bonuses.damage.primaryWeapon.bonus", - "type": "add", - "value": 1, - "phase": "initial", - "priority": 0 - } - ] + } }, "_id": "d3TJtlpoHBCztbom", "type": "base", "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null }, "origin": null, "tint": "#ffffff", @@ -148,49 +149,7 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, "_key": "!items.effects!vzyzFwLUniWZV1rt.d3TJtlpoHBCztbom" - }, - { - "name": "Double Duty", - "description": "+1 to Armor Score; +1 to primary weapon damage within Melee range", - "img": "icons/skills/melee/sword-shield-stylized-white.webp", - "system": { - "changes": [ - { - "key": "system.armorScore", - "type": "armor", - "phase": "initial", - "priority": 20, - "value": 0, - "max": "1" - } - ] - }, - "_id": "mvUY9LGfwICak7cE", - "type": "armor", - "disabled": false, - "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false - }, - "origin": null, - "tint": "#ffffff", - "transfer": true, - "statuses": [], - "sort": 0, - "flags": {}, - "_stats": { - "compendiumSource": null - }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!vzyzFwLUniWZV1rt.mvUY9LGfwICak7cE" } ], "sort": 0, diff --git a/src/packs/items/weapons/weapon_Tower_Shield_C9aWpK1shVMWP4m5.json b/src/packs/items/weapons/weapon_Tower_Shield_C9aWpK1shVMWP4m5.json index 9e3e9968..d49b7de7 100644 --- a/src/packs/items/weapons/weapon_Tower_Shield_C9aWpK1shVMWP4m5.json +++ b/src/packs/items/weapons/weapon_Tower_Shield_C9aWpK1shVMWP4m5.json @@ -113,25 +113,25 @@ "name": "Barrier", "description": "Gain Weapon Tier + 1 to Armor Score; -1 to Evasion", "img": "icons/skills/melee/shield-block-bash-blue.webp", + "changes": [ + { + "key": "system.armorScore", + "mode": 2, + "value": "ITEM.@system.tier + 1" + }, + { + "key": "system.evasion", + "mode": 2, + "value": "-1" + } + ], "_id": "8r0TcKWXboFV0eqS", "type": "base", - "system": { - "changes": [ - { - "key": "system.evasion", - "type": "add", - "value": -1, - "phase": "initial", - "priority": 0 - } - ] - }, + "system": {}, "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null }, "origin": null, "tint": "#ffffff", @@ -142,49 +142,7 @@ "_stats": { "compendiumSource": null }, - "start": null, - "showIcon": 1, - "folder": null, "_key": "!items.effects!C9aWpK1shVMWP4m5.8r0TcKWXboFV0eqS" - }, - { - "name": "Barrier", - "description": "Gain Weapon Tier + 1 to Armor Score; -1 to Evasion", - "img": "icons/skills/melee/shield-block-bash-blue.webp", - "_id": "tLRc4UAnGuIq7er3", - "type": "armor", - "system": { - "changes": [ - { - "key": "system.armorScore", - "type": "armor", - "phase": "initial", - "priority": 20, - "value": 0, - "max": "ITEM.@system.tier + 1" - } - ] - }, - "disabled": false, - "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false - }, - "origin": null, - "tint": "#ffffff", - "transfer": true, - "statuses": [], - "sort": 0, - "flags": {}, - "_stats": { - "compendiumSource": null - }, - "start": null, - "showIcon": 1, - "folder": null, - "_key": "!items.effects!C9aWpK1shVMWP4m5.tLRc4UAnGuIq7er3" } ], "sort": 0, diff --git a/styles/less/sheets/activeEffects/armorEffects.less b/styles/less/sheets/activeEffects/armorEffects.less index fd5c89b1..9756edce 100644 --- a/styles/less/sheets/activeEffects/armorEffects.less +++ b/styles/less/sheets/activeEffects/armorEffects.less @@ -1,5 +1,16 @@ .application.sheet.daggerheart.dh-style.armor-effect-config { - .tab-form-footer { - margin-top: 8px; + .armor-effects-container { + display: flex; + flex-direction: column; + gap: 8px; + + .armor-effect-container { + display: flex; + gap: 4px; + + * { + flex: 1; + } + } } } diff --git a/templates/sheets/activeEffect/armor/settings.hbs b/templates/sheets/activeEffect/armor/settings.hbs index 12ca2154..c0f77b35 100644 --- a/templates/sheets/activeEffect/armor/settings.hbs +++ b/templates/sheets/activeEffect/armor/settings.hbs @@ -1,17 +1,10 @@