76 lines
2.1 KiB
Plaintext
76 lines
2.1 KiB
Plaintext
{{- define "go-skill-data" -}}
|
|
package {{ $.Region }}
|
|
|
|
// Automatically generated with horsegen; DO NOT EDIT
|
|
|
|
import . "git.sunturtle.xyz/zephyr/horse/horse"
|
|
|
|
const (
|
|
{{- range $s := $.Skills }}
|
|
Skill{{ goenum $s.Name }}{{ if ne $s.InheritID 0 }}Inherit{{ end }} SkillID = {{ $s.ID }} // {{ $s.Name }}
|
|
{{- end }}
|
|
)
|
|
|
|
var OrderedSkills = [...]SkillID{
|
|
{{- range $s := $.Skills }}
|
|
Skill{{ goenum $s.Name }}{{ if ne $s.InheritID 0 }}Inherit{{ end }},
|
|
{{- end }}
|
|
}
|
|
|
|
var AllSkills = map[SkillID]Skill{
|
|
{{- range $s := $.Skills }}
|
|
Skill{{ goenum $s.Name }}{{ if ne $s.InheritID 0 }}Inherit{{ end }}: {
|
|
ID: {{ $s.ID }},
|
|
Name: {{ printf "%q" $s.Name }}{{ if ne $s.InheritID 0 }} + " (Inherited)"{{ end }},
|
|
Description: {{ printf "%q" $s.Description }},
|
|
Group: {{ $s.GroupID }},
|
|
Rarity: {{ $s.Rarity }},
|
|
GroupRate: {{ $s.GroupRate }},
|
|
GradeValue: {{ $s.GradeValue }},
|
|
{{- if $s.WitCheck }}
|
|
WitCheck: {{ $s.WitCheck }},
|
|
{{- end }}
|
|
Activations: []Activation{
|
|
{{- range $a := $s.Activations }}
|
|
{{- if ne $a.Condition "" }}
|
|
{
|
|
{{- if $a.Precondition }}
|
|
Precondition: {{ printf "%q" $a.Precondition }},
|
|
{{- end }}
|
|
Condition: {{ printf "%q" $a.Condition }},
|
|
Duration: {{ $a.Duration }},
|
|
{{- if $a.Cooldown }}
|
|
Cooldown: {{ $a.Cooldown }},
|
|
{{- end }}
|
|
Abilities: []Ability{
|
|
{{- range $abil := $a.Abilities }}
|
|
{{- if ne $abil.Type 0 }}
|
|
{Type: {{ $abil.Type }}, ValueUsage: {{ $abil.ValueUsage }}, Value: {{ $abil.Value }}, Target: {{ $abil.Target }}, TargetValue: {{ $abil.TargetValue -}} },
|
|
{{- end }}
|
|
{{- end }}
|
|
},
|
|
},
|
|
{{- end }}
|
|
{{- end }}
|
|
},
|
|
{{- if $s.SPCost }}
|
|
SPCost: {{ $s.SPCost }},
|
|
{{- end }}
|
|
IconID: {{ $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 }}
|
|
}
|
|
|
|
var SkillGroups = map[int32][4]SkillID{
|
|
{{- range $g := $.Groups }}
|
|
{{ $g.ID }}: { {{- range $s := index $.Related $g.ID }}Skill{{ goenum $s.Name }}{{ if ne $s.InheritID 0 }}Inherit{{ end }}, {{ end -}} },
|
|
{{- end }}
|
|
}
|
|
{{ end }}
|