Skip to content

Add equipment effects, boss phase 2, locked chests, and combat enhancements - #30

Merged
phaax merged 1 commit into
mainfrom
claude/find-missing-gameplay-features-JVvZx
Apr 17, 2026
Merged

Add equipment effects, boss phase 2, locked chests, and combat enhancements#30
phaax merged 1 commit into
mainfrom
claude/find-missing-gameplay-features-JVvZx

Conversation

@phaax

@phaax phaax commented Apr 17, 2026

Copy link
Copy Markdown
Owner

Summary

This PR introduces a comprehensive set of combat and equipment system enhancements, including equipment stat bonuses, boss phase transitions, locked chest mechanics, and various combat balance improvements.

Key Changes

Equipment System

  • Added applyItemEffect() and removeItemEffect() functions to handle stat modifications when equipping/unequipping items
  • Implemented support for multiple effect types: HP/MP bonuses, stat increases, defense bonuses, fire damage, dodge chance, and curses
  • Added getEffectDescription() to display human-readable effect descriptions in the inventory UI
  • Updated inventory screen to show equipment effects and handle cursed item warnings
  • Added helmet defense calculation to getPlayerDefense()

Combat Enhancements

  • Implemented strength boost potion mechanic: str_boost effect grants +2 STR for 5 turns with turn counter management
  • Added fire damage bonus from accessories (Ring of Fire) to player attacks
  • Added luck bonus from accessories to dodge chance calculations
  • Improved dodge chance comment to reflect all contributing factors (race traits, skills, accessories)

Boss Phase 2 System

  • Bosses now enter "RAGE" phase when HP drops below 50%
  • Phase 2 triggers increased damage for boss abilities:
    • Fire breath: 3d8 → 4d12
    • Inferno: 5d10 → 7d15
    • Death bolt: 4d10 → 6d15
    • Drain life: 20 HP → 30 HP
  • Boss melee attacks deal 30% more damage in phase 2

Locked Chest Mechanics

  • 30% of generated chests are now locked
  • Lockpicking skill provides 80% success rate; lockpick item alone provides 50%
  • Lockpick items break on failed attempts (when used without skill)
  • Appropriate system messages for success/failure states

UI Improvements

  • Inventory screen now displays equipment effects with color coding (cyan for normal, magenta for cursed)
  • Dynamic layout for item details to accommodate effect descriptions
  • Added cursed item indicator on equipped items
  • Improved item stat display formatting

Implementation Details

  • Strength boost counter decrements at the start of each player turn with system message on expiration
  • Equipment effects are properly applied/removed when swapping items in the same slot
  • Boss phase state is tracked via monster.currentPhase property
  • Accessory bonuses use underscore-prefixed player properties (_bonusDef, _fireDmgBonus, _luckBonus)

https://claude.ai/code/session_01EhQjxFs3KkqgUTyt8KsK6S

…ss phases

- Equipment effects now apply on equip/unequip (Ring of Strength,
  Amulet of Vigor, Ring of Magic, Ring of Protection, etc. are
  fully functional for the first time; cursed items penalise stats)
- Helmet defense and accessory def2 bonus included in combat
  defense calculation (previously only armor and offhand counted)
- Ring of Fire fire damage bonus and Lucky Charm dodge bonus now
  applied during combat
- Strength Potion grants a real +2 STR buff for 5 turns in combat,
  displayed in the log when it wears off
- Boss AI enters phase 2 (enrage) at 50% HP: +30% base damage,
  boosted special abilities (fire_breath, inferno, death_bolt,
  drain_life)
- Dungeons generate with ~30% locked chests; require lockpick item
  (50% success, breaks on failure) or lockpicking skill (80%
  success) to open
- Inventory detail panel shows item effect descriptions (e.g.
  "+10 Max HP", "+2 Strength") and highlights cursed items in
  magenta

https://claude.ai/code/session_01EhQjxFs3KkqgUTyt8KsK6S
@phaax
phaax merged commit fa3a8d6 into main Apr 17, 2026
2 checks passed
@phaax
phaax deleted the claude/find-missing-gameplay-features-JVvZx branch April 17, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants