aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_score.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/cmd_score.go')
-rw-r--r--internal/game/cmd_score.go26
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")) {