diff options
| author | historia <[not public]> | 2026-06-16 23:37:50 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-16 23:37:50 -0400 |
| commit | 389e307f205f9b7edf604fb9f86e1038ead736ef (patch) | |
| tree | 595095b5877cc2b0513d31fb126303d8796cc311 /internal/game/cmd_score.go | |
| parent | 085e728d22a3369bd110b77409914cfbe9ebe611 (diff) | |
| download | thehouseoficarus-389e307f205f9b7edf604fb9f86e1038ead736ef.tar.gz | |
feat: major xterm256 color overhaul, see worldbuilding docs.
Diffstat (limited to 'internal/game/cmd_score.go')
| -rw-r--r-- | internal/game/cmd_score.go | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/internal/game/cmd_score.go b/internal/game/cmd_score.go index 2c62839..40d3007 100644 --- a/internal/game/cmd_score.go +++ b/internal/game/cmd_score.go @@ -4,29 +4,35 @@ import ( "fmt" "strconv" - "thirdcollapse/internal/net" - "thirdcollapse/internal/player" + "thehouseoficarus/internal/color" + "thehouseoficarus/internal/net" + "thehouseoficarus/internal/player" ) func (g *Game) doScore(sess *net.Session) { p := sess.Player.(*player.Player) + mode := g.colorMode(sess) sess.WriteLines( "", - fmt.Sprintf("Name: %s", p.Name), - fmt.Sprintf("Combat Level: %d", p.CombatLevel()), - fmt.Sprintf("HP: %d/%d", p.HP, p.MaxHP()), - fmt.Sprintf("Credits: %d", p.Credits), + fmt.Sprintf("Name: %s", g.colorize(sess, "player_name", p.Name)), + fmt.Sprintf("Combat Level: %s", color.Render(mode, color.Parse("230"), fmt.Sprint(p.CombatLevel()))), + fmt.Sprintf("HP: %s/%s", g.colorize(sess, "character_hp", fmt.Sprint(p.HP)), color.Render(mode, color.Parse("230"), fmt.Sprint(p.MaxHP()))), + fmt.Sprintf("Credits: %s", g.colorize(sess, "credits_pickup", fmt.Sprint(p.Credits))), ) - t := &Table{Title: "Skills", Columns: []string{"Skill", "Level", "XP"}} + t := &Table{Title: "Skills", Columns: []string{ + color.Render(mode, color.Parse("75"), "Skill"), + color.Render(mode, color.Parse("230"), "Level"), + color.Render(mode, color.Parse("222"), "XP"), + }} for _, s := range player.AllSkills { level := p.Level(s) xp := p.Skills[s] next := player.XPForNextLevel(xp) t.Rows = append(t.Rows, []string{ - string(s), - strconv.Itoa(level), - fmt.Sprintf("%d / %d XP", xp, xp+next), + color.Render(mode, color.Parse("75"), string(s)), + color.Render(mode, color.Parse("230"), strconv.Itoa(level)), + color.Render(mode, color.Parse("222"), fmt.Sprintf("%d / %d XP", xp, xp+next)), }) } for _, line := range t.Render(p.OptionBool("unicode")) { |
