{{- define "go-skill-data" -}} package {{ $.Region }} // Automatically generated with horsegen; DO NOT EDIT import . "git.sunturtle.xyz/zephyr/horse/horse" {{/* //go:generate go run golang.org/x/tools/cmd/stringer@v0.41.0 -type SkillID -trimprefix Skill -linecomment */ -}} const ( {{- range $s := $.Skills }} Skill{{ goenum $s.Name }}{{ if ne $s.InheritID 0 }}Inherit{{ end }} SkillID = {{ $s.ID }} // {{ $s.Name }} {{- end }} ) var AllSkills = map[SkillID]Skill{ {{- range $s := $.Skills }} Skill{{ goenum $s.Name }}{{ if ne $s.InheritID 0 }}Inherit{{ end }}: { {{ $s.ID }}, {{ printf "%q" $s.Name }}, {{ printf "%q" $s.Description }}, {{ $s.GroupID }}, {{ $s.Rarity }}, {{ $s.GroupRate }}, {{ $s.GradeValue }}, {{ $s.WitCheck }}, []Activation{ {{- range $a := $s.Activations }} {{- if ne $a.Condition "" }} { {{ printf "%q" $a.Precondition }}, {{ printf "%q" $a.Condition }}, {{ $a.Duration }}, {{ $a.Cooldown }}, []Ability{ {{- range $abil := $a.Abilities }} {{- if ne $abil.Type 0 }} { {{- $abil.Type }}, {{ $abil.ValueUsage }}, {{ $abil.Value }}, {{ $abil.Target }}, {{ $abil.TargetValue -}} }, {{- end }} {{- end }} }, }, {{- end }} {{- end }} }, {{ $s.SPCost }}, {{ $s.IconID }}, }, {{- end }} } var SkillNameToID = map[string]SkillID{ {{- range $s := $.Skills }} {{ printf "%q" $s.Name }}{{ if ne $s.InheritID 0 }} + " (Inherited)"{{ end }}: {{ $s.ID }}, {{- end }} } {{ end }}