feat: increase turn timeout to 10s and expand help screen

- 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) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 23:15:12 +09:00
parent f6419b7984
commit 24d9982b15
4 changed files with 19 additions and 8 deletions

View File

@@ -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},

View File

@@ -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)

View File

@@ -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")
}
}

View File

@@ -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