From 7fc13a6a32dc952e408d43330c5194044a876fde Mon Sep 17 00:00:00 2001 From: tolelom <98kimsungmin@naver.com> Date: Tue, 24 Mar 2026 12:36:10 +0900 Subject: [PATCH] feat: add shared styles and monster ASCII art --- ui/ascii_art.go | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ ui/styles.go | 32 +++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 ui/ascii_art.go create mode 100644 ui/styles.go diff --git a/ui/ascii_art.go b/ui/ascii_art.go new file mode 100644 index 0000000..e991c3d --- /dev/null +++ b/ui/ascii_art.go @@ -0,0 +1,67 @@ +package ui + +import "github.com/tolelom/catacombs/entity" + +// MonsterArt returns ASCII art lines for a monster type. +func MonsterArt(mt entity.MonsterType) []string { + switch mt { + case entity.MonsterSlime: + return []string{ + ` /\OO/\ `, + ` \ / `, + ` |__| `, + } + case entity.MonsterSkeleton: + return []string{ + ` ,--. `, + ` |oo| `, + ` /||\ `, + } + case entity.MonsterOrc: + return []string{ + ` .---. `, + `/o o\`, + `| --- |`, + } + case entity.MonsterDarkKnight: + return []string{ + ` /|||\ `, + ` |===| `, + ` | | `, + } + case entity.MonsterBoss5: + return []string{ + ` /\ /\ `, + `| @ @ |`, + `| || |`, + `| \__/ |`, + ` \ / `, + } + case entity.MonsterBoss10: + return []string{ + ` __|__ `, + ` /|o o|\ `, + ` | === | `, + ` |\___/| `, + ` |___| `, + } + case entity.MonsterBoss15: + return []string{ + ` ,=====. `, + `/ \ / \`, + `| (O) |`, + ` \ |=| / `, + ` '===' `, + } + case entity.MonsterBoss20: + return []string{ + ` ___/\___ `, + `| x x |`, + `| === |`, + `|\_____/|`, + `|_| |_|`, + } + default: + return []string{` ??? `} + } +} diff --git a/ui/styles.go b/ui/styles.go new file mode 100644 index 0000000..2c51907 --- /dev/null +++ b/ui/styles.go @@ -0,0 +1,32 @@ +package ui + +import "github.com/charmbracelet/lipgloss" + +// Colors +var ( + colorRed = lipgloss.Color("196") + colorGreen = lipgloss.Color("46") + colorYellow = lipgloss.Color("226") + colorCyan = lipgloss.Color("51") + colorMagenta = lipgloss.Color("201") + colorWhite = lipgloss.Color("255") + colorGray = lipgloss.Color("240") + colorOrange = lipgloss.Color("208") + colorPink = lipgloss.Color("205") +) + +// Text styles +var ( + styleDamage = lipgloss.NewStyle().Foreground(colorRed).Bold(true) + styleHeal = lipgloss.NewStyle().Foreground(colorGreen).Bold(true) + styleCoop = lipgloss.NewStyle().Foreground(colorYellow).Bold(true) + styleFlee = lipgloss.NewStyle().Foreground(colorCyan) + styleStatus = lipgloss.NewStyle().Foreground(colorMagenta) + styleGold = lipgloss.NewStyle().Foreground(colorYellow) + styleSystem = lipgloss.NewStyle().Foreground(colorGray).Italic(true) + styleEnemy = lipgloss.NewStyle().Foreground(colorRed) + stylePlayer = lipgloss.NewStyle().Foreground(colorWhite).Bold(true) + styleHeader = lipgloss.NewStyle().Foreground(colorPink).Bold(true) + styleAction = lipgloss.NewStyle().Bold(true) + styleTimer = lipgloss.NewStyle().Foreground(colorYellow).Bold(true) +)