The action this action use is based on.
The actor this action use is based on.
The item this action use is based on.
The shared data object holding all relevant data for this action use.
The actor this action use is based on.
Internal
Determine if item is valid for use as ammo.
Item to filter
Ammo usage per attack
Determines conditional parts used in a specific attack.
The attack used.
Optional
index: numberThe index of the attack, in order of enabled attacks.
The conditional parts used.
Internal
Initial setup
Adds ChatAttack entries to an attack's shared context.
Adds a ChatAttack entry for damage to an attack's shared context.
Add effect notes for each individual attack.
Alters roll (and shared) data based on user input during the attack's dialog.
The attack dialog's form data
Checks all requirements to make the attack. This is after the attack dialog's data has been parsed.
0 if successful, otherwise one of the ERR_REQUIREMENT constants.
Enrich effect notes.
Enrich notes
Notes
Notes section title
CSS selectors
Executes the item's script calls.
Optional
category: "use" | "postUse" = "use"Script call category
Generates attacks for an item's action.
Optional
forceFullAttack: boolean = falseGenerate full attack data, e.g. as base data for an ActionDialog
The generated default attacks.
Generates ChatAttack entries based off the attack type.
Generates metadata for this attack for the chat card to store.
The resulting metadata object.
Adds an attack's chat card data to the shared object.
The roll data object for this attack.
Collect valid targets.
Handles Dice So Nice integration.
Posts the attack's chat card.
Process everything
Optional
options: { skipDialog?: boolean } = {}Additional options
Optional
skipDialog?: booleanSkip dialog
Prompts the user for an area, based on the attack's measure template.
Whether an area was selected, false if template placement is skipped, null if cancelled.
Prompts the user for areas, based on the attack's measure templates.
True if the placement process was skipped or successful, false if cancelled.
Creates and renders an attack roll dialog, and returns a result.
Subtracts ammo for this attack, updating relevant items with new quantities.
Optional
value: number = 1How much ammo to subtract.
Update remaining ammo in ChatAttacks
The shared context for this action use