decoration for debuffs

This commit is contained in:
2026-01-17 00:12:51 -05:00
parent 2aebd0144b
commit 2e5f923831
3 changed files with 18 additions and 2 deletions

View File

@@ -34,7 +34,10 @@ func RenderSkill(id horse.SkillID, all map[horse.SkillID]horse.Skill, groups map
// should be passive (green)
r.AccentColor = 0x66ae1c
skilltype = "Passive Skill"
// TODO(zeph): debuff (red)
case isDebuff(s):
// debuff (red)
r.AccentColor = 0xe34747
skilltype = "Debuff Skill"
case s.Rarity == 1:
// common (white)
r.AccentColor = 0xcccccc
@@ -99,6 +102,17 @@ func formatCondition(s string) string {
return "`" + s + "`"
}
func isDebuff(s horse.Skill) bool {
for _, act := range s.Activations {
for _, a := range act.Abilities {
if a.Value < 0 {
return true
}
}
}
return false
}
// TODO(zeph): autocomplete
// if we want to backgroundify construction of an autocomplete map,
// use sync.OnceValue and launch a goroutine in main to get the value and discard it