diff --git a/lang/en.json b/lang/en.json index 14218311..9f528c14 100755 --- a/lang/en.json +++ b/lang/en.json @@ -751,6 +751,11 @@ "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", @@ -1851,7 +1856,13 @@ "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" + "newArmorEffect": "Armor Effect", + "FIELDS": { + "armorInteraction": { + "label": "Armor Interaction", + "hint": "Does the character wearing armor suppress this effect?" + } + } } }, "GENERAL": { diff --git a/module/applications/sheets-configs/armorActiveEffectConfig.mjs b/module/applications/sheets-configs/armorActiveEffectConfig.mjs index 131558a0..3dca8ef1 100644 --- a/module/applications/sheets-configs/armorActiveEffectConfig.mjs +++ b/module/applications/sheets-configs/armorActiveEffectConfig.mjs @@ -9,6 +9,7 @@ export default class ArmorActiveEffectConfig extends HandlebarsApplicationMixin( submitOnChange: true, closeOnSubmit: false }, + position: { width: 560 }, actions: { finish: ArmorActiveEffectConfig.#finish } @@ -45,6 +46,13 @@ 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 eca4ad6b..2fb1b445 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 += Math.abs(by); + this.value = (this.value ?? 0) + 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 80ac546e..b2833580 100644 --- a/module/config/generalConfig.mjs +++ b/module/config/generalConfig.mjs @@ -890,3 +890,9 @@ 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 d32d24b2..894bf3ff 100644 --- a/module/data/activeEffect/armorEffect.mjs +++ b/module/data/activeEffect/armorEffect.mjs @@ -51,10 +51,30 @@ 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 055267b2..56981c52 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -8,6 +8,8 @@ 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 6bfb32ee..dff85fef 100644 --- a/module/systemRegistration/migrations.mjs +++ b/module/systemRegistration/migrations.mjs @@ -248,9 +248,10 @@ 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'); @@ -259,7 +260,7 @@ export async function runMigrations() { const indexes = []; for (const pack of packs) { const indexValues = pack.index.values().reduce((acc, index) => { - if (index.type === type) acc.push(index.uuid); + if (!type || index.type === type) acc.push(index.uuid); return acc; }, []); @@ -274,54 +275,132 @@ export async function runMigrations() { return indexes; }; - const armorEntries = await getIndexes(itemPacks, 'armor'); - const actorEntries = await getIndexes(actorPacks, 'actor'); + const itemEntries = await getIndexes(itemPacks); + const characterEntries = await getIndexes(actorPacks, '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')); - } + const worldItems = game.items; + const worldCharacters = game.actors.filter(x => x.type === 'character'); /* The async fetches are the mainstay of time. Leaving 1 progress for the sync logic */ - const newMax = armorEntries.length + actorEntries.length + 1; + const newMax = itemEntries.length + characterEntries.length + progressBuffer; progress.updateMax(newMax); - const compendiumArmors = []; - for (const entry of armorEntries) { - const armor = await foundry.utils.fromUuid(entry); - compendiumArmors.push(armor); + const compendiumItems = []; + for (const entry of itemEntries) { + const item = await foundry.utils.fromUuid(entry); + compendiumItems.push(item); progress.advance(); } - for (const entry of actorEntries) { - const actor = await foundry.utils.fromUuid(entry); - compendiumArmors.push(...actor.items.filter(x => x.type === 'armor')); + const compendiumCharacters = []; + for (const entry of characterEntries) { + const character = await foundry.utils.fromUuid(entry); + compendiumCharacters.push(character); progress.advance(); } + //#endregion - 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', [ + /* 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', [ { - ...game.system.api.data.activeEffects.ArmorEffect.getDefaultObject(), - changes: [ - { - type: CONFIG.DH.GENERAL.activeEffectModes.armor.id, - phase: 'initial', - priority: 20, - value: 0, - max: migrationArmorScore.toString() - } - ] + ...changeData.createData, + transfer: relatedActions.length ? false : true } ]); + 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(); + progress.advance({ by: progressBuffer / 2 }); for (let packId of lockedPacks) { const pack = game.packs.get(packId); @@ -330,7 +409,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 cb7bec9f..096be253 100644 --- a/src/packs/domains/domainCard_Armorer_cy8GjBPGc9w9RaGO.json +++ b/src/packs/domains/domainCard_Armorer_cy8GjBPGc9w9RaGO.json @@ -101,31 +101,32 @@ "value": 0, "max": "1" } - ] + ], + "armorInteraction": "active" }, - "_id": "PczrmraHWZ54NJsW", + "_id": "tJw2JIPcT9hEMRXg", "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 }, - "_key": "!items.effects!cy8GjBPGc9w9RaGO.PczrmraHWZ54NJsW" + "start": null, + "showIcon": 1, + "folder": null, + "_key": "!items.effects!cy8GjBPGc9w9RaGO.tJw2JIPcT9hEMRXg" } ], "ownership": { diff --git a/src/packs/domains/domainCard_Bare_Bones_l5D9kq901JDESaXw.json b/src/packs/domains/domainCard_Bare_Bones_l5D9kq901JDESaXw.json index f6474623..40af13a7 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:
Tier 1: 9/19
Tier 2: 11/24
Tier 3: 13/31
Tier 4: 15/38
Equip the below armor to use 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:
Equip the below armor to use Bare Bones.
@UUID[Compendium.daggerheart.armors.Item.ITAjcigTcUw5pMCN]{Bare Bones}
", "domain": "valor", "recallCost": 0, "level": 1, @@ -33,9 +33,10 @@ "phase": "initial", "priority": 20 } - ] + ], + "armorInteraction": "inactive" }, - "_id": "Zn1nNUwjlkbRfbMc", + "_id": "FCsgz7Tdsw6QUzBs", "img": "icons/magic/control/buff-strength-muscle-damage-orange.webp", "disabled": false, "start": null, @@ -45,7 +46,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, @@ -57,7 +58,7 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!l5D9kq901JDESaXw.Zn1nNUwjlkbRfbMc" + "_key": "!items.effects!l5D9kq901JDESaXw.FCsgz7Tdsw6QUzBs" }, { "name": "Bare Bones", @@ -86,7 +87,7 @@ "range": "melee" } }, - "_id": "FazU8RFjMmTpXs7Z", + "_id": "8flPpWNoBeuFPFTK", "img": "icons/magic/control/buff-strength-muscle-damage-orange.webp", "disabled": false, "start": null, @@ -108,7 +109,7 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!l5D9kq901JDESaXw.FazU8RFjMmTpXs7Z" + "_key": "!items.effects!l5D9kq901JDESaXw.8flPpWNoBeuFPFTK" } ], "ownership": { diff --git a/src/packs/domains/domainCard_Book_of_Ava_YtZzYBtR0yLPPA93.json b/src/packs/domains/domainCard_Book_of_Ava_YtZzYBtR0yLPPA93.json index 6dfc851a..da2d75f1 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": "OKf8Kjr6Px8A3ubJ", + "_id": "ptYT10JZ2WJHvFMd", "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": "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.
", + "description": "+1 bonus to your Armor Score until your next rest, or the caster cast's Tava’s Armor again.
", "tint": "#ffffff", "statuses": [], - "showIcon": 1, - "folder": null, "sort": 0, "flags": {}, "_stats": { "compendiumSource": null }, - "_key": "!items.effects!YtZzYBtR0yLPPA93.OKf8Kjr6Px8A3ubJ" + "start": null, + "showIcon": 1, + "folder": null, + "_key": "!items.effects!YtZzYBtR0yLPPA93.ptYT10JZ2WJHvFMd" } ], "ownership": { diff --git a/src/packs/domains/domainCard_Valor_Touched_k1AtYd3lSchIymBr.json b/src/packs/domains/domainCard_Valor_Touched_k1AtYd3lSchIymBr.json index ee6e377e..7df5e095 100644 --- a/src/packs/domains/domainCard_Valor_Touched_k1AtYd3lSchIymBr.json +++ b/src/packs/domains/domainCard_Valor_Touched_k1AtYd3lSchIymBr.json @@ -104,29 +104,29 @@ } ] }, - "_id": "JLw50ONfq1KJh1iM", + "_id": "Ma8Zp005QYKPWIEN", "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
", + "description": "+1 bonus to your Armor Score
When you mark 1 or more Hit Points without marking an Armor Slot, clear an Armor Slot.
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", - "changes": [ - { - "key": "system.armorScore", - "mode": 2, - "value": "ITEM.@system.tier", - "priority": null - } - ], - "_id": "i5HfkF5aKQuUCTEG", - "type": "base", - "system": {}, + "_id": "7285CRGdZfHCEtT2", + "type": "armor", + "system": { + "changes": [ + { + "key": "system.armorScore", + "type": "armor", + "phase": "initial", + "priority": 20, + "value": 0, + "max": "ITEM.@system.tier" + } + ] + }, "disabled": false, "duration": { - "startTime": null, - "combat": null, - "seconds": null, - "rounds": null, - "turns": null, - "startRound": null, - "startTurn": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "origin": null, "tint": "#ffffff", @@ -143,7 +143,10 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!hiEOGF2reabGLUoi.i5HfkF5aKQuUCTEG" + "start": null, + "showIcon": 1, + "folder": null, + "_key": "!items.effects!hiEOGF2reabGLUoi.7285CRGdZfHCEtT2" } ], "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 b2fb16d8..96ac78cb 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": {}, + "system": { + "changes": [ + { + "key": "system.evasion", + "type": "add", + "value": -1, + "phase": "initial", + "priority": 0 + } + ] + }, "disabled": false, "duration": { - "startTime": null, - "combat": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "origin": null, "tint": "#ffffff", @@ -142,7 +142,49 @@ "_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 53a8e9b6..fcd3caed 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", - "changes": [ - { - "key": "system.armorScore", - "mode": 2, - "value": "ITEM.@system.tier", - "priority": null - } - ], - "_id": "cXWSV50apzaNQkdA", - "type": "base", - "system": {}, + "_id": "pZCrWd7zLTarvEQK", + "type": "armor", + "system": { + "changes": [ + { + "key": "system.armorScore", + "type": "armor", + "phase": "initial", + "priority": 20, + "value": 0, + "max": "ITEM.@system.tier" + } + ] + }, "disabled": false, "duration": { - "startTime": null, - "combat": null, - "seconds": null, - "rounds": null, - "turns": null, - "startRound": null, - "startTurn": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "origin": null, "tint": "#ffffff", @@ -143,7 +143,10 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!DlinEBGZfIlvreO3.cXWSV50apzaNQkdA" + "start": null, + "showIcon": 1, + "folder": null, + "_key": "!items.effects!DlinEBGZfIlvreO3.pZCrWd7zLTarvEQK" } ], "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 839d4352..b1b4279f 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": {}, + "system": { + "changes": [ + { + "key": "system.evasion", + "type": "add", + "value": -1, + "phase": "initial", + "priority": 0 + } + ] + }, "disabled": false, "duration": { - "startTime": null, - "combat": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "origin": null, "tint": "#ffffff", @@ -142,7 +142,49 @@ "_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 4958bbe5..2272926c 100644 --- a/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json +++ b/src/packs/items/weapons/weapon_Labrys_Axe_ijWppQzSOqVCb3rE.json @@ -113,20 +113,26 @@ "name": "Protective", "description": "Add your character's Tier to your Armor Score", "img": "icons/skills/melee/shield-block-gray-orange.webp", - "changes": [ - { - "key": "system.armorScore", - "mode": 2, - "value": "ITEM.@system.tier" - } - ], - "_id": "qTxADRsQnKiYfOiQ", - "type": "base", - "system": {}, + "_id": "vnR4Zhnb0rOqwrFw", + "type": "armor", + "system": { + "changes": [ + { + "key": "system.armorScore", + "type": "armor", + "phase": "initial", + "priority": 20, + "value": 0, + "max": "ITEM.@system.tier" + } + ] + }, "disabled": false, "duration": { - "startTime": null, - "combat": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "origin": null, "tint": "#ffffff", @@ -137,7 +143,10 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!ijWppQzSOqVCb3rE.qTxADRsQnKiYfOiQ" + "start": null, + "showIcon": 1, + "folder": null, + "_key": "!items.effects!ijWppQzSOqVCb3rE.vnR4Zhnb0rOqwrFw" } ], "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 c7b18355..81045ea3 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", - "changes": [ - { - "key": "system.armorScore", - "mode": 2, - "value": "ITEM.@system.tier", - "priority": null - } - ], - "_id": "Z2p00q5h6x6seXys", - "type": "base", - "system": {}, + "_id": "EixxJrRHyc6kj3Wg", + "type": "armor", + "system": { + "changes": [ + { + "key": "system.armorScore", + "type": "armor", + "phase": "initial", + "priority": 20, + "value": 0, + "max": "ITEM.@system.tier" + } + ] + }, "disabled": false, "duration": { - "startTime": null, - "combat": null, - "seconds": null, - "rounds": null, - "turns": null, - "startRound": null, - "startTurn": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "origin": null, "tint": "#ffffff", @@ -143,7 +143,10 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!A28WL9E2lJ3iLZHW.Z2p00q5h6x6seXys" + "start": null, + "showIcon": 1, + "folder": null, + "_key": "!items.effects!A28WL9E2lJ3iLZHW.EixxJrRHyc6kj3Wg" } ], "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 47e707d3..6ae5d720 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": {}, + "system": { + "changes": [ + { + "key": "system.evasion", + "type": "add", + "value": -1, + "phase": "initial", + "priority": 0 + } + ] + }, "disabled": false, "duration": { - "startTime": null, - "combat": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "origin": null, "tint": "#ffffff", @@ -142,7 +142,49 @@ "_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 47b096af..d16c550c 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", - "changes": [ - { - "key": "system.armorScore", - "mode": 2, - "value": "ITEM.@system.tier", - "priority": null - } - ], - "_id": "M70a81e0Mg66jHRL", - "type": "base", - "system": {}, + "_id": "eV4lFIpQMiKERj4U", + "type": "armor", + "system": { + "changes": [ + { + "key": "system.armorScore", + "type": "armor", + "phase": "initial", + "priority": 20, + "value": 0, + "max": "ITEM.@system.tier" + } + ] + }, "disabled": false, "duration": { - "startTime": null, - "combat": null, - "seconds": null, - "rounds": null, - "turns": null, - "startRound": null, - "startTurn": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "origin": null, "tint": "#ffffff", @@ -143,7 +143,10 @@ "_stats": { "compendiumSource": null }, - "_key": "!items.effects!mxwWKDujgsRcZWPT.M70a81e0Mg66jHRL" + "start": null, + "showIcon": 1, + "folder": null, + "_key": "!items.effects!mxwWKDujgsRcZWPT.eV4lFIpQMiKERj4U" } ], "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 edadecf9..40e451bd 100644 --- a/src/packs/items/weapons/weapon_Spiked_Shield_vzyzFwLUniWZV1rt.json +++ b/src/packs/items/weapons/weapon_Spiked_Shield_vzyzFwLUniWZV1rt.json @@ -113,32 +113,31 @@ "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": { - "startTime": null, - "combat": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "origin": null, "tint": "#ffffff", @@ -149,7 +148,49 @@ "_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 d49b7de7..9e3e9968 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": {}, + "system": { + "changes": [ + { + "key": "system.evasion", + "type": "add", + "value": -1, + "phase": "initial", + "priority": 0 + } + ] + }, "disabled": false, "duration": { - "startTime": null, - "combat": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "origin": null, "tint": "#ffffff", @@ -142,7 +142,49 @@ "_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 9756edce..fd5c89b1 100644 --- a/styles/less/sheets/activeEffects/armorEffects.less +++ b/styles/less/sheets/activeEffects/armorEffects.less @@ -1,16 +1,5 @@ .application.sheet.daggerheart.dh-style.armor-effect-config { - .armor-effects-container { - display: flex; - flex-direction: column; - gap: 8px; - - .armor-effect-container { - display: flex; - gap: 4px; - - * { - flex: 1; - } - } + .tab-form-footer { + margin-top: 8px; } } diff --git a/templates/sheets/activeEffect/armor/settings.hbs b/templates/sheets/activeEffect/armor/settings.hbs index c0f77b35..12ca2154 100644 --- a/templates/sheets/activeEffect/armor/settings.hbs +++ b/templates/sheets/activeEffect/armor/settings.hbs @@ -1,10 +1,17 @@