All equipped gear items (type "item" with system.equipped true).
Hand weapons currently held by this actor. Returns the first two items of type "item" that are equipped and held, sorted by their sort order (ascending).
All rune items owned directly by this actor (does not include socketed runes in gear).
Returns the set of environmental geo type tags currently active for this actor, derived from the scene and any surveyed tiles the actor's token is standing on. Scene/Tile environmental data is stored in flags (Foundry v13 does not support TypeDataModel for Scene or Tile documents).
In combat, resolves the token via the acting combatant (if available) for correctness with unlinked tokens and multiple active tokens. Falls back to getActiveTokens() for non-combat contexts.
Returns all glyph items socketed in currently-equipped gear items.
Returns true if this actor should log incoming damage rather than decrement health.
BMS uses system.modifications[] (processed in prepareDerivedData) instead of Foundry's changes pipeline. Override applyActiveEffects to skip change application entirely, preserving only status accumulation and the phase-completion guard.
Apply damage to the actor, accounting for resistances, piercing, per-keyword mods, and layer cascading.
When the caller does not own this actor, delegates to the GM over game.socket and returns
asynchronously. The method must always be awaited — local mutations are not synchronous.
Resistance calculation: base resistance from system.resistances[type] is shifted toward neutral
by the attacker's outgoingResistancePiercing (all + type-specific), plus extraPiercing.
Piercing moves up the ladder (toward 1.0x) by N stages, capped at neutral — it can reduce resistance
but cannot push the target into vulnerability. ignoreResistances: true bypasses this entirely.
Per-keyword mods (from system.incomingDamagePerKeyword) stack multiplicatively on each other
and additively with the global incoming damage multiplier/bonus.
When _shouldTrackDamage() is true (usually for NPCs), damage is logged to system.damageTaken[]
instead of decrementing vitals.
Config: source string — optional label for the damage log entry attacker Actor|null — source actor (used for resistance piercing resolution) silent boolean — suppress roll and action log notification (default false) ignoreResistances boolean — bypass resistance entirely, apply damage 1:1 (default false) keywords string[] — damage keywords for per-keyword mod lookups (default []) extraPiercing number — additional piercing stages to apply on top of attacker.outgoing... (default 0)
The amount of damage to apply.
The type of damage (e.g., "slash", "fire").
Optionallayer: string = "tempHp"
The starting layer ("tempHp", "shields", "health", "sanity").
Optionaloptions: object = {}Apply a restore to a target vital or resource.
When the caller does not own this actor, delegates to the GM over game.socket and returns
immediately (void); the actual restore completes asynchronously on the GM.
When restoring a vital (not a resource) on an NPC with damage tracking enabled (_shouldTrackDamage),
logs the heal to system.damageTaken[] and returns this. Otherwise, increments the target value
up to max (or beyond if allowOverflow is true), decrements surges if requested, and returns this.
If the target vital/resource does not exist or surges are exhausted when consumeSurge is true,
returns void and logs a warning (unless silent is true).
Config: useSurge boolean — add surge value to restore (default true) consumeSurge boolean — decrement surges.value by 1 (default true) allowOverflow boolean — permit restored value to exceed max (default false) bonusValue number — additional restore amount on top of surge (default 0) silent boolean — suppress warnings and action log notification (default false)
"health", "shields", "tempHp", "sanity", or "resources.
Optionaloptions: object = {}Resolves to this when restore succeeds; void on early return
Find the character deck for this actor created from a given base deck, or null if none exists.
A base deck (type "deck") to search for
The character deck, or null if not found
Clear the damage log for this NPC.
Returns the actor's configured advantage stage for card draws.
Get or create a character deck for this actor from a base deck. Creates the deck under the "zzSystem Decks" folder and clones all cards from the base deck. Sets the new deck as default only if no default is currently set.
The base deck to create from
The character deck and whether it was newly created
Augment the actor's default getRollData() method by appending the data object generated by its DataModel's getRollData(), or null. This polymorphic approach is useful when you have actors & items that share a parent Document but have slightly different data preparation needs.
Note: effectiveHp is included at both data.vitals.effectiveHp (from DataModel)
and data.effectiveHp (top-level copy below). Both address paths resolve in
Roll formulas — this is a convenience duplication; scripts may reference either.
Merged roll data from DataModel + this document level
Get the roll formula for a given attribute or vector.
Optionalarchetype?: stringThe archetype key (required for attributes)
Optionalattribute?: stringThe attribute key
Optionalvector?: stringThe vector key
Returns the highest-priority rune item on this actor that responds to the given rune name (direct name match or subrune membership), or null if none is found. Note: This returns only direct-owned runes, not socketed runes. Use runeCandidatesFor for all candidates.
Open the resource management interface for this actor.
Open the rest dialog for this actor.
Get all rune candidates (direct-owned and socketed) that respond to the given rune name, sorted by priority (direct first, then by item priority desc).
The rune name to search for
Convert the actor document to a plain object.
The built in toObject() method will ignore derived data when using Data Models.
This additional method will instead use the spread operator to return a simplified
version of the data.
Plain object either via deepClone or the spread operator.
Open the roll data viewer for this actor.
Extend the base Actor document by defining a custom roll data structure which is ideal for the Simple system.