Skip to content

feat: Game Systems Sprint - Issues #413, #415, #416#497

Merged
PipFoweraker merged 3 commits intomainfrom
feature/game-systems
Dec 19, 2025
Merged

feat: Game Systems Sprint - Issues #413, #415, #416#497
PipFoweraker merged 3 commits intomainfrom
feature/game-systems

Conversation

@PipFoweraker
Copy link
Owner

@PipFoweraker PipFoweraker commented Dec 19, 2025

Summary

This PR completes all three issues from the 48-hour game systems sprint:

Issue #413: Public Opinion System Logic Issues ✅

  • Fixed metric name mismatch in media_story.gd:apply_effects()
  • Changed "sentiment" to "public_sentiment" and "trust" to "lab_trust"
  • Media stories now correctly affect public opinion metrics

Issue #415: Smart Action Button Discovery System ✅

  • Implemented tech-tree style action discovery system
  • Added is_action_unlocked() and get_unlock_hint() functions
  • Supported unlock conditions: turn, staff, reputation, papers, research, upgrade
  • Actions hide until unlock conditions are met

Issue #416: Technical Debt Visualization System ✅

  • Added complete technical debt tracking to game_state.gd
  • Created TechDebtIndicator UI component with visual progress bar
  • Integrated doom system contribution (5% per debt point above 20)
  • Added turn-commit warnings at 50% and 75% debt levels

Files Changed

File Changes
media_story.gd Fixed metric names
actions.gd Added unlock system (+108 lines)
main_ui.gd Unlock filtering, tech debt warnings
game_state.gd Technical debt system (+87 lines)
tech_debt_indicator.gd New UI component (143 lines)

Action Unlock Conditions

Action Unlock Requirement
Team Building 2+ staff
Safety Audit Turn 5+
Strategic submenu Turn 10+ and 30+ reputation
Travel & Conferences 1+ papers published

Test Plan

  • Media stories correctly affect public_sentiment and lab_trust
  • Locked actions are hidden, unlock as conditions are met
  • Technical debt accumulates and shows in warnings
  • High tech debt contributes to doom

Fixes #413
Fixes #415
Fixes #416

🤖 Generated with Claude Code

PipFoweraker and others added 2 commits December 19, 2025 15:27
The apply_effects() function was using incorrect metric names:
- "sentiment" should be "public_sentiment"
- "trust" should be "lab_trust"

This mismatch caused media stories to silently fail to affect
public opinion, as update_opinion() didn't recognize the metric
names and triggered warnings instead of applying changes.

The naming convention was established in the Phase 1 implementation
(commit 2b554b2) but apply_effects() wasn't updated to match.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Implements a tech-tree style action discovery system where actions
unlock based on game state and progress:

## New Features in actions.gd:
- is_action_unlocked(): Check if action meets unlock conditions
- get_unlock_hint(): Get tooltip text explaining unlock requirements
- Unlock condition types supported:
  - turn_min: Minimum turn number
  - staff_min: Minimum staff count
  - reputation_min: Minimum reputation
  - papers_min: Minimum papers published
  - research_min: Minimum research points
  - has_upgrade: Requires specific upgrade

## Actions with unlock conditions:
- Team Building: Requires 2+ staff
- Safety Audit: Unlocks at turn 5
- Strategic submenu: Turn 10 + 30 reputation
- Travel & Conferences: Requires 1+ papers

## UI Integration in main_ui.gd:
- Actions are filtered before display
- Locked actions are hidden (not grayed out)
- Debug logging shows unlock/lock counts

This reduces early-game cognitive load by showing only relevant
actions and creates a natural progression as players grow their lab.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@PipFoweraker PipFoweraker changed the title fix: Public Opinion System Logic Issues (#413) feat: Game Systems Sprint - Issues #413 and #415 Dec 19, 2025
Implements a complete technical debt tracking and visualization system:

## Core System (game_state.gd):
- Added `technical_debt` variable (0-100 scale)
- Constants: MAX_TECHNICAL_DEBT, TECH_DEBT_DOOM_MULTIPLIER (5%)
- add_technical_debt(amount, reason): Accumulate debt with logging
- reduce_technical_debt(amount, reason): Pay down debt
- get_tech_debt_status(): Returns "minimal/low/moderate/high/critical"
- get_tech_debt_color(): Returns severity color for UI
- get_tech_debt_failure_chance(): Calculates failure probability
- Integrated with doom_system.doom_sources["technical_debt"]
- Added to to_dict() for UI serialization

## UI Component (tech_debt_indicator.gd):
- Visual progress bar with threshold markers
- Color-coded severity levels (green -> yellow -> orange -> red)
- Hover tooltips with warning messages
- Signals for click/hover events

## UI Integration (main_ui.gd):
- Added tech debt warnings at 50% and 75% levels
- Warnings appear when committing turn actions
- Matches existing warning pattern (doom, reputation, money)

Technical debt above 20 contributes to doom via TECH_DEBT_DOOM_MULTIPLIER.
Failure chance scales at 2% per 10 debt points above threshold.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@PipFoweraker PipFoweraker changed the title feat: Game Systems Sprint - Issues #413 and #415 feat: Game Systems Sprint - Issues #413, #415, #416 Dec 19, 2025
@PipFoweraker PipFoweraker merged commit b77f87b into main Dec 19, 2025
20 of 21 checks passed
@PipFoweraker PipFoweraker deleted the feature/game-systems branch December 19, 2025 05:07
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.

Enhancement: Technical Debt Visualization System Smart Action Button Discovery System (Tech Tree Style) Public Opinion System Logic Issues

1 participant