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:
@@ -63,7 +63,7 @@ func defaults() Config {
|
|||||||
return Config{
|
return Config{
|
||||||
Server: ServerConfig{SSHPort: 2222, HTTPPort: 8080},
|
Server: ServerConfig{SSHPort: 2222, HTTPPort: 8080},
|
||||||
Game: GameConfig{
|
Game: GameConfig{
|
||||||
TurnTimeoutSec: 5, MaxPlayers: 4, MaxFloors: 20,
|
TurnTimeoutSec: 10, MaxPlayers: 4, MaxFloors: 20,
|
||||||
CoopBonus: 0.10, InventoryLimit: 10, SkillUses: 3,
|
CoopBonus: 0.10, InventoryLimit: 10, SkillUses: 3,
|
||||||
},
|
},
|
||||||
Combat: CombatConfig{FleeChance: 0.50, MonsterScaling: 1.15, SoloHPReduction: 0.50},
|
Combat: CombatConfig{FleeChance: 0.50, MonsterScaling: 1.15, SoloHPReduction: 0.50},
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ func TestLoadDefaults(t *testing.T) {
|
|||||||
if cfg.Server.HTTPPort != 8080 {
|
if cfg.Server.HTTPPort != 8080 {
|
||||||
t.Errorf("expected HTTP port 8080, got %d", cfg.Server.HTTPPort)
|
t.Errorf("expected HTTP port 8080, got %d", cfg.Server.HTTPPort)
|
||||||
}
|
}
|
||||||
if cfg.Game.TurnTimeoutSec != 5 {
|
if cfg.Game.TurnTimeoutSec != 10 {
|
||||||
t.Errorf("expected turn timeout 5, got %d", cfg.Game.TurnTimeoutSec)
|
t.Errorf("expected turn timeout 10, got %d", cfg.Game.TurnTimeoutSec)
|
||||||
}
|
}
|
||||||
if cfg.Game.MaxPlayers != 4 {
|
if cfg.Game.MaxPlayers != 4 {
|
||||||
t.Errorf("expected max players 4, got %d", cfg.Game.MaxPlayers)
|
t.Errorf("expected max players 4, got %d", cfg.Game.MaxPlayers)
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ func TestSessionTurnTimeout(t *testing.T) {
|
|||||||
select {
|
select {
|
||||||
case <-done:
|
case <-done:
|
||||||
// Turn completed via timeout
|
// Turn completed via timeout
|
||||||
case <-time.After(7 * time.Second):
|
case <-time.After(12 * time.Second):
|
||||||
t.Error("Turn did not timeout within 7 seconds")
|
t.Error("Turn did not timeout within 12 seconds")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,11 +29,16 @@ func renderHelp(width, height int) string {
|
|||||||
title := styleHeader.Render("── Controls ──")
|
title := styleHeader.Render("── Controls ──")
|
||||||
|
|
||||||
sections := []struct{ header, body string }{
|
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
|
{"Exploration", ` [Up/Down] Select room
|
||||||
[Enter] Move to room
|
[Enter] Move to room
|
||||||
|
[[] / []] Allocate skill point (branch 1/2)
|
||||||
[/] Chat
|
[/] Chat
|
||||||
[Q] Quit`},
|
[Q] Quit`},
|
||||||
{"Combat", ` [1] Attack [2] Skill
|
{"Combat (10s per turn)", ` [1] Attack [2] Skill
|
||||||
[3] Use Item [4] Flee
|
[3] Use Item [4] Flee
|
||||||
[5] Defend [Tab] Switch Target
|
[5] Defend [Tab] Switch Target
|
||||||
[/] Chat`},
|
[/] Chat`},
|
||||||
@@ -43,10 +48,16 @@ func renderHelp(width, height int) string {
|
|||||||
Mage 70HP 20ATK 3DEF Fireball (AoE 0.8x)
|
Mage 70HP 20ATK 3DEF Fireball (AoE 0.8x)
|
||||||
Healer 90HP 8ATK 5DEF Heal (restore 30HP)
|
Healer 90HP 8ATK 5DEF Heal (restore 30HP)
|
||||||
Rogue 85HP 15ATK 4DEF Scout (reveal rooms)`},
|
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
|
{"Tips", ` • Skills have 3 uses per combat
|
||||||
• Co-op bonus: 10% extra when 2+ attack same target
|
|
||||||
• Items are limited to 10 per player
|
• 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
|
var content string
|
||||||
|
|||||||
Reference in New Issue
Block a user