Rest
...args: any[]Static
systemWhether this item is a physical one, possessing properties like quantity or weight.
An array containing all action types from this item's actions.
The item's material addons, or null
if the item has no subtype
The item's alignment attributes, or null
if the item has no alignment attributes
Generic damage source retrieval for default action, includes default conditionals and other item specific modifiers.
All relevant changes, or undefined if action was not found.
Get default action's attack array.
Simple array describing the individual guaranteed attacks.
Return attack sources for default action.
Array of value and label pairs for attack bonus sources on the main attack.
Is this item usable at base level, disregarding per-action details.
Linked ammunition item if any.
An active effect associated with this item.
Returns true
if any of this item's actions have an attack, see ItemAction#hasAttack.
Returns true
if any of this item's actions have a damage roll, see ItemAction#hasDamage.
Is the item functional.
Determine if this spell is domain/school spell.
Whether this item is physical.
The keys of data variables to memorize between updates, for e.g. determining the difference in update.
The item's material, or null
if the item has no subtype
Internal
Should the item show unidentified data
Number of slots the spell takes to prepare.
Quick access to .system.slotCost with additional considerations such as at-will toggle.
Defaults to 1 if the data is not present, 0 if the spell is at-will.
The item's subtype, or null
if the item has no subtype
Returns total duration in seconds or null.
Seconds or null.
Static
defaultStatic
isWhether this item is physical.
Protected
_assignPrivate
_preparationInternal
Transform given data so it becomes valid update data within parent item.
This can, for example, be used to generate batched update to the real item.
Update data
Optional
options: { Additional options
Create data recursively, meant for the real item document.
_transformContainerUpdateData({ name: "new name" })
// => { system: { items: { [itemID]: { name: "new name" } } } }
Add charges to the spell or its relevant resource pool (spell points or spontaneous spells).
Number of charges to add
Optional
data: object = nullAdditional data to pass to the update
Updated document or undefined if no update is possible or required.
The number of charges to add.
Optional
data: object = nullAdditional data to pass to the update
Updated document or undefined if no update is possible.
Use addCharges instead.
Test if specified link can be created.
The type of link.
Either "compendium", "data" or "world".
The target item to link to.
The link identifier for the item.
Whether a link to the item is possible here.
Creates a link to another item.
The type of link. e.g. "children", "charges", "classAssociations" or "ammunition".
Either "compendium", "data" or "world".
The target item to link to.
The link identifier for the item. e.g. UUID for items external to the actor, and item ID for same actor items.
Whether a link was created.
Display the chat card for an Item as a message in chat
Optional
altChatData: object = {}Optional data that will be merged into the chat data object.
Optional
options: { Additional options.
Relevant token if any.
Chat message instance if one was created.
Executes all script calls on this item of a specified category.
The category of script calls to call.
Optional
extraParams: {} = {}A dictionary of extra parameters to pass as variables for use in the script.
Optional
shared: object = {}Shared data object
The shared object between calls which may have been given data.
The type of link.
Either "compendium", "data" or "world".
The target item to link to.
The link identifier for the item.
An array to insert into this item's link data.
Attack sources for a specific action.
Action ID
Optional
options: { Additional options
Roll data instance
Array of value and label pairs for attack bonus sources on the main attack, or undefined if the action is missing.
Finds, filters and alters changes relevant to a context, and returns the result (as an array)
The given context.
Get full description.
Item type dependant options for rendering the description.
Get item links of type
Link type
Include link data, return value changes from item array to object array
Optional
options: { Additional options
Internal use only.
Retrieved linked items recursively.
Retrieve list of linked items for a type, synchronously. Intended mainly for fetching child or charge links quickly.
Link type, e.g. "children", "charges", or "classAssociations"
Optional
options: { Additional options
Internal use only
Retrieve links recursively.
Linked items or their compendium index data
const childItems = item.getLinkedItemsSync("children");
Determines the starting data for an ActiveEffect based off this item.
Internal
Fetches all this item's script calls of a specified category
Per item type chat data.
A partial of a chat data object that can be modified to add per item type data.
The labels for this item.
Additional property strings
A rollData object to be used for checks
Recharges item's uses, if any.
Options
Promise for the update, update data object, or undefined (no update needed).
Removes all link references to an item.
The UUID of the item to remove links to.
Optional
options: { Additional options
Commit changes to database. If false, resulting update data is returned instead.
Set item's active state.
Active state
Optional update context
Update promise if item type supports the operation.
Error if item does not support the operation.
Sets a dictionary flag value on this item.
The name/key of the flag to set.
The flag's new value.
Update context
Whether something was changed.
Use an attack, using SharedActionData
Optional
__namedParameters: string = {}Static
_onStatic
_onStatic
_replaceStatic
chatStatic
createItem create dialog.
Initial form data
Optional
context: { Additional options.
Dialog context options.
Pack ID parameter passed to Item.create() options
Parent parameter passed to Item.create() options
Synchronized with Foundry VTT v11.315
Static
getStatic
getStatic
isDetermine whether an item type is physical.
The item type to check
Whether an item of that type is physical.
Use ItemPF.isPhysical insted.
Static
toConvert spell into a consumable item.
Spell item data
Consumable type
Optional
options: { Additional options
Spell type
Static
toOpen Consumable conversion dialog.
Automatically calls this.toConsumable as appropriate.
Spell item data
Optional
options: { Additional options
The actor the consumable is being created on.
Allow spell creation
Spell type
Generated using TypeDoc
Override and extend the basic :class:
Item
implementation