From 24d9982b1523f4f91e9dc407ec3c61ba1e750c23 Mon Sep 17 00:00:00 2001 From: tolelom <98kimsungmin@naver.com> Date: Wed, 25 Mar 2026 23:15:12 +0900 Subject: [PATCH] feat: increase turn timeout to 10s and expand help screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Turn timeout 5s → 10s for more comfortable gameplay - Help screen now covers: lobby, exploration, combat, shop, classes, multiplayer tips, and general tips including skill tree controls Co-Authored-By: Claude Opus 4.6 (1M context) --- config/config.go | 2 +- config/config_test.go | 4 ++-- game/session_test.go | 4 ++-- ui/help_view.go | 17 ++++++++++++++--- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/config/config.go b/config/config.go index 42c9246..e752a7a 100644 --- a/config/config.go +++ b/config/config.go @@ -63,7 +63,7 @@ func defaults() Config { return Config{ Server: ServerConfig{SSHPort: 2222, HTTPPort: 8080}, Game: GameConfig{ - TurnTimeoutSec: 5, MaxPlayers: 4, MaxFloors: 20, + TurnTimeoutSec: 10, MaxPlayers: 4, MaxFloors: 20, CoopBonus: 0.10, InventoryLimit: 10, SkillUses: 3, }, Combat: CombatConfig{FleeChance: 0.50, MonsterScaling: 1.15, SoloHPReduction: 0.50}, diff --git a/config/config_test.go b/config/config_test.go index 52fbeef..0d6a1d1 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -16,8 +16,8 @@ func TestLoadDefaults(t *testing.T) { if cfg.Server.HTTPPort != 8080 { t.Errorf("expected HTTP port 8080, got %d", cfg.Server.HTTPPort) } - if cfg.Game.TurnTimeoutSec != 5 { - t.Errorf("expected turn timeout 5, got %d", cfg.Game.TurnTimeoutSec) + if cfg.Game.TurnTimeoutSec != 10 { + t.Errorf("expected turn timeout 10, got %d", cfg.Game.TurnTimeoutSec) } if cfg.Game.MaxPlayers != 4 { t.Errorf("expected max players 4, got %d", cfg.Game.MaxPlayers) diff --git a/game/session_test.go b/game/session_test.go index 6449525..588a914 100644 --- a/game/session_test.go +++ b/game/session_test.go @@ -63,8 +63,8 @@ func TestSessionTurnTimeout(t *testing.T) { select { case <-done: // Turn completed via timeout - case <-time.After(7 * time.Second): - t.Error("Turn did not timeout within 7 seconds") + case <-time.After(12 * time.Second): + t.Error("Turn did not timeout within 12 seconds") } } diff --git a/ui/help_view.go b/ui/help_view.go index fec3d2e..89583da 100644 --- a/ui/help_view.go +++ b/ui/help_view.go @@ -29,11 +29,16 @@ func renderHelp(width, height int) string { title := styleHeader.Render("── Controls ──") sections := []struct{ header, body string }{ + {"Lobby", ` [C] Create room [J] Join by code + [Enter] Join selected room + [D] Daily Challenge [H] Hard Mode toggle + [Q] Back to title`}, {"Exploration", ` [Up/Down] Select room [Enter] Move to room + [[] / []] Allocate skill point (branch 1/2) [/] Chat [Q] Quit`}, - {"Combat", ` [1] Attack [2] Skill + {"Combat (10s per turn)", ` [1] Attack [2] Skill [3] Use Item [4] Flee [5] Defend [Tab] Switch Target [/] Chat`}, @@ -43,10 +48,16 @@ func renderHelp(width, height int) string { Mage 70HP 20ATK 3DEF Fireball (AoE 0.8x) Healer 90HP 8ATK 5DEF Heal (restore 30HP) Rogue 85HP 15ATK 4DEF Scout (reveal rooms)`}, + {"Multiplayer", ` • Up to 4 players per room + • Co-op bonus: +10% dmg when 2+ target same enemy + • Class combos trigger bonus effects + • All players ready → game starts`}, {"Tips", ` • Skills have 3 uses per combat - • Co-op bonus: 10% extra when 2+ attack same target • Items are limited to 10 per player - • Dead players revive next floor at 30% HP`}, + • Dead players revive next floor at 30% HP + • Bosses appear at floors 5, 10, 15, 20 + • Skill points: 1 per floor clear (max 3) + • Weekly mutations rotate gameplay modifiers`}, } var content string