diff --git a/scripts/ikonis-data.js b/scripts/ikonis-data.js index c9cde24..3902cc5 100644 --- a/scripts/ikonis-data.js +++ b/scripts/ikonis-data.js @@ -1,5 +1,46 @@ export const DEFAULT_AUGMENTS = [ - { id: "bonded", name: "Bonded", effect: "Primary module for Ikonis hardware synchronization.", cost: "Cost: None" }, + { + id: "bonded", + name: "Bonded", + effect: "Primary module for Ikonis hardware synchronization.", + cost: "Cost: None", + img: "icons/magic/control/debuff-energy-hold-blue-yellow.webp", + effects: [ + { + name: "Ikonis: Bonded", + type: "base", + img: "icons/magic/control/debuff-energy-hold-blue-yellow.webp", + system: { + changes: [ + { + key: "system.bonuses.damage.primaryWeapon.bonus", + type: "add", + value: "@tier", + priority: null, + phase: "initial" + } + ], + duration: { + description: "", + type: "" + }, + rangeDependence: { + enabled: false, + type: "withinRange", + target: "hostile", + range: "melee" + }, + stacking: null, + targetDispositions: [] + }, + disabled: false, + transfer: true, + statuses: [], + showIcon: 1, + flags: {} + } + ] + }, { id: "force", name: "Force", effect: "+1 Damage on Melee attacks.", cost: "Cost: 2 Iron" }, { id: "fire", name: "Fire", effect: "Deals Fire damage instead of Physical.", cost: "Cost: 1 Blaze Glass" }, { id: "shield", name: "Shield", effect: "+1 Armor while equipped.", cost: "Cost: 2 Steel" }, @@ -19,10 +60,10 @@ export function registerIkonisFeatures() { const nativeId = `ikonis-${aug.id}`; CONFIG.DH.ITEM.weaponFeatures[nativeId] = { name: `Ikonis: ${aug.name}`, - img: "systems/daggerheart/assets/icons/documents/items/chip.svg", + img: aug.img || "systems/daggerheart/assets/icons/documents/items/chip.svg", description: `
${aug.effect}
${aug.cost}
`, - actions: {}, - effects: [] + actions: aug.actions || {}, + effects: aug.effects || [] }; } console.log("DH-Ikonis | Features registered in CONFIG."); @@ -43,13 +84,17 @@ export async function seedIkonisHomebrew() { let updates = false; for (const aug of DEFAULT_AUGMENTS) { const nativeId = `ikonis-${aug.id}`; - if (!homebrew.itemFeatures.weaponFeatures[nativeId]) { + const existing = homebrew.itemFeatures.weaponFeatures[nativeId]; + const hasEffects = aug.effects && aug.effects.length > 0; + const needsUpdate = !existing || (hasEffects && (!existing.effects || existing.effects.length === 0)); + + if (needsUpdate) { homebrew.itemFeatures.weaponFeatures[nativeId] = { name: `Ikonis: ${aug.name}`, - img: "systems/daggerheart/assets/icons/documents/items/chip.svg", + img: aug.img || "systems/daggerheart/assets/icons/documents/items/chip.svg", description: `${aug.effect}
${aug.cost}
`, - actions: {}, - effects: [] + actions: aug.actions || {}, + effects: aug.effects || [] }; updates = true; }