Periodic Invuln
What it is
Periodic Invuln is a boss-flavored affix that cycles the host between a vulnerable interval and a short invulnerability window on a fixed cadence. While the window is active, the host takes zero damage. An optional anchor-cancel rule can cut a window short when a designated anchor-enemy type is no longer alive in the world, giving the player a tool to break the invulnerability ahead of schedule.
Identity
| Field | Value |
|---|---|
| Affix ID | periodic_invuln |
| Category | boss-flavored |
| Priority | 85 |
| Hooks | onUpdate, filterIncomingDamage |
| Roll pool | none (excluded from the world-roaming elite roll) |
| Boss roster usage | none (reserved primitive; no v1 boss consumes it) |
Periodic Invuln sits below the shielded family (priority 100), respawn-as (95), and gated (90) in the boss damage-filter chain, and above reflective (80) and armored (20). When its window is active, its filter returns 0 and short-circuits every lower-priority filter for the same hit.
What it does
The affix runs a two-phase cycle on every frame the host is alive:
- Inactive phase. The cycle timer counts down from the window interval. During this phase the damage filter is a pass-through (incoming damage is returned unchanged).
- Active phase. When the inactive timer reaches zero, the affix flips active and the cycle timer is reset to the window duration. During this phase the damage filter returns 0 for every incoming hit. When the active timer reaches zero, the affix flips back to inactive and the cycle timer is reset to the window interval.
The cycle is unbounded: once spawned, the host loops vulnerable interval → invuln window → vulnerable interval indefinitely.
Anchor-cancel rule
If the host’s affix state declares an anchor-cancel type, the active phase ends as soon as no enemy of that type exists alive in the world with the boss-anchor flag set. The check runs every frame the affix is active. When the cancel fires, the affix flips back to inactive and the cycle timer is reset to the window interval — the same reset path as a natural window expiry. The check looks for live enemies (existing, not frozen-for-lag, not dying, HP greater than zero, alive flag set) whose type matches the configured anchor type and whose boss-anchor flag is true.
If no anchor-cancel type is configured, only the natural cycle timer ends the window.
Default values
| Param | Default | State key |
|---|---|---|
| Window duration (active phase length) | 3 s | windowDuration |
| Window interval (inactive phase length, also initial timer) | 10 s | windowInterval |
| Anchor-cancel type | unset (empty string) | cancelAnchorTypeId |
On the first hook invocation the affix seeds the cycle timer to the window interval (so a freshly spawned host starts in the inactive phase with a full vulnerable runway) and seeds active to false. Subsequent reads only refresh windowDuration, windowInterval, and cancelAnchorTypeId from the state block — the live cycleTimer and active fields are preserved across frames.
Mistyped overrides (number expected, string given) throw at first hook invocation.
Per-tier values
Periodic Invuln has no tiers. All three parameters are continuous overrides driven by the host’s affix-state block; the runtime only enforces type and falls back to the defaults above when a key is missing.
How it interacts
Boss damage-filter chain
| Priority | Affix | Effect on host hit during active window |
|---|---|---|
| 100 | shielded / shielded_respawn | Resolves first; if anchors alive, returns 0 and periodic_invuln is never consulted |
| 95 | respawn_as | onUpdate only; does not filter incoming damage |
| 90 | gated | Resolves before periodic_invuln; if any gate-group sibling alive, returns 0 |
| 85 | periodic_invuln | Returns 0 while active; otherwise pass-through |
| 80 | reflective | Reached only if periodic_invuln is inactive; reserved stub today |
| 20 | armored | Reached only if periodic_invuln is inactive; multiplies remaining damage |
A higher-priority filter returning 0 short-circuits periodic_invuln. While periodic_invuln returns 0, every filter below it (reflective, armored) is skipped for that hit.
Boss room culling
The boss-room out-of-bounds sweep exempts entities flagged as the boss, the boss’s HP-sharing entourage, or boss anchors. This exemption protects the anchor enemies that periodic_invuln’s anchor-cancel rule reads, so a wall sliding across an anchor’s ring position never silently breaks the cancel rule.
Anchor-cancel design hook
Anchor-cancel reuses the boss-anchor identity (the same flag carried by shielded and shielded_respawn anchors). A boss that uses periodic_invuln with cancel must spawn anchors of the configured type through a separate mechanism — periodic_invuln does not spawn anchors itself. Killing the named anchor type ends the current invuln window early but does not change the cycle cadence afterward: the next window still arrives one window-interval later.
Contrast with phasing
The world-roaming elite affix phasing implements a similar windowed invulnerability with a single down-counter (active while the timer is at or below window duration, otherwise inactive). Periodic Invuln tracks active state as an explicit boolean and supports the anchor-cancel early break; phasing does not. The two affixes are not interchangeable — phasing is rolled on elite-pack leaders, periodic_invuln is reserved for boss rosters.
EXTRACT-CANDIDATE
- The boss damage-filter priority order and zero-return short-circuit rule is a global affix-system rule shared by every host filter; canonical home is the affixes overview page.
- The boss-anchor identity flag (used here for the anchor-cancel check, and by shielded for damage gating) is a shared primitive across multiple affixes and belongs on a future anchor-enemy concept page rather than repeated per affix.
- The live-entity definition (exists, not frozen-for-lag, not dying, HP greater than zero, alive flag set) is reused by every affix that scans world enemies; canonical home is the affixes overview page.