[Medium] [Bug] Procedural guardians (floor 250+) missing shield, barrier, and healthRegen fields #365

Closed
opened 2026-06-10 19:29:21 +02:00 by Anexim · 1 comment
Owner

Severity: Medium
File: src/lib/game/data/guardian-encounters.ts (lines 113-330)

Description:
The mk() helper in guardian-data.ts includes shield, shieldRegen, barrier, barrierRegen, healthRegen, and healthRegenIsPercent in every static guardian definition. However, all five procedural guardian generator functions (getTier4Guardian through getTier8Guardian) in guardian-encounters.ts omit all six of these fields entirely.

Impact: Guardians at floors 250+ have no shield, barrier, or health regen, making them significantly easier to kill than intended. The static guardians at floors 170-240 include substantial defensive stats, but procedural guardians at 250+ have none. Additionally, any combat system that reads .shield or .barrier on these guardians will get undefined, which could produce NaN in damage calculations.

Fix needed: Add the missing defensive fields to all procedural guardian generators, scaling appropriately with tier and floor.

**Severity:** Medium **File:** `src/lib/game/data/guardian-encounters.ts` (lines 113-330) **Description:** The `mk()` helper in `guardian-data.ts` includes `shield`, `shieldRegen`, `barrier`, `barrierRegen`, `healthRegen`, and `healthRegenIsPercent` in every static guardian definition. However, all five procedural guardian generator functions (`getTier4Guardian` through `getTier8Guardian`) in `guardian-encounters.ts` **omit all six of these fields entirely**. **Impact:** Guardians at floors 250+ have no shield, barrier, or health regen, making them significantly easier to kill than intended. The static guardians at floors 170-240 include substantial defensive stats, but procedural guardians at 250+ have none. Additionally, any combat system that reads `.shield` or `.barrier` on these guardians will get `undefined`, which could produce `NaN` in damage calculations. **Fix needed:** Add the missing defensive fields to all procedural guardian generators, scaling appropriately with tier and floor.
Anexim added the ai:todo label 2026-06-10 19:29:21 +02:00
n8n-gitea was assigned by Anexim 2026-06-10 19:29:21 +02:00
Anexim added ai:done and removed ai:todo labels 2026-06-11 11:38:07 +02:00
Author
Owner

Fixed: Added shield, shieldRegen, barrier, barrierRegen, healthRegen, and healthRegenIsPercent fields to all 5 procedural guardian generator functions (tiers 4-8). Also extracted procedural generators into guardian-procedural.ts to stay under 400-line limit.

Fixed: Added shield, shieldRegen, barrier, barrierRegen, healthRegen, and healthRegenIsPercent fields to all 5 procedural guardian generator functions (tiers 4-8). Also extracted procedural generators into guardian-procedural.ts to stay under 400-line limit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#365