Realmlords — V4.6.4 Major Patch
### Performance
- Significantly reduced lag during gameplay, especially in rooms with many entities on screen
- Fixed gradual performance degradation that occurred level-by-level over long sessions
- Fixed critical memory leak where enemy death animation elements were accumulating in the DOM
- Fixed stale pathfinding cache causing AI slowdowns across level transitions
- Cleared projectile, particle, and runtime effect arrays between level transitions to prevent accumulation
- Optimized enemy AI pathfinding with room adjacency caching
- Optimized fog of war rendering, enemy separation forces, and entity distance calculations
### Gameplay — Skill Trees
- Skill trees now allow free investment across all three trees — no more forced single-tree commitment
- Unlocking the next tier of skills now requires **3 points** spent in the previous tier (per tree)
- Rebalanced attack abilities across all trees for every class — no single tree should dominate offensive options
- Added new attack abilities to underserved trees: Wizard, Warrior, Paladin, Druid, and Bard all received new skills
- Corrected skill icon assignments — all abilities now have unique, class-appropriate icons
- Fixed broken/fallback icons across all classes including Bard Musical Spells
- Arcane skills now correctly display purple-toned visuals; Bard abilities corrected for color theme
- Skill tree hover text now correctly shows the required tier progress (e.g., "1/3 — 2 more needed")
- Removed "Auto-pick abilities on level-up" toggle
### Gameplay — Items & Inventory
- Fixed item generation scaling — items now properly scale in power as you progress through levels and realms
- Starting weapons have been rebalanced with correct damage caps per weapon type
- Fixed all classes incorrectly starting with 2 weapons (one equipped, one in the bag)
- Fixed Common weapons of the same type persisting in inventory when auto-features are on
- Auto-equip now correctly equips the best item in each slot
- Auto-sell now correctly sells all inferior and equal-stat unequipped items — no more buildup
- Fixed chest-guaranteed items permanently blocking auto-sell
- Fixed rings and armor not correctly comparing against equipped items during auto-sell
- Manual sell buttons now correctly bypass all keeper guards
### Gameplay — Hazards
- Spinning blade traps now have health and can be destroyed by player projectiles
- Spinning blade traps display a color-coded health bar (always visible)
- Destroyed blade traps play a pillar-style death effect with particle burst and `Anvil` sound
- Blade traps do not award experience on death
### Visual Effects
- **Mana Surge trails** are now fully rainbow — all elements (fire, ice, lightning, arcane, holy, etc.) cycle through a multicolored spectrum while swirling
- Bow arrow Mana Surge arrowhead glow and tip streak also cycle rainbow colors
- Rainbow effect applies to all rendering paths (Canvas2D and p5 fallback)
### UI & HUD
- Floating damage numbers and health bars no longer drift off screen
- "Inventory Full" message now correctly positions above the player like other floaters
- Floating messages are properly cleared on level transition
- Added a short level loading bar between level transitions to prevent asset pop-in
- Sage Shop ability offers now display ability descriptions and your current owned rank before purchasing
- Artifact names have been reworked to be more thematic and readable
### Audio
- Fixed audio not playing on game start and menu button clicks
- AudioContext now reliably resumes after any user input (click, key press, or touch)
- Replaced missing `ButtonClick.ogg` reference with correct audio file
### Multiplayer
- Fixed player index assignment causing desyncs when joining a co-op session
- Fixed realm boss victory and realm anger state not syncing to clients
- Fixed disconnect not properly returning players to the main menu
- Fixed item loss on failed inventory transfer — sender now receives the item back
- Removed duplicate multiplayer function definitions
:::
