decoration for debuffs
This commit is contained in:
16
skill.go
16
skill.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user