`\r\n }\r\n\r\n /**\r\n * Get icon for a prepared spell\r\n * @private\r\n * @param {object} spell\r\n * @returns\r\n */\r\n #getPreparedIcon (spell) {\r\n if (spell?.type !== 'spell' || !this.showUnpreparedSpells) return null\r\n const level = spell.system.level\r\n const preparationMode = spell.system.preparation.mode\r\n const prepared = spell.system.preparation.prepared\r\n const icon = prepared ? PREPARED_ICON : `${PREPARED_ICON} tah-icon-disabled`\r\n const title = preparationMode === 'always' ? coreModule.api.Utils.i18n('DND5E.SpellPrepAlways') : prepared ? coreModule.api.Utils.i18n('DND5E.SpellPrepared') : coreModule.api.Utils.i18n('DND5E.SpellUnprepared')\r\n\r\n // Return icon if the preparation mode is 'prepared' or 'always' and the spell is not a cantrip\r\n return ((preparationMode === 'prepared' || preparationMode === 'always') && level !== 0) ? `` : null\r\n }\r\n\r\n async #getTooltipData (entity) {\r\n if (this.tooltipsSetting === 'none') return ''\r\n\r\n const name = entity?.name ?? ''\r\n\r\n if (this.tooltipsSetting === 'nameOnly') return name\r\n\r\n const unidentified = entity.system?.identified === false\r\n const description = (typeof entity?.system?.description === 'string') ? entity?.system?.description : (unidentified ? entity?.system?.unidentified?.description : entity?.system?.description?.value) ?? ''\r\n let modifiers, properties, rarity, traits\r\n if (!unidentified) {\r\n modifiers = entity?.modifiers ?? null\r\n properties = [\r\n ...entity.system?.chatProperties ?? [],\r\n ...entity.system?.equippableItemCardProperties ?? [],\r\n ...entity.system?.activatedEffectCardProperties ?? []\r\n ].filter(p => p)\r\n rarity = unidentified ? null : entity?.rarity ?? null\r\n traits = (entity?.type === 'weapon') ? this.#getWeaponProperties(entity?.system?.properties) : null\r\n }\r\n return { name, description, modifiers, properties, rarity, traits }\r\n }\r\n\r\n /**\r\n * Get condition tooltip data\r\n * @param {*} id The condition id\r\n * @param {*} name The condition name\r\n * @returns {object} The tooltip data\r\n */\r\n async #getConditionTooltipData (id, name) {\r\n if (this.tooltipsSetting === 'none') return ''\r\n if (this.tooltipsSetting === 'nameOnly') return name\r\n\r\n const journalEntry = (CONDITION[id]) ? (CONDITION[id]?.uuid) ? await fromUuid(CONDITION[id].uuid) : null : null\r\n const description = journalEntry?.text?.content ?? ''\r\n return {\r\n name,\r\n description\r\n }\r\n }\r\n\r\n /**\r\n * Get tooltip\r\n * @param {object} tooltipData The tooltip data\r\n * @returns {string} The tooltip\r\n */\r\n async #getTooltip (tooltipData) {\r\n if (this.tooltipsSetting === 'none') return ''\r\n if (typeof tooltipData === 'string') return tooltipData\r\n\r\n const name = coreModule.api.Utils.i18n(tooltipData.name)\r\n\r\n if (this.tooltipsSetting === 'nameOnly') return name\r\n\r\n const nameHtml = `${name}
`\r\n\r\n const description = tooltipData?.descriptionLocalised ??\r\n await TextEditor.enrichHTML(coreModule.api.Utils.i18n(tooltipData?.description ?? ''), { async: true })\r\n\r\n const rarityHtml = tooltipData?.rarity\r\n ? `${coreModule.api.Utils.i18n(RARITY[tooltipData.rarity])}`\r\n : ''\r\n\r\n const propertiesHtml = tooltipData?.properties\r\n ? `${tooltipData.properties.map(property => `${coreModule.api.Utils.i18n(property)}`).join('')}
`\r\n : ''\r\n\r\n const traitsHtml = tooltipData?.traits\r\n ? tooltipData.traits.map(trait => `${coreModule.api.Utils.i18n(trait.label ?? trait)}`).join('')\r\n : ''\r\n\r\n const traits2Html = tooltipData?.traits2\r\n ? tooltipData.traits2.map(trait => `${coreModule.api.Utils.i18n(trait.label ?? trait)}`).join('')\r\n : ''\r\n\r\n const traitsAltHtml = tooltipData?.traitsAlt\r\n ? tooltipData.traitsAlt.map(trait => `${coreModule.api.Utils.i18n(trait.label)}`).join('')\r\n : ''\r\n\r\n const modifiersHtml = tooltipData?.modifiers\r\n ? `${tooltipData.modifiers.filter(modifier => modifier.enabled).map(modifier => {\r\n const label = coreModule.api.Utils.i18n(modifier.label)\r\n const sign = modifier.modifier >= 0 ? '+' : ''\r\n const mod = `${sign}${modifier.modifier ?? ''}`\r\n return `${label} ${mod}`\r\n }).join('')}
`\r\n : ''\r\n\r\n const tagsJoined = [rarityHtml, traitsHtml, traits2Html, traitsAltHtml].join('')\r\n\r\n const tagsHtml = (tagsJoined) ? `${tagsJoined}
` : ''\r\n\r\n const headerTags = (tagsHtml || modifiersHtml) ? `${tagsHtml}${modifiersHtml}
` : ''\r\n\r\n if (!description && !tagsHtml && !modifiersHtml) return name\r\n\r\n return `${nameHtml}${headerTags}${description}${propertiesHtml}
`\r\n }\r\n\r\n #getWeaponProperties (weaponProperties) {\r\n if (!weaponProperties) return null\r\n return Object.entries(weaponProperties)\r\n .filter(([id, selected]) => selected && WEAPON_PROPERTY[id])\r\n .map(([id, _]) => coreModule.api.Utils.i18n(WEAPON_PROPERTY[id]))\r\n }\r\n }\r\n})\r\n","export let MagicItemActionHandlerExtender = null\r\n\r\nHooks.once('tokenActionHudCoreApiReady', async (coreModule) => {\r\n MagicItemActionHandlerExtender = class MagicItemActionHandlerExtender extends coreModule.api.ActionHandlerExtender {\r\n constructor (actionHandler) {\r\n super()\r\n this.actionHandler = actionHandler\r\n this.actor = null\r\n }\r\n\r\n /**\r\n * Extend the action list\r\n */\r\n async extendActionHandler () {\r\n this.actor = this.actionHandler.actor\r\n if (!this.actor) return\r\n\r\n const actor = await MagicItems.actor(this.actor.id)\r\n\r\n if (!actor) return\r\n\r\n const magicItems = actor.items ?? []\r\n\r\n if (magicItems.length === 0) return\r\n\r\n const parentGroupId = 'magic-items'\r\n const parentGroupType = 'system'\r\n const parentGroupData = {\r\n id: parentGroupId,\r\n type: parentGroupType\r\n }\r\n\r\n magicItems.forEach((magicItem) => {\r\n if (magicItem.attuned && !this._isItemAttuned(magicItem)) return\r\n if (magicItem.equipped && !this._isItemEquipped(magicItem)) return\r\n\r\n const groupId = `magic-items_${magicItem.id}`\r\n const groupName = magicItem.name\r\n const groupType = 'system-derived'\r\n const groupInfo1 = `${magicItem.uses}/${magicItem.charges}`\r\n const groupData = {\r\n id: groupId,\r\n name: groupName,\r\n type: groupType,\r\n info1: groupInfo1\r\n }\r\n\r\n // Add group to HUD\r\n this.actionHandler.addGroup(groupData, parentGroupData)\r\n\r\n const actions = magicItem.ownedEntries.map((entry) => {\r\n const effect = entry.item\r\n const id = effect.id\r\n const name = effect.name\r\n const encodedValue = [\r\n 'magicItem',\r\n `${magicItem.id}>${id}`\r\n ].join('|')\r\n const img = coreModule.api.Utils.getImage(effect)\r\n const info1 = effect.consumption\r\n const info2 = (effect.baseLevel) ? `${coreModule.api.Utils.i18n('DND5E.AbbreviationLevel')} ${effect.baseLevel}` : ''\r\n return {\r\n id,\r\n name,\r\n encodedValue,\r\n img,\r\n info1,\r\n info2,\r\n selected: true\r\n }\r\n })\r\n\r\n // Add actions to action list\r\n this.actionHandler.addActions(actions, groupData)\r\n })\r\n }\r\n\r\n /**\r\n * Whether the magic item is equipped or not\r\n * @param {object} magicItem The item\r\n * @returns {boolean}\r\n */\r\n _isItemEquipped (magicItem) {\r\n return magicItem.item.system.equipped\r\n }\r\n\r\n /**\r\n * Whether the magic items is attuned or not\r\n * @param {object} magicItem The item\r\n * @returns {boolean}\r\n */\r\n _isItemAttuned (magicItem) {\r\n const attunement = magicItem.item.system.attunment\r\n const attunementRequired = CONFIG.DND5E.attunementTypes?.REQUIRED ?? 1\r\n\r\n if (attunement === attunementRequired) return false\r\n\r\n return true\r\n }\r\n }\r\n})\r\n","export let RollHandler = null\r\n\r\nHooks.once('tokenActionHudCoreApiReady', async (coreModule) => {\r\n RollHandler = class RollHandler extends coreModule.api.RollHandler {\r\n /**\r\n * Handle action click\r\n * @override\r\n * @param {object} event\r\n * @param {string} encodedValue\r\n */\r\n async handleActionClick (event, encodedValue) {\r\n const [actionType, actionId] = encodedValue.split('|')\r\n\r\n if (!this.actor) {\r\n for (const token of coreModule.api.Utils.getControlledTokens()) {\r\n const actor = token.actor\r\n await this.#handleAction(event, actionType, actor, token, actionId)\r\n }\r\n } else {\r\n await this.#handleAction(event, actionType, this.actor, this.token, actionId)\r\n }\r\n }\r\n\r\n /**\r\n * Handle action\r\n * @private\r\n * @param {object} event\r\n * @param {string} actionType\r\n * @param {object} actor\r\n * @param {object} token\r\n * @param {string} actionId\r\n */\r\n async #handleAction (event, actionType, actor, token, actionId) {\r\n switch (actionType) {\r\n case 'ability':\r\n this.#rollAbility(event, actor, actionId)\r\n break\r\n case 'check':\r\n this.#rollAbilityTest(event, actor, actionId)\r\n break\r\n case 'save':\r\n this.#rollAbilitySave(event, actor, actionId)\r\n break\r\n case 'condition':\r\n if (!token) return\r\n await this.#toggleCondition(event, actor, token, actionId)\r\n break\r\n case 'counter':\r\n await this.#modifyCounter(event, actor, actionId)\r\n break\r\n case 'effect':\r\n await this.#toggleEffect(event, actor, actionId)\r\n break\r\n case 'exhaustion':\r\n await this.#modifyExhaustion(event, actor)\r\n break\r\n case 'feature':\r\n case 'item':\r\n case 'spell':\r\n case 'weapon':\r\n if (this.isRenderItem()) this.renderItem(actor, actionId)\r\n else this.#useItem(event, actor, actionId)\r\n break\r\n case 'magicItem':\r\n await this.#rollMagicItem(actor, actionId)\r\n break\r\n case 'skill':\r\n this.#rollSkill(event, actor, actionId)\r\n break\r\n case 'utility':\r\n await this.#performUtilityAction(event, actor, token, actionId)\r\n break\r\n default:\r\n break\r\n }\r\n }\r\n\r\n /**\r\n * Modify Counter\r\n * @private\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n * @param {string} actionId The action id\r\n */\r\n async #modifyCounter (event, actor, actionId) {\r\n switch (actionId) {\r\n case 'death-saves':\r\n this.#rollDeathSave(event, actor)\r\n break\r\n case 'exhaustion':\r\n await this.#modifyExhaustion(event, actor)\r\n break\r\n case 'inspiration':\r\n await this.#modifyInspiration(actor)\r\n break\r\n default:\r\n await this.#modifyCustomCounter(event, actor, actionId)\r\n break\r\n }\r\n }\r\n\r\n /**\r\n * Modify Exhaustion\r\n * @private\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n */\r\n async #modifyExhaustion (event, actor) {\r\n const isRightClick = this.isRightClick(event)\r\n const exhaustion = actor.system.attributes.exhaustion\r\n const update = (isRightClick) ? exhaustion - 1 : exhaustion + 1\r\n if (update >= 0) {\r\n actor.update({ 'system.attributes.exhaustion': update })\r\n }\r\n }\r\n\r\n /**\r\n * Modify Inspiration\r\n * @private\r\n * @param {object} actor The actor\r\n */\r\n async #modifyInspiration (actor) {\r\n const update = !actor.system.attributes.inspiration\r\n actor.update({ 'system.attributes.inspiration': update })\r\n }\r\n\r\n /**\r\n * Modify Custom Counter\r\n * @private\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n * * @param {string} actionId The action id\r\n */\r\n async #modifyCustomCounter (event, actor, actionId) {\r\n if (!coreModule.api.Utils.isModuleActive('dnd5e-custom-counters')) return\r\n\r\n const [id, type] = decodeURIComponent(actionId).split('>')\r\n\r\n const isRightClick = this.isRightClick(event)\r\n const isCtrl = this.isCtrl(event)\r\n let value = actor.getFlag('dnd5e-custom-counters', id)\r\n\r\n switch (type) {\r\n case 'checkbox':\r\n await actor.setFlag('dnd5e-custom-counters', id, !value)\r\n break\r\n case 'number':\r\n value = value ?? 0\r\n if (isRightClick) {\r\n if (value > 0) {\r\n await actor.setFlag('dnd5e-custom-counters', id, value - 1)\r\n }\r\n } else {\r\n await actor.setFlag('dnd5e-custom-counters', id, value + 1)\r\n }\r\n break\r\n case 'successFailure':\r\n value = value ?? {}\r\n value.success = value?.success ?? 0\r\n value.failure = value?.failure ?? 0\r\n if (isRightClick) {\r\n if (isCtrl) {\r\n if (value?.failure > 0) {\r\n await actor.setFlag('dnd5e-custom-counters', `${id}.failure`, value.failure - 1)\r\n }\r\n } else {\r\n if (value?.success > 0) {\r\n await actor.setFlag('dnd5e-custom-counters', `${id}.success`, value.success - 1)\r\n }\r\n }\r\n } else {\r\n if (isCtrl) {\r\n await actor.setFlag('dnd5e-custom-counters', `${id}.failure`, value.failure + 1)\r\n } else {\r\n await actor.setFlag('dnd5e-custom-counters', `${id}.success`, value.success + 1)\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Roll Ability\r\n * @private\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n * @param {string} actionId The action id\r\n */\r\n #rollAbility (event, actor, actionId) {\r\n if (!actor) return\r\n if (!actor.system?.abilities) return\r\n actor.rollAbility(actionId, { event })\r\n }\r\n\r\n /**\r\n * Roll Ability Save\r\n * @private\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n * @param {string} actionId The action id\r\n */\r\n #rollAbilitySave (event, actor, actionId) {\r\n if (!actor) return\r\n if (!actor.system?.abilities) return\r\n actor.rollAbilitySave(actionId, { event })\r\n }\r\n\r\n /**\r\n * Roll Ability Test\r\n * @private\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n * @param {string} actionId The action id\r\n */\r\n #rollAbilityTest (event, actor, actionId) {\r\n if (!actor) return\r\n if (!actor.system?.abilities) return\r\n actor.rollAbilityTest(actionId, { event })\r\n }\r\n\r\n /**\r\n * Roll Death Save\r\n * @private\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n */\r\n #rollDeathSave (event, actor) {\r\n actor.rollDeathSave({ event })\r\n }\r\n\r\n /**\r\n * Roll Magic Item\r\n * @private\r\n * @param {object} actor The actor\r\n * @param {string} actionId The action id\r\n */\r\n async #rollMagicItem (actor, actionId) {\r\n const actionParts = actionId.split('>')\r\n\r\n const itemId = actionParts[0]\r\n const magicEffectId = actionParts[1]\r\n\r\n const magicItemActor = await MagicItems.actor(actor.id)\r\n\r\n // magicitems module 3.0.0 does not support Item5e#use\r\n magicItemActor.roll(itemId, magicEffectId)\r\n\r\n Hooks.callAll('forceUpdateTokenActionHud')\r\n }\r\n\r\n /**\r\n * Roll Skill\r\n * @private\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n * @param {string} actionId The action id\r\n */\r\n #rollSkill (event, actor, actionId) {\r\n if (!actor) return\r\n if (!actor.system?.skills) return\r\n actor.rollSkill(actionId, { event })\r\n }\r\n\r\n /**\r\n * Use Item\r\n * @private\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n * @param {string} actionId The action id\r\n * @returns {object} The item\r\n */\r\n #useItem (event, actor, actionId) {\r\n const item = coreModule.api.Utils.getItem(actor, actionId)\r\n\r\n if (this.#needsRecharge(item)) {\r\n item.rollRecharge()\r\n return\r\n }\r\n\r\n return item.use({ event })\r\n }\r\n\r\n /**\r\n * Needs Recharge\r\n * @private\r\n * @param {object} item\r\n * @returns {boolean}\r\n */\r\n #needsRecharge (item) {\r\n return (\r\n item.system.recharge &&\r\n !item.system.recharge.charged &&\r\n item.system.recharge.value\r\n )\r\n }\r\n\r\n /**\r\n * Perform utility action\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n * @param {object} token The token\r\n * @param {string} actionId The action id\r\n */\r\n async #performUtilityAction (event, actor, token, actionId) {\r\n switch (actionId) {\r\n case 'deathSave':\r\n this.#rollDeathSave(event, actor)\r\n break\r\n case 'endTurn':\r\n if (!token) break\r\n if (game.combat?.current?.tokenId === token.id) {\r\n await game.combat?.nextTurn()\r\n }\r\n break\r\n case 'initiative':\r\n await this.#rollInitiative(actor)\r\n break\r\n case 'inspiration':\r\n await this.#modifyInspiration(actor)\r\n break\r\n case 'longRest':\r\n actor.longRest()\r\n break\r\n case 'shortRest':\r\n actor.shortRest()\r\n break\r\n }\r\n\r\n // Update HUD\r\n Hooks.callAll('forceUpdateTokenActionHud')\r\n }\r\n\r\n /**\r\n * Roll Initiative\r\n * @param {object} actor The actor\r\n * @private\r\n */\r\n async #rollInitiative (actor) {\r\n if (!actor) return\r\n await actor.rollInitiative({ createCombatants: true })\r\n\r\n Hooks.callAll('forceUpdateTokenActionHud')\r\n }\r\n\r\n /**\r\n * Toggle Condition\r\n * @private\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n * @param {object} token The token\r\n * @param {string} actionId The action id\r\n */\r\n async #toggleCondition (event, actor, token, actionId) {\r\n if (!token) return\r\n\r\n const isRightClick = this.isRightClick(event)\r\n const statusEffect = CONFIG.statusEffects.find(statusEffect => statusEffect.id === actionId)\r\n const isConvenient = (statusEffect?.flags)\r\n ? Object.hasOwn(statusEffect.flags, 'dfreds-convenient-effects')\r\n ? statusEffect.flags['dfreds-convenient-effects'].isConvenient\r\n : null\r\n : null ??\r\n actionId.startsWith('Convenient Effect')\r\n\r\n if (game.dfreds && isConvenient) {\r\n isRightClick\r\n ? await game.dfreds.effectInterface.toggleEffect(statusEffect.name ?? statusEffect.label, { overlay: true })\r\n : await game.dfreds.effectInterface.toggleEffect(statusEffect.name ?? statusEffect.label)\r\n } else {\r\n const condition = this.#findCondition(actionId)\r\n if (!condition) return\r\n const effect = this.#findEffect(actor, actionId)\r\n if (effect?.disabled) { await effect.delete() }\r\n\r\n isRightClick\r\n ? await token.toggleEffect(condition, { overlay: true })\r\n : await token.toggleEffect(condition)\r\n }\r\n\r\n Hooks.callAll('forceUpdateTokenActionHud')\r\n }\r\n\r\n /**\r\n * Find condition\r\n * @private\r\n * @param {string} actionId The action id\r\n * @returns {object} The condition\r\n */\r\n #findCondition (actionId) {\r\n return CONFIG.statusEffects.find((effect) => effect.id === actionId)\r\n }\r\n\r\n /**\r\n * Find effect\r\n * @param {object} actor The actor\r\n * @param {string} actionId The action id\r\n * @returns {object} The effect\r\n */\r\n #findEffect (actor, actionId) {\r\n if (game.version.startsWith('11')) {\r\n return actor.effects.find(effect => effect.statuses.every(status => status === actionId))\r\n } else {\r\n // V10\r\n return actor.effects.find(effect => effect.flags?.core?.statusId === actionId)\r\n }\r\n }\r\n\r\n /**\r\n * Toggle Effect\r\n * @private\r\n * @param {object} event The event\r\n * @param {object} actor The actor\r\n * @param {string} actionId The action id\r\n */\r\n async #toggleEffect (event, actor, actionId) {\r\n const effects = 'find' in actor.effects.entries ? actor.effects.entries : actor.effects\r\n let effect = effects.find(effect => effect.id === actionId)\r\n\r\n // only allow deletion if effect is directly on this actor\r\n let internalEffect = true\r\n\r\n // if the effect isn't directly on the actor, search all applicable effects for it\r\n if (!effect) {\r\n internalEffect = false\r\n for (const e of actor.allApplicableEffects()) {\r\n if (e.id === actionId) {\r\n effect = e\r\n }\r\n }\r\n }\r\n\r\n if (!effect) return\r\n\r\n const isRightClick = this.isRightClick(event)\r\n\r\n if (isRightClick && internalEffect) {\r\n await effect.delete()\r\n } else {\r\n await effect.update({ disabled: !effect.disabled })\r\n }\r\n\r\n Hooks.callAll('forceUpdateTokenActionHud')\r\n }\r\n\r\n /**\r\n * Handle action hover\r\n * @override\r\n * @param {object} event\r\n * @param {string} encodedValue\r\n */\r\n async handleActionHover (event, encodedValue) {\r\n const types = ['feature', 'item', 'spell', 'weapon', 'magicItem']\r\n const [actionType, actionId] = encodedValue.split('|')\r\n\r\n if (!types.includes(actionType)) return\r\n\r\n const item = coreModule.api.Utils.getItem(this.actor, actionId)\r\n\r\n switch (event.type) {\r\n case 'mouseenter':\r\n case 'mouseover':\r\n Hooks.call('tokenActionHudSystemActionHoverOn', event, item)\r\n break\r\n case 'mouseleave':\r\n case 'mouseout':\r\n Hooks.call('tokenActionHudSystemActionHoverOff', event, item)\r\n break\r\n }\r\n }\r\n }\r\n})\r\n","import { RollHandler } from './roll-handler.js'\r\n\r\nexport class RollHandlerObsidian extends RollHandler {\r\n /**\r\n * Roll Ability Test\r\n * @override\r\n * @param {object} event\r\n * @param {string} actionId\r\n */\r\n _rollAbilityTest (event, actionId) {\r\n OBSIDIAN.Items.roll(super.actor, { roll: 'abl', abl: actionId })\r\n }\r\n\r\n /**\r\n * Roll Ability Save\r\n * @override\r\n * @param {object} event\r\n * @param {string} actorId\r\n * @param {string} tokenId\r\n * @param {string} actionId\r\n */\r\n _rollAbilitySave (event, actionId) {\r\n OBSIDIAN.Items.roll(super.actor, { roll: 'save', save: actionId })\r\n }\r\n\r\n /**\r\n * Roll Skill\r\n * @override\r\n * @param {object} event\r\n * @param {string} actionId\r\n */\r\n _rollSkill (event, actionId) {\r\n OBSIDIAN.Items.roll(super.actor, { roll: 'skl', skl: actionId })\r\n }\r\n\r\n /**\r\n * Use Item\r\n * @override\r\n * @param {object} event\r\n * @param {string} actionId\r\n */\r\n _useItem (event, actionId) {\r\n OBSIDIAN.Items.roll(super.actor, { roll: 'item', id: actionId })\r\n }\r\n}\r\n","import { GROUP } from './constants.js'\r\n\r\n/**\r\n * Default categories and groups\r\n */\r\nexport let DEFAULTS = null\r\n\r\nHooks.once('tokenActionHudCoreApiReady', async (coreModule) => {\r\n const groups = GROUP\r\n Object.values(groups).forEach(group => {\r\n group.name = coreModule.api.Utils.i18n(group.name)\r\n group.listName = `Group: ${coreModule.api.Utils.i18n(group.name)}`\r\n })\r\n const groupsArray = Object.values(groups)\r\n DEFAULTS = {\r\n layout: [\r\n {\r\n nestId: 'inventory',\r\n id: 'inventory',\r\n name: coreModule.api.Utils.i18n('DND5E.Inventory'),\r\n groups: [\r\n { ...groups.weapons, nestId: 'inventory_weapons' },\r\n { ...groups.equipment, nestId: 'inventory_equipment' },\r\n { ...groups.consumables, nestId: 'inventory_consumables' },\r\n { ...groups.tools, nestId: 'inventory_tools' },\r\n { ...groups.containers, nestId: 'inventory_containers' },\r\n { ...groups.loot, nestId: 'inventory_loot' }\r\n ]\r\n },\r\n {\r\n nestId: 'features',\r\n id: 'features',\r\n name: coreModule.api.Utils.i18n('DND5E.Features'),\r\n groups: [\r\n { ...groups.activeFeatures, nestId: 'features_active-features' },\r\n { ...groups.passiveFeatures, nestId: 'features_passive-features' }\r\n ]\r\n },\r\n {\r\n nestId: 'spells',\r\n id: 'spells',\r\n name: coreModule.api.Utils.i18n('ITEM.TypeSpellPl'),\r\n groups: [\r\n { ...groups.atWillSpells, nestId: 'spells_at-will-spells' },\r\n { ...groups.innateSpells, nestId: 'spells_innate-spells' },\r\n { ...groups.pactSpells, nestId: 'spells_pact-spells' },\r\n { ...groups.cantrips, nestId: 'spells_cantrips' },\r\n { ...groups._1stLevelSpells, nestId: 'spells_1st-level-spells' },\r\n { ...groups._2ndLevelSpells, nestId: 'spells_2nd-level-spells' },\r\n { ...groups._3rdLevelSpells, nestId: 'spells_3rd-level-spells' },\r\n { ...groups._4thLevelSpells, nestId: 'spells_4th-level-spells' },\r\n { ...groups._5thLevelSpells, nestId: 'spells_5th-level-spells' },\r\n { ...groups._6thLevelSpells, nestId: 'spells_6th-level-spells' },\r\n { ...groups._7thLevelSpells, nestId: 'spells_7th-level-spells' },\r\n { ...groups._8thLevelSpells, nestId: 'spells_8th-level-spells' },\r\n { ...groups._9thLevelSpells, nestId: 'spells_9th-level-spells' }\r\n ]\r\n },\r\n {\r\n nestId: 'attributes',\r\n id: 'attributes',\r\n name: coreModule.api.Utils.i18n('DND5E.Attributes'),\r\n groups: [\r\n { ...groups.abilities, nestId: 'attributes_abilities' },\r\n { ...groups.skills, nestId: 'attributes_skills' }\r\n ]\r\n },\r\n {\r\n nestId: 'effects',\r\n id: 'effects',\r\n name: coreModule.api.Utils.i18n('DND5E.Effects'),\r\n groups: [\r\n { ...groups.temporaryEffects, nestId: 'effects_temporary-effects' },\r\n { ...groups.passiveEffects, nestId: 'effects_passive-effects' },\r\n { ...groups.conditions, nestId: 'effects_conditions' }\r\n ]\r\n },\r\n {\r\n nestId: 'utility',\r\n id: 'utility',\r\n name: coreModule.api.Utils.i18n('tokenActionHud.utility'),\r\n groups: [\r\n { ...groups.combat, nestId: 'utility_combat' },\r\n { ...groups.token, nestId: 'utility_token' },\r\n { ...groups.rests, nestId: 'utility_rests' },\r\n { ...groups.utility, nestId: 'utility_utility' }\r\n ]\r\n }\r\n ],\r\n groups: groupsArray\r\n }\r\n})\r\n","import { MODULE } from './constants.js'\r\n\r\nexport function register (updateFunc) {\r\n game.settings.register(MODULE.ID, 'abbreviateSkills', {\r\n name: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.abbreviateSkills.name'\r\n ),\r\n hint: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.abbreviateSkills.hint'\r\n ),\r\n scope: 'client',\r\n config: true,\r\n type: Boolean,\r\n default: false,\r\n onChange: (value) => {\r\n updateFunc(value)\r\n }\r\n })\r\n\r\n game.settings.register(MODULE.ID, 'showSlowActions', {\r\n name: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showSlowActions.name'\r\n ),\r\n hint: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showSlowActions.hint'\r\n ),\r\n scope: 'client',\r\n config: true,\r\n type: Boolean,\r\n default: true,\r\n onChange: (value) => {\r\n updateFunc(value)\r\n }\r\n })\r\n\r\n game.settings.register(MODULE.ID, 'displaySpellInfo', {\r\n name: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.displaySpellInfo.name'\r\n ),\r\n hint: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.displaySpellInfo.hint'\r\n ),\r\n scope: 'client',\r\n config: true,\r\n type: Boolean,\r\n default: true,\r\n onChange: (value) => {\r\n updateFunc(value)\r\n }\r\n })\r\n\r\n game.settings.register(MODULE.ID, 'showUnchargedItems', {\r\n name: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showUnchargedItems.name'\r\n ),\r\n hint: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showUnchargedItems.hint'\r\n ),\r\n scope: 'client',\r\n config: true,\r\n type: Boolean,\r\n default: false,\r\n onChange: (value) => {\r\n updateFunc(value)\r\n }\r\n })\r\n\r\n game.settings.register(MODULE.ID, 'showUnequippedItems', {\r\n name: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showUnequippedItems.name'\r\n ),\r\n hint: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showUnequippedItems.hint'\r\n ),\r\n scope: 'client',\r\n config: true,\r\n type: Boolean,\r\n default: false,\r\n onChange: (value) => {\r\n updateFunc(value)\r\n }\r\n })\r\n\r\n game.settings.register(MODULE.ID, 'showUnequippedItemsNpcs', {\r\n name: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showUnequippedItemsNpcs.name'\r\n ),\r\n hint: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showUnequippedItemsNpcs.hint'\r\n ),\r\n scope: 'client',\r\n config: true,\r\n type: Boolean,\r\n default: true,\r\n onChange: (value) => {\r\n updateFunc(value)\r\n }\r\n })\r\n\r\n game.settings.register(MODULE.ID, 'showUnpreparedSpells', {\r\n name: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showUnpreparedSpells.name'\r\n ),\r\n hint: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showUnpreparedSpells.hint'\r\n ),\r\n scope: 'client',\r\n config: true,\r\n type: Boolean,\r\n default: false,\r\n onChange: (value) => {\r\n updateFunc(value)\r\n }\r\n })\r\n\r\n game.settings.register(MODULE.ID, 'showItemsWithoutActivationCosts', {\r\n name: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showItemsWithoutActivationCosts.name'\r\n ),\r\n hint: game.i18n.localize(\r\n 'tokenActionHud.dnd5e.settings.showItemsWithoutActivationCosts.hint'\r\n ),\r\n scope: 'client',\r\n config: true,\r\n type: Boolean,\r\n default: false,\r\n onChange: (value) => {\r\n updateFunc(value)\r\n }\r\n })\r\n}\r\n","// System Module Imports\r\nimport { ActionHandler } from './action-handler.js'\r\nimport { MagicItemActionHandlerExtender } from './magic-items-extender.js'\r\nimport { RollHandler as Core } from './roll-handler.js'\r\nimport { RollHandlerObsidian as Obsidian5e } from './roll-handler-obsidian.js'\r\nimport { DEFAULTS } from './defaults.js'\r\nimport * as systemSettings from './settings.js'\r\n\r\nexport let SystemManager = null\r\n\r\nHooks.once('tokenActionHudCoreApiReady', async (coreModule) => {\r\n SystemManager = class SystemManager extends coreModule.api.SystemManager {\r\n /** @override */\r\n getActionHandler () {\r\n const actionHandler = new ActionHandler()\r\n if (coreModule.api.Utils.isModuleActive('magic-items-2') || coreModule.api.Utils.isModuleActive('magicitems')) { actionHandler.addActionHandlerExtender(new MagicItemActionHandlerExtender(actionHandler)) }\r\n return actionHandler\r\n }\r\n\r\n /** @override */\r\n getAvailableRollHandlers () {\r\n let coreTitle = 'Core D&D5e'\r\n\r\n if (coreModule.api.Utils.isModuleActive('midi-qol')) { coreTitle += ` [supports ${coreModule.api.Utils.getModuleTitle('midi-qol')}]` }\r\n\r\n const choices = { core: coreTitle }\r\n coreModule.api.SystemManager.addHandler(choices, 'obsidian')\r\n\r\n return choices\r\n }\r\n\r\n /** @override */\r\n getRollHandler (rollHandlerId) {\r\n let rollHandler\r\n switch (rollHandlerId) {\r\n case 'obsidian':\r\n rollHandler = new Obsidian5e()\r\n break\r\n case 'core':\r\n default:\r\n rollHandler = new Core()\r\n break\r\n }\r\n\r\n return rollHandler\r\n }\r\n\r\n /** @override */\r\n registerSettings (onChangeFunction) {\r\n systemSettings.register(onChangeFunction)\r\n }\r\n\r\n /** @override */\r\n async registerDefaults () {\r\n const defaults = DEFAULTS\r\n // If the 'Magic Items' module is active, then add a group for it\r\n if (game.modules.get('magicitems')?.active || game.modules.get('magic-items-2')?.active) {\r\n const name = coreModule.api.Utils.i18n('tokenActionHud.dnd5e.magicItems')\r\n defaults.groups.push(\r\n {\r\n id: 'magic-items',\r\n name,\r\n listName: `Group: ${name}`,\r\n type: 'system'\r\n }\r\n )\r\n defaults.groups.sort((a, b) => a.id.localeCompare(b.id))\r\n }\r\n return defaults\r\n }\r\n }\r\n})\r\n","import { SystemManager } from './system-manager.js'\r\nimport { MODULE, REQUIRED_CORE_MODULE_VERSION } from './constants.js'\r\n\r\nHooks.on('tokenActionHudCoreApiReady', async () => {\r\n const module = game.modules.get(MODULE.ID)\r\n module.api = {\r\n requiredCoreModuleVersion: REQUIRED_CORE_MODULE_VERSION,\r\n SystemManager\r\n }\r\n Hooks.call('tokenActionHudSystemReady', module)\r\n})\r\n"],"names":["MODULE","ID","CORE_MODULE","REQUIRED_CORE_MODULE_VERSION","ACTION_TYPE","ability","check","condition","counter","effect","exhaustion","feature","item","save","skill","spell","utility","ACTIVATION_TYPE_ICON","bonus","crew","day","hour","lair","minute","legendary","reaction","special","CONCENTRATION_ICON","CONDITION","blind","uuid","blinded","charmed","deaf","deafened","fear","frightened","grappled","incapacitated","invisible","paralysis","paralyzed","petrified","poison","poisoned","prone","restrain","restrained","stun","stunned","unconscious","GROUP","_1stLevelSpells","id","name","type","_2ndLevelSpells","_3rdLevelSpells","_4thLevelSpells","_5thLevelSpells","_6thLevelSpells","_7thLevelSpells","_8thLevelSpells","_9thLevelSpells","abilities","actions","activeFeatures","artificerInfusions","atWillSpells","backgroundFeatures","bonusActions","cantrips","channelDivinity","checks","classFeatures","combat","conditions","consumables","containers","counters","crewActions","defensiveTactics","eldritchInvocations","elementalDisciplines","equipment","equipped","feats","fightingStyles","huntersPrey","innateSpells","kiAbilities","lairActions","legendaryActions","loot","maneuvers","metamagicOptions","monsterFeatures","multiattacks","otherActions","pactBoons","pactSpells","passiveEffects","passiveFeatures","psionicPowers","raceFeatures","reactions","rests","runes","saves","skills","superiorHuntersDefense","temporaryEffects","token","tools","unequipped","weapons","PREPARED_ICON","PROFICIENCY_LEVEL_ICON","RARITY","common","uncommon","rare","veryRare","artifact","RITUAL_ICON","WEAPON_PROPERTY","ada","amm","fin","fir","foc","hvy","lgt","lod","mgc","rch","rel","ret","sil","spc","thr","two","ver","Utils","Hooks","once","async","coreModule","static","key","defaultValue","value","game","settings","get","api","Logger","debug","set","ActionHandler","actors","tokens","actorType","items","abbreviateSkills","displaySpellInfo","showItemsWithoutActivationCosts","showUnchargedItems","showUnequippedItems","showUnpreparedSpells","activationgroupIds","featuregroupIds","inventorygroupIds","spellgroupIds","featureActions","inventoryActions","spellActions","systemVersion","dnd5e","version","groupIds","this","actor","getActors","getTokens","discardSlowItems","sortItemsByName","getSetting","buildCharacterActions","buildVehicleActions","buildMultipleTokenActions","Promise","all","buildConditions","buildEffects","buildFeatures","buildInventory","buildSpells","buildAbilities","buildCombat","buildCounters","buildExhaustion","buildRests","buildSkills","buildUtility","actionType","groupId","system","CONFIG","DND5E","length","Object","entries","filter","map","abilityId","abbreviatedName","charAt","toUpperCase","slice","label","listName","i18n","encodedValue","join","delimiter","icon1","getProficiencyIcon","proficient","mod","info1","text","getModifier","info2","groupData","addActions","data","actionData","activationItems","Map","activationTypeMappings","action","reactiondamage","reactionmanual","other","activationType","activation","keys","includes","has","activationGroupId","groupDataClone","defaultSelected","parentgroupData","addGroup","addGroupInfo","buildActions","combatTypes","initiative","endTurn","current","tokenId","combatType","cssClass","tokenIds","getControlledTokens","combatants","combatant","currentInitiative","class","every","statusEffects","startsWith","effects","some","statuses","status","disabled","flags","core","statusId","img","getImage","tooltipData","getConditionTooltipData","tooltip","getTooltip","isModuleActive","_","visible","encodeURIComponent","active","attributes","death","success","failure","getFlag","allApplicableEffects","size","effectId","isSuppressed","parent","identified","user","isGM","isTemporary","featuresMap","featureTypes","classFeatureTypes","subType","subtype","featureType","groupNameMappings","buildActivations","inventoryMap","hasQuantity","quantity","isActiveItem","isUsableItem","isEquippedItem","restTypes","shortRest","longRest","restType","total","error","spellsMap","isUsableSpell","preparation","mode","level","systemSpells","spells","reverse","pactSlot","spellSlots","spellSlotAvailable","pactSlotAvailable","hasValue","hasMax","max","hasLevel","slotAvailable","push","slotsAvailable","pactSpellEquivalent","findIndex","groupMappings","spellMode","spellSlotModes","groupName","levelInfo","find","spellSlot","slots","groupInfo","info","utilityTypes","deathSave","inspiration","hp","utilityType","options","getAction","entity","_id","recharge","charged","hasOwn","getActivationTypeIcon","icon2","getPreparedIcon","icon3","getConcentrationIcon","getItemInfo","info3","getTooltipData","activationTypes","abilityActivationTypes","at","uses","prepared","preparationModes","spellPreparationModes","preparationMode","getSpellInfo","getQuantityData","getUsesData","getConsumeData","componentsArray","components","properties","forEach","component","title","allowedTypes","consumeName","consumeAmount","per","prompt","of","period","limitedUsePeriods","amount","undefined","consumeId","consume","target","consumeType","parentId","substr","lastIndexOf","foundry","utils","getProperty","slowActivationTypes","filteredItems","proficiencyLevels","icon","tooltipsSetting","unidentified","description","modifiers","rarity","traits","chatProperties","equippableItemCardProperties","activatedEffectCardProperties","p","getWeaponProperties","fromUuid","content","nameHtml","descriptionLocalised","TextEditor","enrichHTML","rarityHtml","propertiesHtml","property","traitsHtml","trait","traits2Html","traits2","traitsAltHtml","traitsAlt","modifiersHtml","modifier","enabled","tagsJoined","tagsHtml","weaponProperties","selected","MagicItemActionHandlerExtender","ActionHandlerExtender","constructor","actionHandler","super","MagicItems","magicItems","parentGroupData","magicItem","attuned","_isItemAttuned","_isItemEquipped","charges","ownedEntries","entry","consumption","baseLevel","attunment","attunementTypes","REQUIRED","RollHandler","event","actionId","split","handleAction","rollAbility","rollAbilityTest","rollAbilitySave","toggleCondition","modifyCounter","toggleEffect","modifyExhaustion","isRenderItem","renderItem","useItem","rollMagicItem","rollSkill","performUtilityAction","rollDeathSave","modifyInspiration","modifyCustomCounter","isRightClick","update","decodeURIComponent","isCtrl","setFlag","actionParts","itemId","magicEffectId","roll","callAll","getItem","needsRecharge","use","rollRecharge","nextTurn","rollInitiative","createCombatants","statusEffect","isConvenient","dfreds","effectInterface","overlay","findCondition","findEffect","delete","internalEffect","e","call","RollHandlerObsidian","_rollAbilityTest","OBSIDIAN","Items","abl","_rollAbilitySave","_rollSkill","skl","_useItem","DEFAULTS","register","updateFunc","localize","hint","scope","config","Boolean","default","onChange","groups","values","group","groupsArray","layout","nestId","SystemManager","getActionHandler","addActionHandlerExtender","getAvailableRollHandlers","coreTitle","getModuleTitle","choices","addHandler","getRollHandler","rollHandlerId","rollHandler","Obsidian5e","Core","registerSettings","onChangeFunction","systemSettings.register","defaults","modules","sort","a","b","localeCompare","on","module","requiredCoreModuleVersion"],"mappings":"AAGY,MAACA,EAAS,CAClBC,GAAI,0BAMKC,EAAc,CACvBD,GAAI,yBAMKE,EAA+B,MAK/BC,EAAc,CACvBC,QAAS,gBACTC,MAAO,6BACPC,UAAW,iCACXC,QAAS,+BACTC,OAAQ,eACRC,WAAY,mBACZC,QAAS,gBACTC,KAAM,4BACNC,KAAM,mBACNC,MAAO,6BACPC,MAAO,iBACPC,QAAS,oBAMAC,EAAuB,CAChCC,MAAO,cACPC,KAAM,eACNC,IAAK,u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