[Medium] [Bug] Procedural guardians (floor 250+) missing shield, barrier, and healthRegen fields #365
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Medium
File:
src/lib/game/data/guardian-encounters.ts(lines 113-330)Description:
The
mk()helper inguardian-data.tsincludesshield,shieldRegen,barrier,barrierRegen,healthRegen, andhealthRegenIsPercentin every static guardian definition. However, all five procedural guardian generator functions (getTier4GuardianthroughgetTier8Guardian) inguardian-encounters.tsomit 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
.shieldor.barrieron these guardians will getundefined, which could produceNaNin damage calculations.Fix needed: Add the missing defensive fields to all procedural guardian generators, scaling appropriately with tier and floor.
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.