From 4a7aa554f39ad4cf6ef13d7175782ab3e2897864 Mon Sep 17 00:00:00 2001 From: cosmo Date: Sun, 26 Apr 2026 19:09:38 +0200 Subject: [PATCH] feat: exclude Bonded feature from Ikonis augment slot calculation --- scripts/ikonis-sheet.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/ikonis-sheet.js b/scripts/ikonis-sheet.js index 1260b9c..e5e6ce7 100644 --- a/scripts/ikonis-sheet.js +++ b/scripts/ikonis-sheet.js @@ -115,10 +115,13 @@ export function patchIkonisSheet() { const weaponFeatures = this.document.system.weaponFeatures || []; const allAugments = getAugments(); - // Filter out native features that aren't Ikonis augments if needed, - // but for now we'll just count total weapon features against slots + // Exclude Bonded from slot count + const allNativeFeatures = CONFIG.DH.ITEM.allWeaponFeatures() || {}; + const bondedId = Object.keys(allNativeFeatures).find(k => allNativeFeatures[k].name === "Ikonis: Bonded"); + const usedSlotsCount = weaponFeatures.filter(f => f.value !== bondedId).length; + const maxSlots = getSlotCount(this.document); - if (weaponFeatures.length >= maxSlots) { + if (usedSlotsCount >= maxSlots) { ui.notifications.warn(`No more augment slots available! (Max: ${maxSlots})`); return; }