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; }