Pathfinder 1e for Foundry VTT
    Preparing search index...

    Trap actor data model

    Hierarchy (View Summary)

    Index

    General

    _rollData: any
    bypass: "lock" | "hiddenSwitch" | "hiddenLock"
    cr: { offset: number }
    details: { xp: { value: number } } | undefined
    disarm: number
    duration: {
        units:
            | "round"
            | "minute"
            | "hour"
            | "day"
            | "perm"
            | "seeText"
            | "spec"
            | "inst"
            | "turn"
            | "month"
            | "year";
        value: string;
    }
    effect: HTML
    notes: HTML
    perception: number
    reset: {
        type: "manual" | "automatic" | "repair";
        units:
            | "round"
            | "minute"
            | "hour"
            | "day"
            | "perm"
            | "seeText"
            | "spec"
            | "inst"
            | "turn"
            | "month"
            | "year";
        value: string;
    }
    resources: any
    technology: boolean
    trigger: {
        type:
            | "spell"
            | "manual"
            | "touch"
            | "electricEyes"
            | "genetic"
            | "location"
            | "proximity"
            | "sound"
            | "timed"
            | "visual";
        units: | "round"
        | "minute"
        | "hour"
        | "day"
        | "perm"
        | "seeText"
        | "spec"
        | "inst"
        | "turn"
        | "month"
        | "year";
        value: Formula;
        vision: | "seeInDarkness"
        | "arcaneEye"
        | "clairvoyance"
        | "darkvision"
        | "trueSeeing";
    }
    type: "magic" | "mechanical"
    • get system(): this

      Returns this

      REMOVE BEFORE RELEASE

    • Returns void

    • Internal

      Parameters

      • error: boolean

      Returns void

    • Get challenge rating.

      Returns number

      • CR
    • Parameters

      • _type: any

      Returns { run: boolean; speed: number; step: boolean }

    • Parameters

      • path: any

      Returns never[]

    • Roll a perception check for the trap

      Parameters

      Returns Promise<any>

      • The chat message if one was created, or its data if not. void if the roll was cancelled.

    Document

    • Internal

      Update Item Resource

      Parameters

      • item: ItemPF<BaseItemModel>

        the item to add to the actor's resources

      • Optionaloptions: { warnOnDuplicate?: boolean } = {}

        extra options

        • OptionalwarnOnDuplicate?: boolean

          Skips warning if item tag already exists in dictionary flags

      Returns boolean

      True if resources were set

    Extension API

    • Returns void

    • Prepare actor.changeFlags alterations.

      Returns void

    • Prepare changes specific to this actor type

      Parameters

      • changes: any

      Returns void

    • Prepare data post embedded documents have been prepared.

      This is before changes and before prepareDerivedData()

      Returns void

    • Prepare data post change application.

      This is called inside prepareDerivedData()

      Returns void

    • Custom change targets for this actor type

      Returns string[]

    • Initiative rolling options

      Returns object

    • Generate generic labels.

      Returns object

    • Parameters

      • options: { cache: boolean; refresh: boolean } = ...

      Returns any

    Internal

    • Internal

      Get the perception modifier for the trap to detect triggers

      Returns number

      The perception modifier for the trap