horsegen: generate map of skill names to ids

This commit is contained in:
2026-01-15 12:36:34 -05:00
parent c9a7e15f89
commit 079b996f5a
6 changed files with 1666 additions and 4566 deletions

View File

@@ -32,29 +32,7 @@ var AllSkills = map[SkillID]Skill{
[]Ability{
{{- range $abil := $a.Abilities }}
{{- if ne $abil.Type 0 }}
{
{{ if eq $abil.Type 1 -}}AbilityPassiveSpeed,
{{ else if eq $abil.Type 2 -}}AbilityPassiveStamina,
{{ else if eq $abil.Type 3 -}}AbilityPassivePower,
{{ else if eq $abil.Type 4 -}}AbilityPassiveGuts,
{{ else if eq $abil.Type 5 -}}AbilityPassiveWit,
{{ else if eq $abil.Type 6 -}}AbilityGreatEscape,
{{ else if eq $abil.Type 8 -}}AbilityVision,
{{ else if eq $abil.Type 9 -}}AbilityHP,
{{ else if eq $abil.Type 10 -}}AbilityGateDelay,
{{ else if eq $abil.Type 13 -}}AbilityFrenzy,
{{ else if eq $abil.Type 21 -}}AbilityCurrentSpeed,
{{ else if eq $abil.Type 27 -}}AbilityTargetSpeed,
{{ else if eq $abil.Type 28 -}}AbilityLaneSpeed,
{{ else if eq $abil.Type 31 -}}AbilityAccel,
{{ else if eq $abil.Type 35 -}}AbilityLaneChange,
{{ else }}??? $abil.Type={{$abil.Type}}
{{ end -}}
{{ $abil.ValueUsage }},
{{ $abil.Value }},
{{ $abil.Target }},
{{ $abil.TargetValue }},
},
{ {{- $abil.Type }}, {{ $abil.ValueUsage }}, {{ $abil.Value }}, {{ $abil.Target }}, {{ $abil.TargetValue -}} },
{{- end }}
{{- end }}
},
@@ -67,4 +45,10 @@ var AllSkills = map[SkillID]Skill{
},
{{- end }}
}
var SkillNameToID = map[string]SkillID{
{{- range $s := $.Skills }}
{{ printf "%q" $s.Name }}{{ if ne $s.InheritID 0 }} + " (Inherited)"{{ end }}: {{ $s.ID }},
{{- end }}
}
{{ end }}