feat: add shared styles and monster ASCII art
This commit is contained in:
67
ui/ascii_art.go
Normal file
67
ui/ascii_art.go
Normal file
@@ -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{` ??? `}
|
||||||
|
}
|
||||||
|
}
|
||||||
32
ui/styles.go
Normal file
32
ui/styles.go
Normal file
@@ -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)
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user