Compare commits

...

10 Commits

33 changed files with 3607 additions and 388 deletions

1
cmd/horsebot/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
token

10
cmd/horsebot/README.md Normal file
View File

@@ -0,0 +1,10 @@
# horsebot
Discord bot serving horse game data.
Production instance is named Zenno Rob Roy, because she has read all about Umamusume and is always happy to share her knowledge and give recommendations.
## Running
The bot always uses the Gateway API.
If the `-http` argument is provided, it will also use the HTTP API, and `-key` must also be provided.

View File

@@ -0,0 +1,56 @@
package autocomplete
import (
"bytes"
"cmp"
"slices"
"sync"
"github.com/junegunn/fzf/src/algo"
"github.com/junegunn/fzf/src/util"
)
// Set is an autocomplete set.
type Set[V any] struct {
keys []util.Chars
vals []V
}
// Add associates a value with a key in the autocomplete set.
// The behavior is undefined if the key already has a value.
func (s *Set[V]) Add(key string, val V) {
k := util.ToChars([]byte(key))
i, _ := slices.BinarySearchFunc(s.keys, k, func(a, b util.Chars) int {
return bytes.Compare(a.Bytes(), b.Bytes())
})
s.keys = slices.Insert(s.keys, i, k)
s.vals = slices.Insert(s.vals, i, val)
}
// Find appends to r all values in the set with keys that key matches.
func (s *Set[V]) Find(r []V, key string) []V {
initFzf()
var (
p = []rune(key)
got []V
t []algo.Result
slab util.Slab
)
for i := range s.keys {
res, _ := algo.FuzzyMatchV2(false, true, true, &s.keys[i], p, false, &slab)
if res.Score <= 0 {
continue
}
j, _ := slices.BinarySearchFunc(t, res, func(a, b algo.Result) int { return -cmp.Compare(a.Score, b.Score) })
// Insert after all other matches with the same score for stability.
for j < len(t) && t[j].Score == res.Score {
j++
}
t = slices.Insert(t, j, res)
got = slices.Insert(got, j, s.vals[i])
}
return append(r, got...)
}
var initFzf = sync.OnceFunc(func() { algo.Init("default") })

View File

@@ -0,0 +1,70 @@
package autocomplete_test
import (
"slices"
"testing"
"git.sunturtle.xyz/zephyr/horse/cmd/horsebot/autocomplete"
)
func these(s ...string) []string { return s }
func TestAutocomplete(t *testing.T) {
cases := []struct {
name string
add []string
search string
want []string
}{
{
name: "empty",
add: nil,
search: "",
want: nil,
},
{
name: "exact",
add: these("bocchi"),
search: "bocchi",
want: these("bocchi"),
},
{
name: "extra",
add: these("bocchi", "ryo", "nijika", "kita"),
search: "bocchi",
want: these("bocchi"),
},
{
name: "short",
add: these("bocchi", "ryo", "nijika", "kita"),
search: "o",
want: these("bocchi", "ryo"),
},
{
name: "unrelated",
add: these("bocchi", "ryo", "nijika", "kita"),
search: "x",
want: nil,
},
{
name: "map",
add: these("Corazón ☆ Ardiente"),
search: "corazo",
want: these("Corazón ☆ Ardiente"),
},
}
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
var set autocomplete.Set[string]
for _, s := range c.add {
set.Add(s, s)
}
got := set.Find(nil, c.search)
slices.Sort(c.want)
slices.Sort(got)
if !slices.Equal(c.want, got) {
t.Errorf("wrong results: want %q, got %q", c.want, got)
}
})
}
}

55
cmd/horsebot/log.go Normal file
View File

@@ -0,0 +1,55 @@
package main
import (
"log/slog"
"github.com/disgoorg/disgo/discord"
"github.com/disgoorg/disgo/handler"
)
func logMiddleware(next handler.Handler) handler.Handler {
return func(e *handler.InteractionEvent) error {
var msg string
attrs := make([]slog.Attr, 0, 8)
attrs = append(attrs,
slog.Uint64("interaction", uint64(e.Interaction.ID())),
slog.Uint64("user", uint64(e.Interaction.User().ID)),
)
if guild := e.Interaction.GuildID(); guild != nil {
attrs = append(attrs, slog.String("guild", guild.String()))
}
switch i := e.Interaction.(type) {
case discord.ApplicationCommandInteraction:
msg = "command"
attrs = append(attrs,
slog.String("name", i.Data.CommandName()),
slog.Int("type", int(i.Data.Type())),
)
switch data := i.Data.(type) {
case discord.SlashCommandInteractionData:
attrs = append(attrs, slog.String("path", data.CommandPath()))
}
case discord.AutocompleteInteraction:
msg = "autocomplete"
attrs = append(attrs,
slog.String("name", i.Data.CommandName),
slog.String("path", i.Data.CommandPath()),
slog.String("focus", i.Data.Focused().Name),
)
case discord.ComponentInteraction:
msg = "component"
attrs = append(attrs,
slog.Int("type", int(i.Data.Type())),
slog.String("custom", i.Data.CustomID()),
)
default:
slog.WarnContext(e.Ctx, "unknown interaction", slog.Any("event", e))
return nil
}
slog.LogAttrs(e.Ctx, slog.LevelInfo, msg, attrs...)
return next(e)
}
}

183
cmd/horsebot/main.go Normal file
View File

@@ -0,0 +1,183 @@
package main
import (
"bytes"
"context"
"flag"
"fmt"
"log/slog"
"os"
"os/signal"
"strconv"
"time"
"github.com/disgoorg/disgo"
"github.com/disgoorg/disgo/bot"
"github.com/disgoorg/disgo/discord"
"github.com/disgoorg/disgo/handler"
"github.com/disgoorg/disgo/handler/middleware"
"github.com/disgoorg/disgo/httpserver"
"github.com/disgoorg/disgo/rest"
"git.sunturtle.xyz/zephyr/horse/horse"
"git.sunturtle.xyz/zephyr/horse/horse/global"
)
func main() {
var (
tokenFile string
// http api options
addr string
route string
pubkey string
// logging options
level slog.Level
textfmt string
)
flag.StringVar(&tokenFile, "token", "", "`file` containing the Discord bot token")
flag.StringVar(&addr, "http", "", "`address` to bind HTTP API server")
flag.StringVar(&route, "route", "/interactions/callback", "`path` to serve HTTP API calls")
flag.StringVar(&pubkey, "key", "", "Discord public key")
flag.TextVar(&level, "log", slog.LevelInfo, "slog logging `level`")
flag.StringVar(&textfmt, "log-format", "text", "slog logging `format`, text or json")
flag.Parse()
var lh slog.Handler
switch textfmt {
case "text":
lh = slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{Level: level})
case "json":
lh = slog.NewJSONHandler(os.Stderr, &slog.HandlerOptions{Level: level})
default:
fmt.Fprintf(os.Stderr, "invalid log format %q, must be text or json", textfmt)
os.Exit(1)
}
slog.SetDefault(slog.New(lh))
token, err := os.ReadFile(tokenFile)
if err != nil {
slog.Error("reading token", slog.Any("err", err))
os.Exit(1)
}
token = bytes.TrimSuffix(token, []byte{'\n'})
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
r := handler.New()
r.DefaultContext(func() context.Context { return ctx })
r.Use(middleware.Go)
r.Use(logMiddleware)
r.Route("/skill", func(r handler.Router) {
r.SlashCommand("/", skillHandler)
r.Autocomplete("/", skillAutocomplete)
r.ButtonComponent("/{id}", skillButton)
})
opts := []bot.ConfigOpt{bot.WithDefaultGateway(), bot.WithEventListeners(r)}
if addr != "" {
if pubkey == "" {
slog.Error("Discord public key must be provided when using HTTP API")
os.Exit(1)
}
opts = append(opts, bot.WithHTTPServerConfigOpts(pubkey,
httpserver.WithAddress(addr),
httpserver.WithURL(route),
))
}
slog.Info("connect", slog.String("disgo", disgo.Version))
client, err := disgo.New(string(token), opts...)
if err != nil {
slog.Error("building bot", slog.Any("err", err))
os.Exit(1)
}
if err := handler.SyncCommands(client, commands, nil, rest.WithCtx(ctx)); err != nil {
slog.Error("syncing commands", slog.Any("err", err))
os.Exit(1)
}
if addr != "" {
slog.Info("start HTTP server", slog.String("address", addr), slog.String("route", route))
if err := client.OpenHTTPServer(); err != nil {
slog.Error("starting HTTP server", slog.Any("err", err))
stop()
}
}
slog.Info("start gateway")
if err := client.OpenGateway(ctx); err != nil {
slog.Error("starting gateway", slog.Any("err", err))
stop()
}
slog.Info("ready")
<-ctx.Done()
stop()
ctx, stop = context.WithTimeout(context.Background(), 5*time.Second)
defer stop()
client.Close(ctx)
}
var commands = []discord.ApplicationCommandCreate{
discord.SlashCommandCreate{
Name: "skill",
Description: "Umamusume skill data",
Options: []discord.ApplicationCommandOption{
discord.ApplicationCommandOptionString{
Name: "query",
Description: "Skill name or ID",
Required: true,
Autocomplete: true,
},
},
},
}
func skillHandler(data discord.SlashCommandInteractionData, e *handler.CommandEvent) error {
q := data.String("query")
id, err := strconv.ParseInt(q, 10, 32)
if err == nil {
// note inverted condition; this is when we have an id
id = int64(global.AllSkills[horse.SkillID(id)].ID)
}
if id == 0 {
// Either we weren't given a number or the number doesn't match any skill ID.
v := global.SkillNameToID[q]
if v == 0 {
// No such skill.
m := discord.MessageCreate{
Content: "No such skill.",
Flags: discord.MessageFlagEphemeral,
}
return e.CreateMessage(m)
}
id = int64(v)
}
// TODO(zeph): search conditions and effects, give a list
m := discord.MessageCreate{
Components: []discord.LayoutComponent{RenderSkill(horse.SkillID(id), global.AllSkills, global.SkillGroups)},
Flags: discord.MessageFlagIsComponentsV2,
}
return e.CreateMessage(m)
}
func skillAutocomplete(e *handler.AutocompleteEvent) error {
q := e.Data.String("query")
opts := skillGlobalAuto().Find(nil, q)
return e.AutocompleteResult(opts[:min(len(opts), 25)])
}
func skillButton(data discord.ButtonInteractionData, e *handler.ComponentEvent) error {
id, err := strconv.ParseInt(e.Vars["id"], 10, 32)
if err != nil {
m := discord.MessageCreate{
Content: "That button produced an invalid skill ID. That's not supposed to happen.",
Flags: discord.MessageFlagEphemeral,
}
return e.CreateMessage(m)
}
m := discord.MessageUpdate{
Components: &[]discord.LayoutComponent{RenderSkill(horse.SkillID(id), global.AllSkills, global.SkillGroups)},
}
return e.UpdateMessage(m)
}

148
cmd/horsebot/skill.go Normal file
View File

@@ -0,0 +1,148 @@
package main
import (
"fmt"
"strings"
"sync"
"github.com/disgoorg/disgo/discord"
"git.sunturtle.xyz/zephyr/horse/cmd/horsebot/autocomplete"
"git.sunturtle.xyz/zephyr/horse/horse"
"git.sunturtle.xyz/zephyr/horse/horse/global"
)
func RenderSkill(id horse.SkillID, all map[horse.SkillID]horse.Skill, groups map[int32][4]horse.SkillID) discord.ContainerComponent {
s, ok := all[id]
if !ok {
return discord.NewContainer(discord.NewTextDisplayf("invalid skill ID %v made it to RenderSkill", id))
}
thumburl := fmt.Sprintf("https://gametora.com/images/umamusume/skill_icons/utx_ico_skill_%d.png", s.IconID)
top := "## " + s.Name
if s.UniqueOwner != "" {
top += "\n-# " + s.UniqueOwner
}
r := discord.NewContainer(
discord.NewSection(
discord.NewTextDisplay(top),
discord.NewTextDisplay(s.Description),
).WithAccessory(discord.NewThumbnail(thumburl)),
)
var skilltype string
switch {
case s.Rarity == 3, s.Rarity == 4, s.Rarity == 5:
// unique of various star levels
r.AccentColor = 0xaca4d4
skilltype = "Unique Skill"
case s.UniqueOwner != "":
r.AccentColor = 0xcccccc
skilltype = "Inherited Unique"
case s.Rarity == 2:
// rare (gold)
r.AccentColor = 0xd7c25b
skilltype = "Rare Skill"
case s.GroupRate == -1:
// negative (purple) skill
r.AccentColor = 0x9151d4
skilltype = "Negative Skill"
case !s.WitCheck:
// should be passive (green)
r.AccentColor = 0x66ae1c
skilltype = "Passive Skill"
case isDebuff(s):
// debuff (red)
r.AccentColor = 0xe34747
skilltype = "Debuff Skill"
case s.Rarity == 1:
// common (white)
r.AccentColor = 0xcccccc
skilltype = "Common Skill"
}
r.Components = append(r.Components, discord.NewSmallSeparator())
text := make([]string, 0, 3)
abils := make([]string, 0, 3)
for _, act := range s.Activations {
text, abils = text[:0], abils[:0]
if act.Precondition != "" {
text = append(text, "Precondition: "+formatCondition(act.Precondition))
}
text = append(text, "Condition: "+formatCondition(act.Condition))
var t string
switch {
case act.Duration < 0:
// passive; do nothing
case act.Duration == 0:
t = "Instantaneous "
case act.Duration >= 500e4:
t = "Permanent "
default:
t = "For " + act.Duration.String() + "s, "
}
for _, a := range act.Abilities {
abils = append(abils, a.String())
}
t += strings.Join(abils, ", ")
if act.Cooldown > 0 && act.Cooldown < 500e4 {
t += " on " + act.Cooldown.String() + "s cooldown"
}
text = append(text, t)
r.Components = append(r.Components, discord.NewTextDisplay(strings.Join(text, "\n")))
}
l := discord.NewTextDisplayf("%s ・ SP cost %d ・ Grade value %d ・ [Conditions on GameTora](https://gametora.com/umamusume/skill-condition-viewer?skill=%d)", skilltype, s.SPCost, s.GradeValue, s.ID)
r.Components = append(r.Components, discord.NewSmallSeparator(), l)
rel := make([]horse.Skill, 0, 4)
for _, id := range groups[s.Group] {
if id != 0 {
rel = append(rel, all[id])
}
}
if len(rel) > 1 {
buttons := make([]discord.InteractiveComponent, 0, 4)
for _, rs := range rel {
b := discord.NewSecondaryButton(rs.Name, fmt.Sprintf("/skill/%d", rs.ID))
if rs.ID == id {
b = b.AsDisabled()
}
buttons = append(buttons, b)
}
r.Components = append(r.Components, discord.NewActionRow(buttons...))
}
return r
}
func formatCondition(s string) string {
s = strings.ReplaceAll(s, "&", " & ")
if strings.ContainsRune(s, '@') {
return "```\n" + strings.ReplaceAll(s, "@", "\n@\n") + "```"
}
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
}
var skillGlobalAuto = sync.OnceValue(func() *autocomplete.Set[discord.AutocompleteChoice] {
var set autocomplete.Set[discord.AutocompleteChoice]
for _, id := range global.OrderedSkills {
s := global.AllSkills[id]
set.Add(s.Name, discord.AutocompleteChoiceString{Name: s.Name, Value: s.Name})
if s.UniqueOwner != "" {
if s.Rarity >= 3 {
set.Add(s.UniqueOwner, discord.AutocompleteChoiceString{Name: "Unique: " + s.UniqueOwner, Value: s.Name})
} else {
set.Add(s.UniqueOwner, discord.AutocompleteChoiceString{Name: "Inherited unique: " + s.UniqueOwner, Value: s.Name})
}
}
}
return &set
})

View File

@@ -10,7 +10,7 @@ This file is my notes from exploring the database.
- 47 is skill names, 48 is skill descriptions - 47 is skill names, 48 is skill descriptions
- 75 is support card names incl. variant, 76 is support card variant, 77 is support card character - 75 is support card names incl. variant, 76 is support card variant, 77 is support card character
- 147 is spark names, 172 is spark descriptions - 147 is spark names, 172 is spark descriptions
- 33 is race names by race id, 28 is race names by race instance id, 31 is race courses - 33 is race names by race id, 28 is race names by race instance id, 31 is race courses, 111 is saddle names
- 65 is player titles, 66 is title descriptions - ties with honor_data? - 65 is player titles, 66 is title descriptions - ties with honor_data?
# succession factor (sparks) # succession factor (sparks)
@@ -193,6 +193,22 @@ seems to be activate_lot = 1 means wit check, 0 means guaranteed
single_mode_wins_saddle defines titles (classic triple crown, tenno sweep, &c.) using win_saddle_type = 0 single_mode_wins_saddle defines titles (classic triple crown, tenno sweep, &c.) using win_saddle_type = 0
race_instance is a combination of race, npc group, race date (month*100 + day), and time of day.
it isn't actually anything i care about.
which is to say, what i do care about is mapping races to each turn they're offered, and having a "race instance" enum like Hopeful-Stakes-Junior, Yasuda-Kinen-Classic, &c.
single_mode_program defines the race instances available for each turn, but the year is expressed a bit weirdly in the race_permission column:
- 1 = junior year
- 2 = classic year
- 3 = classic and senior year
- 4 = senior year
- 5 = ura finale
grade_rate_id appears to be consistently 800 iff maiden race and 900 iff debut race, but the values particularly for g1s are all over the place.
recommend_class_id appears to be consistently 1 iff maiden race or debut race, 2 iff pre-op, 3 iff op; but other values are confusing.
so, it doesn't seem like there's a particular flag that identifies maiden races, despite the restrictions on when they appear in the ui.
# trainee definitions # trainee definitions
- card_data has universal trainee stats: base skill set, stat growth bonuses ("talent"), default running style - card_data has universal trainee stats: base skill set, stat growth bonuses ("talent"), default running style

14
go.mod
View File

@@ -1,20 +1,30 @@
module git.sunturtle.xyz/zephyr/horse module git.sunturtle.xyz/zephyr/horse
go 1.24.1 go 1.25.5
require ( require (
github.com/disgoorg/disgo v0.19.0-rc.15
github.com/junegunn/fzf v0.67.0
golang.org/x/sync v0.14.0 golang.org/x/sync v0.14.0
zombiezen.com/go/sqlite v1.4.2 zombiezen.com/go/sqlite v1.4.2
) )
require ( require (
github.com/disgoorg/json/v2 v2.0.0 // indirect
github.com/disgoorg/omit v1.0.0 // indirect
github.com/disgoorg/snowflake/v2 v2.0.3 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect
github.com/google/uuid v1.6.0 // indirect github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/klauspost/compress v1.18.2 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-isatty v0.0.20 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sasha-s/go-csync v0.0.0-20240107134140-fcbab37b09ad // indirect
golang.org/x/crypto v0.46.0 // indirect
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect
golang.org/x/sys v0.33.0 // indirect golang.org/x/sys v0.39.0 // indirect
modernc.org/libc v1.65.7 // indirect modernc.org/libc v1.65.7 // indirect
modernc.org/mathutil v1.7.1 // indirect modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.11.0 // indirect modernc.org/memory v1.11.0 // indirect

36
go.sum
View File

@@ -1,15 +1,41 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/disgoorg/disgo v0.19.0-rc.15 h1:x0NsV2gcbdjwuztsg2wYXw76p1Cpc8f6ByDrkPcfQtU=
github.com/disgoorg/disgo v0.19.0-rc.15/go.mod h1:14mgXzenkJqifkDmsEgU0zI1di6jNXodwX6L8geW33A=
github.com/disgoorg/json/v2 v2.0.0 h1:U16yy/ARK7/aEpzjjqK1b/KaqqGHozUdeVw/DViEzQI=
github.com/disgoorg/json/v2 v2.0.0/go.mod h1:jZTBC0nIE1WeetSEI3/Dka8g+qglb4FPVmp5I5HpEfI=
github.com/disgoorg/omit v1.0.0 h1:y0LkVUOyUHT8ZlnhIAeOZEA22UYykeysK8bLJ0SfT78=
github.com/disgoorg/omit v1.0.0/go.mod h1:RTmSARkf6PWT/UckwI0bV8XgWkWQoPppaT01rYKLcFQ=
github.com/disgoorg/snowflake/v2 v2.0.3 h1:3B+PpFjr7j4ad7oeJu4RlQ+nYOTadsKapJIzgvSI2Ro=
github.com/disgoorg/snowflake/v2 v2.0.3/go.mod h1:W6r7NUA7DwfZLwr00km6G4UnZ0zcoLBRufhkFWgAc4c=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/junegunn/fzf v0.67.0 h1:naiOdIkV5/ZCfHgKQIV/f5YDWowl95G6yyOQqW8FeSo=
github.com/junegunn/fzf v0.67.0/go.mod h1:xlXX2/rmsccKQUnr9QOXPDi5DyV9cM0UjKy/huScBeE=
github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk=
github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/sasha-s/go-csync v0.0.0-20240107134140-fcbab37b09ad h1:qIQkSlF5vAUHxEmTbaqt1hkJ/t6skqEGYiMag343ucI=
github.com/sasha-s/go-csync v0.0.0-20240107134140-fcbab37b09ad/go.mod h1:/pA7k3zsXKdjjAiUhB5CjuKib9KJGCaLvZwtxGC8U0s=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM=
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8=
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
@@ -17,12 +43,14 @@ golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc=
golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
modernc.org/cc/v4 v4.26.1 h1:+X5NtzVBn0KgsBCBe+xkDC7twLb/jNVj9FPgiwSQO3s= modernc.org/cc/v4 v4.26.1 h1:+X5NtzVBn0KgsBCBe+xkDC7twLb/jNVj9FPgiwSQO3s=
modernc.org/cc/v4 v4.26.1/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= modernc.org/cc/v4 v4.26.1/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0=
modernc.org/ccgo/v4 v4.28.0 h1:rjznn6WWehKq7dG4JtLRKxb52Ecv8OUGah8+Z/SfpNU= modernc.org/ccgo/v4 v4.28.0 h1:rjznn6WWehKq7dG4JtLRKxb52Ecv8OUGah8+Z/SfpNU=

View File

@@ -34,15 +34,15 @@ pub struct skill-icon-id
pub struct race-id pub struct race-id
game-id: game-id game-id: game-id
// Game ID for race instances,
// i.e. "Tenno Sho (Spring) at Kyoto Racecourse" vs. "Tenno Sho (Spring) at Hanshin."
pub struct race-instance-id
game-id: game-id
// Game ID for race thumbnails. // Game ID for race thumbnails.
pub struct race-thumbnail-id pub struct race-thumbnail-id
game-id: game-id game-id: game-id
// Game ID for saddles,
// i.e. one or more race wins that appear as a title.
pub struct saddle-id
game-id: game-id
// order2 comparison between any game ID types. // order2 comparison between any game ID types.
pub inline fun order2(x: a, y: a, ?a/game-id: (a) -> game-id): order2<a> pub inline fun order2(x: a, y: a, ?a/game-id: (a) -> game-id): order2<a>
match x.game-id.cmp(y.game-id) match x.game-id.cmp(y.game-id)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -29,9 +29,10 @@ const (
RaceAsahiHaiFuturityStakes RaceID = 1022 // Asahi Hai Futurity Stakes RaceAsahiHaiFuturityStakes RaceID = 1022 // Asahi Hai Futurity Stakes
RaceArimaKinen RaceID = 1023 // Arima Kinen RaceArimaKinen RaceID = 1023 // Arima Kinen
RaceHopefulStakes RaceID = 1024 // Hopeful Stakes RaceHopefulStakes RaceID = 1024 // Hopeful Stakes
RaceTakarazukaKinenAlternate RaceID = 1025 // Takarazuka Kinen RaceTakarazukaKinenAlt1025 RaceID = 1025 // Takarazuka Kinen
RaceKikukaShoAlternate RaceID = 1026 // Kikuka Sho RaceKikukaShoAlt1026 RaceID = 1026 // Kikuka Sho
RaceTennoShoSpringAlternate RaceID = 1027 // Tenno Sho (Spring) RaceTennoShoSpringAlt1027 RaceID = 1027 // Tenno Sho (Spring)
RaceSatsukiShoAlt1028 RaceID = 1028 // Satsuki Sho
RaceTeioSho RaceID = 1101 // Teio Sho RaceTeioSho RaceID = 1101 // Teio Sho
RaceJapanDirtDerby RaceID = 1102 // Japan Dirt Derby RaceJapanDirtDerby RaceID = 1102 // Japan Dirt Derby
RaceJBCLadiesClassic RaceID = 1103 // JBC Ladies Classic RaceJBCLadiesClassic RaceID = 1103 // JBC Ladies Classic
@@ -72,7 +73,7 @@ const (
RaceDailyHaiJuniorStakes RaceID = 2032 // Daily Hai Junior Stakes RaceDailyHaiJuniorStakes RaceID = 2032 // Daily Hai Junior Stakes
RaceStayersStakes RaceID = 2033 // Stayers Stakes RaceStayersStakes RaceID = 2033 // Stayers Stakes
RaceHanshinCup RaceID = 2034 // Hanshin Cup RaceHanshinCup RaceID = 2034 // Hanshin Cup
RaceSpringStakesAlternate RaceID = 2035 // Spring Stakes RaceSpringStakesAlt2035 RaceID = 2035 // Spring Stakes
RaceKyotoKimpai RaceID = 3001 // Kyoto Kimpai RaceKyotoKimpai RaceID = 3001 // Kyoto Kimpai
RaceNakayamaKimpai RaceID = 3002 // Nakayama Kimpai RaceNakayamaKimpai RaceID = 3002 // Nakayama Kimpai
RaceShinzanKinen RaceID = 3003 // Shinzan Kinen RaceShinzanKinen RaceID = 3003 // Shinzan Kinen
@@ -412,24 +413,30 @@ var AllRaces = map[RaceID]Race{
Name: "Hopeful Stakes", Name: "Hopeful Stakes",
Thumbnail: 1024, Thumbnail: 1024,
}, },
RaceTakarazukaKinenAlternate: { RaceTakarazukaKinenAlt1025: {
ID: 1025, ID: 1025,
Name: "Takarazuka Kinen" + " (Alternate)", Name: "Takarazuka Kinen" + " (Alternate 1025)",
Thumbnail: 1012, Thumbnail: 1012,
Primary: 1012, Primary: 1012,
}, },
RaceKikukaShoAlternate: { RaceKikukaShoAlt1026: {
ID: 1026, ID: 1026,
Name: "Kikuka Sho" + " (Alternate)", Name: "Kikuka Sho" + " (Alternate 1026)",
Thumbnail: 1015, Thumbnail: 1015,
Primary: 1015, Primary: 1015,
}, },
RaceTennoShoSpringAlternate: { RaceTennoShoSpringAlt1027: {
ID: 1027, ID: 1027,
Name: "Tenno Sho (Spring)" + " (Alternate)", Name: "Tenno Sho (Spring)" + " (Alternate 1027)",
Thumbnail: 1027, Thumbnail: 1027,
Primary: 1006, Primary: 1006,
}, },
RaceSatsukiShoAlt1028: {
ID: 1028,
Name: "Satsuki Sho" + " (Alternate 1028)",
Thumbnail: 1028,
Primary: 1005,
},
RaceTeioSho: { RaceTeioSho: {
ID: 1101, ID: 1101,
Name: "Teio Sho", Name: "Teio Sho",
@@ -630,9 +637,9 @@ var AllRaces = map[RaceID]Race{
Name: "Hanshin Cup", Name: "Hanshin Cup",
Thumbnail: 2034, Thumbnail: 2034,
}, },
RaceSpringStakesAlternate: { RaceSpringStakesAlt2035: {
ID: 2035, ID: 2035,
Name: "Spring Stakes" + " (Alternate)", Name: "Spring Stakes" + " (Alternate 2035)",
Thumbnail: 2010, Thumbnail: 2010,
Primary: 2010, Primary: 2010,
}, },
@@ -1719,288 +1726,289 @@ var AllRaces = map[RaceID]Race{
} }
var RaceNameToID = map[string]RaceID{ var RaceNameToID = map[string]RaceID{
"February Stakes": 1001, "February Stakes": 1001,
"Takamatsunomiya Kinen": 1002, "Takamatsunomiya Kinen": 1002,
"Osaka Hai": 1003, "Osaka Hai": 1003,
"Oka Sho": 1004, "Oka Sho": 1004,
"Satsuki Sho": 1005, "Satsuki Sho": 1005,
"Tenno Sho (Spring)": 1006, "Tenno Sho (Spring)": 1006,
"NHK Mile Cup": 1007, "NHK Mile Cup": 1007,
"Victoria Mile": 1008, "Victoria Mile": 1008,
"Japanese Oaks": 1009, "Japanese Oaks": 1009,
"Tokyo Yushun (Japanese Derby)": 1010, "Tokyo Yushun (Japanese Derby)": 1010,
"Yasuda Kinen": 1011, "Yasuda Kinen": 1011,
"Takarazuka Kinen": 1012, "Takarazuka Kinen": 1012,
"Sprinters Stakes": 1013, "Sprinters Stakes": 1013,
"Shuka Sho": 1014, "Shuka Sho": 1014,
"Kikuka Sho": 1015, "Kikuka Sho": 1015,
"Tenno Sho (Autumn)": 1016, "Tenno Sho (Autumn)": 1016,
"Queen Elizabeth II Cup": 1017, "Queen Elizabeth II Cup": 1017,
"Mile Championship": 1018, "Mile Championship": 1018,
"Japan Cup": 1019, "Japan Cup": 1019,
"Champions Cup": 1020, "Champions Cup": 1020,
"Hanshin Juvenile Fillies": 1021, "Hanshin Juvenile Fillies": 1021,
"Asahi Hai Futurity Stakes": 1022, "Asahi Hai Futurity Stakes": 1022,
"Arima Kinen": 1023, "Arima Kinen": 1023,
"Hopeful Stakes": 1024, "Hopeful Stakes": 1024,
"Takarazuka Kinen" + " (Alternate)": 1025, "Takarazuka Kinen" + " (Alternate 1025)": 1025,
"Kikuka Sho" + " (Alternate)": 1026, "Kikuka Sho" + " (Alternate 1026)": 1026,
"Tenno Sho (Spring)" + " (Alternate)": 1027, "Tenno Sho (Spring)" + " (Alternate 1027)": 1027,
"Teio Sho": 1101, "Satsuki Sho" + " (Alternate 1028)": 1028,
"Japan Dirt Derby": 1102, "Teio Sho": 1101,
"JBC Ladies Classic": 1103, "Japan Dirt Derby": 1102,
"JBC Sprint": 1104, "JBC Ladies Classic": 1103,
"JBC Classic": 1105, "JBC Sprint": 1104,
"Tokyo Daishoten": 1106, "JBC Classic": 1105,
"Nikkei Shinshun Hai": 2001, "Tokyo Daishoten": 1106,
"Tokai Stakes": 2002, "Nikkei Shinshun Hai": 2001,
"American JCC": 2003, "Tokai Stakes": 2002,
"Kyoto Kinen": 2004, "American JCC": 2003,
"Nakayama Kinen": 2005, "Kyoto Kinen": 2004,
"Yayoi Sho": 2006, "Nakayama Kinen": 2005,
"Kinko Sho": 2007, "Yayoi Sho": 2006,
"Fillies' Revue": 2008, "Kinko Sho": 2007,
"Hanshin Daishoten": 2009, "Fillies' Revue": 2008,
"Spring Stakes": 2010, "Hanshin Daishoten": 2009,
"Nikkei Sho": 2011, "Spring Stakes": 2010,
"Hanshin Umamusume Stakes": 2012, "Nikkei Sho": 2011,
"New Zealand Trophy": 2013, "Hanshin Umamusume Stakes": 2012,
"Milers Cup": 2014, "New Zealand Trophy": 2013,
"Flora Stakes": 2015, "Milers Cup": 2014,
"Aoba Sho": 2016, "Flora Stakes": 2015,
"Kyoto Shimbun Hai": 2017, "Aoba Sho": 2016,
"Keio Hai Spring Cup": 2018, "Kyoto Shimbun Hai": 2017,
"Meguro Kinen": 2019, "Keio Hai Spring Cup": 2018,
"Sapporo Kinen": 2020, "Meguro Kinen": 2019,
"Centaur Stakes": 2021, "Sapporo Kinen": 2020,
"Rose Stakes": 2022, "Centaur Stakes": 2021,
"St. Lite Kinen": 2023, "Rose Stakes": 2022,
"Kobe Shimbun Hai": 2024, "St. Lite Kinen": 2023,
"All Comers": 2025, "Kobe Shimbun Hai": 2024,
"Mainichi Okan": 2026, "All Comers": 2025,
"Kyoto Daishoten": 2027, "Mainichi Okan": 2026,
"Fuchu Umamusume Stakes": 2028, "Kyoto Daishoten": 2027,
"Swan Stakes": 2029, "Fuchu Umamusume Stakes": 2028,
"Keio Hai Junior Stakes": 2030, "Swan Stakes": 2029,
"Copa Republica Argentina": 2031, "Keio Hai Junior Stakes": 2030,
"Daily Hai Junior Stakes": 2032, "Copa Republica Argentina": 2031,
"Stayers Stakes": 2033, "Daily Hai Junior Stakes": 2032,
"Hanshin Cup": 2034, "Stayers Stakes": 2033,
"Spring Stakes" + " (Alternate)": 2035, "Hanshin Cup": 2034,
"Kyoto Kimpai": 3001, "Spring Stakes" + " (Alternate 2035)": 2035,
"Nakayama Kimpai": 3002, "Kyoto Kimpai": 3001,
"Shinzan Kinen": 3003, "Nakayama Kimpai": 3002,
"Fairy Stakes": 3004, "Shinzan Kinen": 3003,
"Aichi Hai": 3005, "Fairy Stakes": 3004,
"Keisei Hai": 3006, "Aichi Hai": 3005,
"Silk Road Stakes": 3007, "Keisei Hai": 3006,
"Negishi Stakes": 3008, "Silk Road Stakes": 3007,
"Kisaragi Sho": 3009, "Negishi Stakes": 3008,
"Tokyo Shimbun Hai": 3010, "Kisaragi Sho": 3009,
"Queen Cup": 3011, "Tokyo Shimbun Hai": 3010,
"Kyodo News Hai": 3012, "Queen Cup": 3011,
"Kyoto Umamusume Stakes": 3013, "Kyodo News Hai": 3012,
"Diamond Stakes": 3014, "Kyoto Umamusume Stakes": 3013,
"Kokura Daishoten": 3015, "Diamond Stakes": 3014,
"Arlington Cup": 3016, "Kokura Daishoten": 3015,
"Hankyu Hai": 3017, "Arlington Cup": 3016,
"Tulip Sho": 3018, "Hankyu Hai": 3017,
"Ocean Stakes": 3019, "Tulip Sho": 3018,
"Nakayama Umamusume Stakes": 3020, "Ocean Stakes": 3019,
"Falcon Stakes": 3021, "Nakayama Umamusume Stakes": 3020,
"Flower Cup": 3022, "Falcon Stakes": 3021,
"Mainichi Hai": 3023, "Flower Cup": 3022,
"March Stakes": 3024, "Mainichi Hai": 3023,
"Lord Derby Challenge Trophy": 3025, "March Stakes": 3024,
"Antares Stakes": 3026, "Lord Derby Challenge Trophy": 3025,
"Fukushima Umamusume Stakes": 3027, "Antares Stakes": 3026,
"Niigata Daishoten": 3028, "Fukushima Umamusume Stakes": 3027,
"Heian Stakes": 3029, "Niigata Daishoten": 3028,
"Naruo Kinen": 3030, "Heian Stakes": 3029,
"Mermaid Stakes": 3031, "Naruo Kinen": 3030,
"Epsom Cup": 3032, "Mermaid Stakes": 3031,
"Unicorn Stakes": 3033, "Epsom Cup": 3032,
"Hakodate Sprint Stakes": 3034, "Unicorn Stakes": 3033,
"CBC Sho": 3035, "Hakodate Sprint Stakes": 3034,
"Radio Nikkei Sho": 3036, "CBC Sho": 3035,
"Procyon Stakes": 3037, "Radio Nikkei Sho": 3036,
"Tanabata Sho": 3038, "Procyon Stakes": 3037,
"Hakodate Kinen": 3039, "Tanabata Sho": 3038,
"Chukyo Kinen": 3040, "Hakodate Kinen": 3039,
"Hakodate Junior Stakes": 3041, "Chukyo Kinen": 3040,
"Ibis Summer Dash": 3042, "Hakodate Junior Stakes": 3041,
"Queen Stakes": 3043, "Ibis Summer Dash": 3042,
"Kokura Kinen": 3044, "Queen Stakes": 3043,
"Leopard Stakes": 3045, "Kokura Kinen": 3044,
"Sekiya Kinen": 3046, "Leopard Stakes": 3045,
"Elm Stakes": 3047, "Sekiya Kinen": 3046,
"Kitakyushu Kinen": 3048, "Elm Stakes": 3047,
"Niigata Junior Stakes": 3049, "Kitakyushu Kinen": 3048,
"Keeneland Cup": 3050, "Niigata Junior Stakes": 3049,
"Sapporo Junior Stakes": 3051, "Keeneland Cup": 3050,
"Kokura Junior Stakes": 3052, "Sapporo Junior Stakes": 3051,
"Niigata Kinen": 3053, "Kokura Junior Stakes": 3052,
"Shion Stakes": 3054, "Niigata Kinen": 3053,
"Keisei Hai Autumn Handicap": 3055, "Shion Stakes": 3054,
"Sirius Stakes": 3056, "Keisei Hai Autumn Handicap": 3055,
"Saudi Arabia Royal Cup": 3057, "Sirius Stakes": 3056,
"Fuji Stakes": 3058, "Saudi Arabia Royal Cup": 3057,
"Artemis Stakes": 3059, "Fuji Stakes": 3058,
"Fantasy Stakes": 3060, "Artemis Stakes": 3059,
"Miyako Stakes": 3061, "Fantasy Stakes": 3060,
"Musashino Stakes": 3062, "Miyako Stakes": 3061,
"Fukushima Kinen": 3063, "Musashino Stakes": 3062,
"Tokyo Sports Hai Junior Stakes": 3064, "Fukushima Kinen": 3063,
"Kyoto Junior Stakes": 3065, "Tokyo Sports Hai Junior Stakes": 3064,
"Keihan Hai": 3066, "Kyoto Junior Stakes": 3065,
"Challenge Cup": 3067, "Keihan Hai": 3066,
"Chunichi Shimbun Hai": 3068, "Challenge Cup": 3067,
"Capella Stakes": 3069, "Chunichi Shimbun Hai": 3068,
"Turquoise Stakes": 3070, "Capella Stakes": 3069,
"Manyo Stakes": 4001, "Turquoise Stakes": 3070,
"Junior Cup": 4002, "Manyo Stakes": 4001,
"Yodo Tankyori Stakes": 4003, "Junior Cup": 4002,
"Pollux Stakes": 4004, "Yodo Tankyori Stakes": 4003,
"January Stakes": 4005, "Pollux Stakes": 4004,
"New Year Stakes": 4006, "January Stakes": 4005,
"Kobai Stakes": 4007, "New Year Stakes": 4006,
"Subaru Stakes": 4008, "Kobai Stakes": 4007,
"Wakagoma Stakes": 4009, "Subaru Stakes": 4008,
"Carbuncle Stakes": 4010, "Wakagoma Stakes": 4009,
"Shirafuji Stakes": 4011, "Carbuncle Stakes": 4010,
"Crocus Stakes": 4012, "Shirafuji Stakes": 4011,
"Yamato Stakes": 4013, "Crocus Stakes": 4012,
"Elfin Stakes": 4014, "Yamato Stakes": 4013,
"Rakuyo Stakes": 4015, "Elfin Stakes": 4014,
"Aldebaran Stakes": 4016, "Rakuyo Stakes": 4015,
"Valentine Stakes": 4017, "Aldebaran Stakes": 4016,
"Hyacinth Stakes": 4018, "Valentine Stakes": 4017,
"Sobu Stakes": 4019, "Hyacinth Stakes": 4018,
"Sumire Stakes": 4020, "Sobu Stakes": 4019,
"Osakajo Stakes": 4021, "Sumire Stakes": 4020,
"Polaris Stakes": 4022, "Osakajo Stakes": 4021,
"Nigawa Stakes": 4023, "Polaris Stakes": 4022,
"Anemone Stakes": 4024, "Nigawa Stakes": 4023,
"Shoryu Stakes": 4025, "Anemone Stakes": 4024,
"Kochi Stakes": 4026, "Shoryu Stakes": 4025,
"Wakaba Stakes": 4027, "Kochi Stakes": 4026,
"Chiba Stakes": 4028, "Wakaba Stakes": 4027,
"Rokko Stakes": 4030, "Chiba Stakes": 4028,
"Coral Stakes": 4031, "Rokko Stakes": 4030,
"Marguerite Stakes": 4032, "Coral Stakes": 4031,
"Fukuryu Stakes": 4033, "Marguerite Stakes": 4032,
"Wasurenagusa Sho": 4035, "Fukuryu Stakes": 4033,
"Keiyo Stakes": 4036, "Wasurenagusa Sho": 4035,
"Shunrai Stakes": 4037, "Keiyo Stakes": 4036,
"Fukushima Mimpo Hai": 4038, "Shunrai Stakes": 4037,
"Tachibana Stakes": 4039, "Fukushima Mimpo Hai": 4038,
"Oasis Stakes": 4040, "Tachibana Stakes": 4039,
"Tennozan Stakes": 4041, "Oasis Stakes": 4040,
"Tango Stakes": 4042, "Tennozan Stakes": 4041,
"Sweetpea Stakes": 4043, "Tango Stakes": 4042,
"Tanigawadake Stakes": 4044, "Sweetpea Stakes": 4043,
"Principal Stakes": 4045, "Tanigawadake Stakes": 4044,
"Metropolitan Stakes": 4046, "Principal Stakes": 4045,
"Kurama Stakes": 4047, "Metropolitan Stakes": 4046,
"Brilliant Stakes": 4048, "Kurama Stakes": 4047,
"Miyakooji Stakes": 4049, "Brilliant Stakes": 4048,
"Aoi Stakes": 4050, "Miyakooji Stakes": 4049,
"Ritto Stakes": 4051, "Aoi Stakes": 4050,
"Seiryu Stakes": 4052, "Ritto Stakes": 4051,
"May Stakes": 4053, "Seiryu Stakes": 4052,
"Hosu Stakes": 4054, "May Stakes": 4053,
"Idaten Stakes": 4055, "Hosu Stakes": 4054,
"Shirayuri Stakes": 4056, "Idaten Stakes": 4055,
"Keyaki Stakes": 4057, "Shirayuri Stakes": 4056,
"Azuchijo Stakes": 4058, "Keyaki Stakes": 4057,
"Akhalteke Stakes": 4059, "Azuchijo Stakes": 4058,
"Tempozan Stakes": 4060, "Akhalteke Stakes": 4059,
"Yonago Stakes": 4061, "Tempozan Stakes": 4060,
"Onuma Stakes": 4062, "Yonago Stakes": 4061,
"Paradise Stakes": 4063, "Onuma Stakes": 4062,
"Tomoe Sho": 4064, "Paradise Stakes": 4063,
"Marine Stakes": 4065, "Tomoe Sho": 4064,
"Meitetsu Hai": 4066, "Marine Stakes": 4065,
"Chukyo Junior Stakes": 4068, "Meitetsu Hai": 4066,
"Fukushima TV Open": 4069, "Chukyo Junior Stakes": 4068,
"Dahlia Sho": 4070, "Fukushima TV Open": 4069,
"Sapporo Nikkei Open": 4071, "Dahlia Sho": 4070,
"UHB Sho": 4072, "Sapporo Nikkei Open": 4071,
"Aso Stakes": 4073, "UHB Sho": 4072,
"Phoenix Sho": 4074, "Aso Stakes": 4073,
"Cosmos Sho": 4075, "Phoenix Sho": 4074,
"NST Sho": 4076, "Cosmos Sho": 4075,
"Clover Sho": 4077, "NST Sho": 4076,
"Himawari Sho": 4078, "Clover Sho": 4077,
"BSN Sho": 4079, "Himawari Sho": 4078,
"Kokura Nikkei Open": 4080, "BSN Sho": 4079,
"Toki Stakes": 4081, "Kokura Nikkei Open": 4080,
"Tancho Stakes": 4082, "Toki Stakes": 4081,
"Suzuran Sho": 4083, "Tancho Stakes": 4082,
"Enif Stakes": 4084, "Suzuran Sho": 4083,
"Nojigiku Stakes": 4085, "Enif Stakes": 4084,
"Radio Nippon Sho": 4086, "Nojigiku Stakes": 4085,
"Kikyo Stakes": 4087, "Radio Nippon Sho": 4086,
"Fuyo Stakes": 4088, "Kikyo Stakes": 4087,
"Canna Stakes": 4089, "Fuyo Stakes": 4088,
"Port Island Stakes": 4090, "Canna Stakes": 4089,
"Opal Stakes": 4091, "Port Island Stakes": 4090,
"Green Channel Cup": 4092, "Opal Stakes": 4091,
"Momiji Stakes": 4093, "Green Channel Cup": 4092,
"October Stakes": 4094, "Momiji Stakes": 4093,
"Shinetsu Stakes": 4095, "October Stakes": 4094,
"Ivy Stakes": 4096, "Shinetsu Stakes": 4095,
"Muromachi Stakes": 4097, "Ivy Stakes": 4096,
"Brazil Cup": 4098, "Muromachi Stakes": 4097,
"Hagi Stakes": 4099, "Brazil Cup": 4098,
"Cassiopeia Stakes": 4100, "Hagi Stakes": 4099,
"Lumiere Autumn Dash": 4101, "Cassiopeia Stakes": 4100,
"Oro Cup": 4102, "Lumiere Autumn Dash": 4101,
"Fukushima Junior Stakes": 4103, "Oro Cup": 4102,
"Andromeda Stakes": 4104, "Fukushima Junior Stakes": 4103,
"Shimotsuki Stakes": 4105, "Andromeda Stakes": 4104,
"Fukushima Minyu Cup": 4106, "Shimotsuki Stakes": 4105,
"Capital Stakes": 4107, "Fukushima Minyu Cup": 4106,
"Autumn Leaf Stakes": 4108, "Capital Stakes": 4107,
"Lapis Lazuli Stakes": 4109, "Autumn Leaf Stakes": 4108,
"Shiwasu Stakes": 4110, "Lapis Lazuli Stakes": 4109,
"Rigel Stakes": 4111, "Shiwasu Stakes": 4110,
"Tanzanite Stakes": 4112, "Rigel Stakes": 4111,
"December Stakes": 4113, "Tanzanite Stakes": 4112,
"Christmas Rose Stakes": 4114, "December Stakes": 4113,
"Galaxy Stakes": 4115, "Christmas Rose Stakes": 4114,
"Betelgeuse Stakes": 4116, "Galaxy Stakes": 4115,
"Kitakyushu Tankyori Stakes": 4118, "Betelgeuse Stakes": 4116,
"Azumakofuji Stakes": 4119, "Kitakyushu Tankyori Stakes": 4118,
"Sleipnir Stakes": 4120, "Azumakofuji Stakes": 4119,
"Sannomiya Stakes": 4121, "Sleipnir Stakes": 4120,
"Kanetsu Stakes": 4122, "Sannomiya Stakes": 4121,
"Nagatsuki Stakes": 4123, "Kanetsu Stakes": 4122,
"Uzumasa Stakes": 4124, "Nagatsuki Stakes": 4123,
"Aster Sho": 4501, "Uzumasa Stakes": 4124,
"Saffron Sho": 4502, "Aster Sho": 4501,
"Rindo Sho": 4503, "Saffron Sho": 4502,
"Shigiku Sho": 4504, "Rindo Sho": 4503,
"Platanus Sho": 4505, "Shigiku Sho": 4504,
"Nadeshiko Sho": 4506, "Platanus Sho": 4505,
"Hyakunichiso Tokubetsu": 4507, "Nadeshiko Sho": 4506,
"Kimmokusei Tokubetsu": 4508, "Hyakunichiso Tokubetsu": 4507,
"Oxalis Sho": 4509, "Kimmokusei Tokubetsu": 4508,
"Kigiku Sho": 4510, "Oxalis Sho": 4509,
"Mochinoki Sho": 4511, "Kigiku Sho": 4510,
"Akamatsu Sho": 4512, "Mochinoki Sho": 4511,
"Shumeigiku Sho": 4513, "Akamatsu Sho": 4512,
"Cattleya Sho": 4514, "Shumeigiku Sho": 4513,
"Begonia Sho": 4515, "Cattleya Sho": 4514,
"Shiragiku Sho": 4516, "Begonia Sho": 4515,
"Habotan Sho": 4517, "Shiragiku Sho": 4516,
"Koyamaki Sho": 4518, "Habotan Sho": 4517,
"Manryo Sho": 4519, "Koyamaki Sho": 4518,
"Kuromatsu Sho": 4520, "Manryo Sho": 4519,
"Erica Sho": 4521, "Kuromatsu Sho": 4520,
"Tsuwabuki Sho": 4522, "Erica Sho": 4521,
"Hiiragi Sho": 4523, "Tsuwabuki Sho": 4522,
"Sazanka Sho": 4524, "Hiiragi Sho": 4523,
"Kantsubaki Sho": 4525, "Sazanka Sho": 4524,
"Senryo Sho": 4526, "Kantsubaki Sho": 4525,
"Senryo Sho": 4526,
} }

View File

@@ -32,9 +32,10 @@ pub type race
Asahi-Hai-Futurity-Stakes Asahi-Hai-Futurity-Stakes
Arima-Kinen Arima-Kinen
Hopeful-Stakes Hopeful-Stakes
Takarazuka-Kinen-Alternate Takarazuka-Kinen-Alt1025
Kikuka-Sho-Alternate Kikuka-Sho-Alt1026
Tenno-Sho-Spring-Alternate Tenno-Sho-Spring-Alt1027
Satsuki-Sho-Alt1028
Teio-Sho Teio-Sho
Japan-Dirt-Derby Japan-Dirt-Derby
JBC-Ladies-Classic JBC-Ladies-Classic
@@ -75,7 +76,7 @@ pub type race
Daily-Hai-Junior-Stakes Daily-Hai-Junior-Stakes
Stayers-Stakes Stayers-Stakes
Hanshin-Cup Hanshin-Cup
Spring-Stakes-Alternate Spring-Stakes-Alt2035
Kyoto-Kimpai Kyoto-Kimpai
Nakayama-Kimpai Nakayama-Kimpai
Shinzan-Kinen Shinzan-Kinen
@@ -320,9 +321,10 @@ pub fun race-id(r: race): race-id
Asahi-Hai-Futurity-Stakes -> Race-id(1022) Asahi-Hai-Futurity-Stakes -> Race-id(1022)
Arima-Kinen -> Race-id(1023) Arima-Kinen -> Race-id(1023)
Hopeful-Stakes -> Race-id(1024) Hopeful-Stakes -> Race-id(1024)
Takarazuka-Kinen-Alternate -> Race-id(1025) Takarazuka-Kinen-Alt1025 -> Race-id(1025)
Kikuka-Sho-Alternate -> Race-id(1026) Kikuka-Sho-Alt1026 -> Race-id(1026)
Tenno-Sho-Spring-Alternate -> Race-id(1027) Tenno-Sho-Spring-Alt1027 -> Race-id(1027)
Satsuki-Sho-Alt1028 -> Race-id(1028)
Teio-Sho -> Race-id(1101) Teio-Sho -> Race-id(1101)
Japan-Dirt-Derby -> Race-id(1102) Japan-Dirt-Derby -> Race-id(1102)
JBC-Ladies-Classic -> Race-id(1103) JBC-Ladies-Classic -> Race-id(1103)
@@ -363,7 +365,7 @@ pub fun race-id(r: race): race-id
Daily-Hai-Junior-Stakes -> Race-id(2032) Daily-Hai-Junior-Stakes -> Race-id(2032)
Stayers-Stakes -> Race-id(2033) Stayers-Stakes -> Race-id(2033)
Hanshin-Cup -> Race-id(2034) Hanshin-Cup -> Race-id(2034)
Spring-Stakes-Alternate -> Race-id(2035) Spring-Stakes-Alt2035 -> Race-id(2035)
Kyoto-Kimpai -> Race-id(3001) Kyoto-Kimpai -> Race-id(3001)
Nakayama-Kimpai -> Race-id(3002) Nakayama-Kimpai -> Race-id(3002)
Shinzan-Kinen -> Race-id(3003) Shinzan-Kinen -> Race-id(3003)
@@ -607,9 +609,10 @@ pub val all = [
Asahi-Hai-Futurity-Stakes, Asahi-Hai-Futurity-Stakes,
Arima-Kinen, Arima-Kinen,
Hopeful-Stakes, Hopeful-Stakes,
Takarazuka-Kinen-Alternate, Takarazuka-Kinen-Alt1025,
Kikuka-Sho-Alternate, Kikuka-Sho-Alt1026,
Tenno-Sho-Spring-Alternate, Tenno-Sho-Spring-Alt1027,
Satsuki-Sho-Alt1028,
Teio-Sho, Teio-Sho,
Japan-Dirt-Derby, Japan-Dirt-Derby,
JBC-Ladies-Classic, JBC-Ladies-Classic,
@@ -650,7 +653,7 @@ pub val all = [
Daily-Hai-Junior-Stakes, Daily-Hai-Junior-Stakes,
Stayers-Stakes, Stayers-Stakes,
Hanshin-Cup, Hanshin-Cup,
Spring-Stakes-Alternate, Spring-Stakes-Alt2035,
Kyoto-Kimpai, Kyoto-Kimpai,
Nakayama-Kimpai, Nakayama-Kimpai,
Shinzan-Kinen, Shinzan-Kinen,
@@ -894,9 +897,10 @@ val name2id: rbmap<string, race-id> = rb-map/empty()
.set("Asahi Hai Futurity Stakes", Race-id(1022)) .set("Asahi Hai Futurity Stakes", Race-id(1022))
.set("Arima Kinen", Race-id(1023)) .set("Arima Kinen", Race-id(1023))
.set("Hopeful Stakes", Race-id(1024)) .set("Hopeful Stakes", Race-id(1024))
.set("Takarazuka Kinen" ++ " (Alternate)", Race-id(1025)) .set("Takarazuka Kinen" ++ " (Alternate 1025)", Race-id(1025))
.set("Kikuka Sho" ++ " (Alternate)", Race-id(1026)) .set("Kikuka Sho" ++ " (Alternate 1026)", Race-id(1026))
.set("Tenno Sho (Spring)" ++ " (Alternate)", Race-id(1027)) .set("Tenno Sho (Spring)" ++ " (Alternate 1027)", Race-id(1027))
.set("Satsuki Sho" ++ " (Alternate 1028)", Race-id(1028))
.set("Teio Sho", Race-id(1101)) .set("Teio Sho", Race-id(1101))
.set("Japan Dirt Derby", Race-id(1102)) .set("Japan Dirt Derby", Race-id(1102))
.set("JBC Ladies Classic", Race-id(1103)) .set("JBC Ladies Classic", Race-id(1103))
@@ -937,7 +941,7 @@ val name2id: rbmap<string, race-id> = rb-map/empty()
.set("Daily Hai Junior Stakes", Race-id(2032)) .set("Daily Hai Junior Stakes", Race-id(2032))
.set("Stayers Stakes", Race-id(2033)) .set("Stayers Stakes", Race-id(2033))
.set("Hanshin Cup", Race-id(2034)) .set("Hanshin Cup", Race-id(2034))
.set("Spring Stakes" ++ " (Alternate)", Race-id(2035)) .set("Spring Stakes" ++ " (Alternate 2035)", Race-id(2035))
.set("Kyoto Kimpai", Race-id(3001)) .set("Kyoto Kimpai", Race-id(3001))
.set("Nakayama Kimpai", Race-id(3002)) .set("Nakayama Kimpai", Race-id(3002))
.set("Shinzan Kinen", Race-id(3003)) .set("Shinzan Kinen", Race-id(3003))
@@ -1156,13 +1160,13 @@ val name2id: rbmap<string, race-id> = rb-map/empty()
.set("Senryo Sho", Race-id(4526)) .set("Senryo Sho", Race-id(4526))
// Get the race ID that has the given exact name. // Get the race ID that has the given exact name.
// Alternate versions of races have " (Alternate)" in their names. // Alternate versions of races have an indication of their ID in their names.
// If no race matches the name, the result is an invalid ID. // If no race matches the name, the result is an invalid ID.
pub fun from-name(name: string): race-id pub fun from-name(name: string): race-id
name2id.lookup(name).default(Race-id(0)) name2id.lookup(name).default(Race-id(0))
// Get the name for a race. // Get the name for a race.
// Alternate versions of races have " (Alternate)" in their names. // Alternate versions of races have an indication of their ID in their names.
// If no race matches the ID, the result is the numeric ID. // If no race matches the ID, the result is the numeric ID.
pub fun show(r: race-id): string pub fun show(r: race-id): string
match r.game-id match r.game-id
@@ -1190,9 +1194,10 @@ pub fun show(r: race-id): string
1022 -> "Asahi Hai Futurity Stakes" 1022 -> "Asahi Hai Futurity Stakes"
1023 -> "Arima Kinen" 1023 -> "Arima Kinen"
1024 -> "Hopeful Stakes" 1024 -> "Hopeful Stakes"
1025 -> "Takarazuka Kinen" ++ " (Alternate)" 1025 -> "Takarazuka Kinen" ++ " (Alternate 1025)"
1026 -> "Kikuka Sho" ++ " (Alternate)" 1026 -> "Kikuka Sho" ++ " (Alternate 1026)"
1027 -> "Tenno Sho (Spring)" ++ " (Alternate)" 1027 -> "Tenno Sho (Spring)" ++ " (Alternate 1027)"
1028 -> "Satsuki Sho" ++ " (Alternate 1028)"
1101 -> "Teio Sho" 1101 -> "Teio Sho"
1102 -> "Japan Dirt Derby" 1102 -> "Japan Dirt Derby"
1103 -> "JBC Ladies Classic" 1103 -> "JBC Ladies Classic"
@@ -1233,7 +1238,7 @@ pub fun show(r: race-id): string
2032 -> "Daily Hai Junior Stakes" 2032 -> "Daily Hai Junior Stakes"
2033 -> "Stayers Stakes" 2033 -> "Stayers Stakes"
2034 -> "Hanshin Cup" 2034 -> "Hanshin Cup"
2035 -> "Spring Stakes" ++ " (Alternate)" 2035 -> "Spring Stakes" ++ " (Alternate 2035)"
3001 -> "Kyoto Kimpai" 3001 -> "Kyoto Kimpai"
3002 -> "Nakayama Kimpai" 3002 -> "Nakayama Kimpai"
3003 -> "Shinzan Kinen" 3003 -> "Shinzan Kinen"
@@ -1483,6 +1488,7 @@ pub fun grade(r: race-id): grade
1025 -> G1 1025 -> G1
1026 -> G1 1026 -> G1
1027 -> G1 1027 -> G1
1028 -> G1
1101 -> G1 1101 -> G1
1102 -> G1 1102 -> G1
1103 -> G1 1103 -> G1
@@ -1773,6 +1779,7 @@ pub fun thumbnail(r: race-id): race-thumbnail-id
1025 -> Race-thumbnail-id(1012) 1025 -> Race-thumbnail-id(1012)
1026 -> Race-thumbnail-id(1015) 1026 -> Race-thumbnail-id(1015)
1027 -> Race-thumbnail-id(1027) 1027 -> Race-thumbnail-id(1027)
1028 -> Race-thumbnail-id(1028)
1101 -> Race-thumbnail-id(1101) 1101 -> Race-thumbnail-id(1101)
1102 -> Race-thumbnail-id(1102) 1102 -> Race-thumbnail-id(1102)
1103 -> Race-thumbnail-id(1103) 1103 -> Race-thumbnail-id(1103)
@@ -2040,5 +2047,6 @@ pub fun primary(r: race-id): race-id
1025 -> Race-id(1012) 1025 -> Race-id(1012)
1026 -> Race-id(1015) 1026 -> Race-id(1015)
1027 -> Race-id(1006) 1027 -> Race-id(1006)
1028 -> Race-id(1005)
2035 -> Race-id(2010) 2035 -> Race-id(2010)
_ -> r _ -> r

1107
horse/global/saddle.go Normal file

File diff suppressed because it is too large Load Diff

985
horse/global/saddle.kk Normal file
View File

@@ -0,0 +1,985 @@
module horse/global/saddle
// Automatically generated with horsegen; DO NOT EDIT
import horse/game-id
pub import horse/race
pub import horse/global/race
// Enumeration of all saddles for type-safe programming.
pub type saddle
Classic-Triple-Crown
Senior-Autumn-Triple-Crown
Triple-Tiara
Senior-Spring-Triple-Crown
Tenno-Sweep
Dual-Grand-Prix
Dual-Miles
Dual-Sprints
Dual-Dirts
Arima-Kinen
Japan-C
Japanese-Derby
Tenno-Sho-Spring
Takarazuka-Kinen
Tenno-Sho-Autumn
Kikuka-Sho
Osaka-Hai
Satsuki-Sho
Japanese-Oaks
Takamatsunomiya-Kinen
Yasuda-Kinen
Sprinters-S
Mile-Ch
Oka-Sho
Victoria-Mile
Queen-Elizabeth-II-Cup
NHK-Mile-C
Shuka-Sho
Champions-C
February-S
JBC-Classic
Tokyo-Daishoten
Asahi-Hai-FS
Hopeful-S
Hanshin-JF
Teio-Sho
JBC-Sprint
JD-Derby
JBC-L-Classic
Nikkei-Shinshun-Hai
Tokai-S
American-JCC
Kyoto-Kinen
Nakayama-Kinen
Yayoi-Sho
Kinko-Sho
Fillies-Revue
Hanshin-Daishoten
Spring-S
Nikkei-Sho
Hanshin-Umamusume-S
New-Zealand-T
Yomiuri-Milers-C
Flora-S
Aoba-Sho
Kyoto-Shimbun-Hai
Keio-Hai-Spring-C
Meguro-Kinen
Sapporo-Kinen
Centaur-S
Rose-S
St-Lite-Kinen
Kobe-Shimbun-Hai
All-Comers
Mainichi-Okan
Kyoto-Daishoten
Fuchu-Umamusume-S
Swan-S
Keio-Hai-Junior-S
Copa-Republica-Argentina
Daily-Hai-Junior-S
Stayers-S
Hanshin-C
Kyoto-Kimpai
Nakayama-Kimpai
Shinzan-Kinen
Fairy-S
Aichi-Hai
Keisei-Hai
Silk-Road-S
Negishi-S
Kisaragi-Sho
Tokyo-Shimbun-Hai
Queen-C
Kyodo-News-Hai
Kyoto-Umamusume-S
Diamond-S
Kokura-Daishoten
Arlington-C
Hankyu-Hai
Tulip-Sho
Ocean-S
Nakayama-Umamusume-S
Falcon-S
Flower-C
Mainichi-Hai
March-S
Lord-Derby-CT
Antares-S
Fukushima-Umamusume-S
Niigata-Daishoten
Heian-S
Naruo-Kinen
Mermaid-S
Epsom-C
Unicorn-S
Hakodate-Sprint-S
CBC-Sho
Radio-Nikkei-Sho
Procyon-S
Tanabata-Sho
Hakodate-Kinen
Chukyo-Kinen
Hakodate-Junior-S
Ibis-Summer-D
Queen-S
Kokura-Kinen
Leopard-S
Sekiya-Kinen
Elm-S
Kitakyushu-Kinen
Niigata-Junior-S
Keeneland-C
Sapporo-Junior-S
Kokura-Junior-S
Niigata-Kinen
Shion-S
Keisei-Hai-AH
Sirius-S
Saudi-Arabia-RC
Fuji-S
Artemis-S
Fantasy-S
Miyako-S
Musashino-S
Fukushima-Kinen
Tokyo-Sports-Hai-Junior-S
Kyoto-Junior-S
Keihan-Hai
Challenge-C
Chunichi-Shimbun-Hai
Capella-S
Turquoise-S
Classic-Triple-Crown-Alt144
Senior-Spring-Triple-Crown-Alt145
Dual-Grand-Prix-Alt146
Takarazuka-Kinen-Alt147
Kikuka-Sho-Alt148
Spring-S-Alt149
Aoi-S
Senior-Spring-Triple-Crown-Alt151
Tenno-Sweep-Alt152
Tenno-Sho-Spring-Alt153
Classic-Triple-Crown-Alt154
Satsuki-Sho-Alt155
// Get the saddle ID for a saddle.
pub fun saddle-id(s: saddle): saddle-id
match s
Classic-Triple-Crown -> Saddle-id(1)
Senior-Autumn-Triple-Crown -> Saddle-id(2)
Triple-Tiara -> Saddle-id(3)
Senior-Spring-Triple-Crown -> Saddle-id(4)
Tenno-Sweep -> Saddle-id(5)
Dual-Grand-Prix -> Saddle-id(6)
Dual-Miles -> Saddle-id(7)
Dual-Sprints -> Saddle-id(8)
Dual-Dirts -> Saddle-id(9)
Arima-Kinen -> Saddle-id(10)
Japan-C -> Saddle-id(11)
Japanese-Derby -> Saddle-id(12)
Tenno-Sho-Spring -> Saddle-id(13)
Takarazuka-Kinen -> Saddle-id(14)
Tenno-Sho-Autumn -> Saddle-id(15)
Kikuka-Sho -> Saddle-id(16)
Osaka-Hai -> Saddle-id(17)
Satsuki-Sho -> Saddle-id(18)
Japanese-Oaks -> Saddle-id(19)
Takamatsunomiya-Kinen -> Saddle-id(20)
Yasuda-Kinen -> Saddle-id(21)
Sprinters-S -> Saddle-id(22)
Mile-Ch -> Saddle-id(23)
Oka-Sho -> Saddle-id(24)
Victoria-Mile -> Saddle-id(25)
Queen-Elizabeth-II-Cup -> Saddle-id(26)
NHK-Mile-C -> Saddle-id(27)
Shuka-Sho -> Saddle-id(28)
Champions-C -> Saddle-id(29)
February-S -> Saddle-id(30)
JBC-Classic -> Saddle-id(31)
Tokyo-Daishoten -> Saddle-id(32)
Asahi-Hai-FS -> Saddle-id(33)
Hopeful-S -> Saddle-id(34)
Hanshin-JF -> Saddle-id(35)
Teio-Sho -> Saddle-id(36)
JBC-Sprint -> Saddle-id(37)
JD-Derby -> Saddle-id(38)
JBC-L-Classic -> Saddle-id(39)
Nikkei-Shinshun-Hai -> Saddle-id(40)
Tokai-S -> Saddle-id(41)
American-JCC -> Saddle-id(42)
Kyoto-Kinen -> Saddle-id(43)
Nakayama-Kinen -> Saddle-id(44)
Yayoi-Sho -> Saddle-id(45)
Kinko-Sho -> Saddle-id(46)
Fillies-Revue -> Saddle-id(47)
Hanshin-Daishoten -> Saddle-id(48)
Spring-S -> Saddle-id(49)
Nikkei-Sho -> Saddle-id(50)
Hanshin-Umamusume-S -> Saddle-id(51)
New-Zealand-T -> Saddle-id(52)
Yomiuri-Milers-C -> Saddle-id(53)
Flora-S -> Saddle-id(54)
Aoba-Sho -> Saddle-id(55)
Kyoto-Shimbun-Hai -> Saddle-id(56)
Keio-Hai-Spring-C -> Saddle-id(57)
Meguro-Kinen -> Saddle-id(58)
Sapporo-Kinen -> Saddle-id(59)
Centaur-S -> Saddle-id(60)
Rose-S -> Saddle-id(61)
St-Lite-Kinen -> Saddle-id(62)
Kobe-Shimbun-Hai -> Saddle-id(63)
All-Comers -> Saddle-id(64)
Mainichi-Okan -> Saddle-id(65)
Kyoto-Daishoten -> Saddle-id(66)
Fuchu-Umamusume-S -> Saddle-id(67)
Swan-S -> Saddle-id(68)
Keio-Hai-Junior-S -> Saddle-id(69)
Copa-Republica-Argentina -> Saddle-id(70)
Daily-Hai-Junior-S -> Saddle-id(71)
Stayers-S -> Saddle-id(72)
Hanshin-C -> Saddle-id(73)
Kyoto-Kimpai -> Saddle-id(74)
Nakayama-Kimpai -> Saddle-id(75)
Shinzan-Kinen -> Saddle-id(76)
Fairy-S -> Saddle-id(77)
Aichi-Hai -> Saddle-id(78)
Keisei-Hai -> Saddle-id(79)
Silk-Road-S -> Saddle-id(80)
Negishi-S -> Saddle-id(81)
Kisaragi-Sho -> Saddle-id(82)
Tokyo-Shimbun-Hai -> Saddle-id(83)
Queen-C -> Saddle-id(84)
Kyodo-News-Hai -> Saddle-id(85)
Kyoto-Umamusume-S -> Saddle-id(86)
Diamond-S -> Saddle-id(87)
Kokura-Daishoten -> Saddle-id(88)
Arlington-C -> Saddle-id(89)
Hankyu-Hai -> Saddle-id(90)
Tulip-Sho -> Saddle-id(91)
Ocean-S -> Saddle-id(92)
Nakayama-Umamusume-S -> Saddle-id(93)
Falcon-S -> Saddle-id(94)
Flower-C -> Saddle-id(95)
Mainichi-Hai -> Saddle-id(96)
March-S -> Saddle-id(97)
Lord-Derby-CT -> Saddle-id(98)
Antares-S -> Saddle-id(99)
Fukushima-Umamusume-S -> Saddle-id(100)
Niigata-Daishoten -> Saddle-id(101)
Heian-S -> Saddle-id(102)
Naruo-Kinen -> Saddle-id(103)
Mermaid-S -> Saddle-id(104)
Epsom-C -> Saddle-id(105)
Unicorn-S -> Saddle-id(106)
Hakodate-Sprint-S -> Saddle-id(107)
CBC-Sho -> Saddle-id(108)
Radio-Nikkei-Sho -> Saddle-id(109)
Procyon-S -> Saddle-id(110)
Tanabata-Sho -> Saddle-id(111)
Hakodate-Kinen -> Saddle-id(112)
Chukyo-Kinen -> Saddle-id(113)
Hakodate-Junior-S -> Saddle-id(114)
Ibis-Summer-D -> Saddle-id(115)
Queen-S -> Saddle-id(116)
Kokura-Kinen -> Saddle-id(117)
Leopard-S -> Saddle-id(118)
Sekiya-Kinen -> Saddle-id(119)
Elm-S -> Saddle-id(120)
Kitakyushu-Kinen -> Saddle-id(121)
Niigata-Junior-S -> Saddle-id(122)
Keeneland-C -> Saddle-id(123)
Sapporo-Junior-S -> Saddle-id(124)
Kokura-Junior-S -> Saddle-id(125)
Niigata-Kinen -> Saddle-id(126)
Shion-S -> Saddle-id(127)
Keisei-Hai-AH -> Saddle-id(128)
Sirius-S -> Saddle-id(129)
Saudi-Arabia-RC -> Saddle-id(130)
Fuji-S -> Saddle-id(131)
Artemis-S -> Saddle-id(132)
Fantasy-S -> Saddle-id(133)
Miyako-S -> Saddle-id(134)
Musashino-S -> Saddle-id(135)
Fukushima-Kinen -> Saddle-id(136)
Tokyo-Sports-Hai-Junior-S -> Saddle-id(137)
Kyoto-Junior-S -> Saddle-id(138)
Keihan-Hai -> Saddle-id(139)
Challenge-C -> Saddle-id(140)
Chunichi-Shimbun-Hai -> Saddle-id(141)
Capella-S -> Saddle-id(142)
Turquoise-S -> Saddle-id(143)
Classic-Triple-Crown-Alt144 -> Saddle-id(144)
Senior-Spring-Triple-Crown-Alt145 -> Saddle-id(145)
Dual-Grand-Prix-Alt146 -> Saddle-id(146)
Takarazuka-Kinen-Alt147 -> Saddle-id(147)
Kikuka-Sho-Alt148 -> Saddle-id(148)
Spring-S-Alt149 -> Saddle-id(149)
Aoi-S -> Saddle-id(150)
Senior-Spring-Triple-Crown-Alt151 -> Saddle-id(151)
Tenno-Sweep-Alt152 -> Saddle-id(152)
Tenno-Sho-Spring-Alt153 -> Saddle-id(153)
Classic-Triple-Crown-Alt154 -> Saddle-id(154)
Satsuki-Sho-Alt155 -> Saddle-id(155)
// List of all saddles in ID order for easy iterating.
pub val all = [
Classic-Triple-Crown,
Senior-Autumn-Triple-Crown,
Triple-Tiara,
Senior-Spring-Triple-Crown,
Tenno-Sweep,
Dual-Grand-Prix,
Dual-Miles,
Dual-Sprints,
Dual-Dirts,
Arima-Kinen,
Japan-C,
Japanese-Derby,
Tenno-Sho-Spring,
Takarazuka-Kinen,
Tenno-Sho-Autumn,
Kikuka-Sho,
Osaka-Hai,
Satsuki-Sho,
Japanese-Oaks,
Takamatsunomiya-Kinen,
Yasuda-Kinen,
Sprinters-S,
Mile-Ch,
Oka-Sho,
Victoria-Mile,
Queen-Elizabeth-II-Cup,
NHK-Mile-C,
Shuka-Sho,
Champions-C,
February-S,
JBC-Classic,
Tokyo-Daishoten,
Asahi-Hai-FS,
Hopeful-S,
Hanshin-JF,
Teio-Sho,
JBC-Sprint,
JD-Derby,
JBC-L-Classic,
Nikkei-Shinshun-Hai,
Tokai-S,
American-JCC,
Kyoto-Kinen,
Nakayama-Kinen,
Yayoi-Sho,
Kinko-Sho,
Fillies-Revue,
Hanshin-Daishoten,
Spring-S,
Nikkei-Sho,
Hanshin-Umamusume-S,
New-Zealand-T,
Yomiuri-Milers-C,
Flora-S,
Aoba-Sho,
Kyoto-Shimbun-Hai,
Keio-Hai-Spring-C,
Meguro-Kinen,
Sapporo-Kinen,
Centaur-S,
Rose-S,
St-Lite-Kinen,
Kobe-Shimbun-Hai,
All-Comers,
Mainichi-Okan,
Kyoto-Daishoten,
Fuchu-Umamusume-S,
Swan-S,
Keio-Hai-Junior-S,
Copa-Republica-Argentina,
Daily-Hai-Junior-S,
Stayers-S,
Hanshin-C,
Kyoto-Kimpai,
Nakayama-Kimpai,
Shinzan-Kinen,
Fairy-S,
Aichi-Hai,
Keisei-Hai,
Silk-Road-S,
Negishi-S,
Kisaragi-Sho,
Tokyo-Shimbun-Hai,
Queen-C,
Kyodo-News-Hai,
Kyoto-Umamusume-S,
Diamond-S,
Kokura-Daishoten,
Arlington-C,
Hankyu-Hai,
Tulip-Sho,
Ocean-S,
Nakayama-Umamusume-S,
Falcon-S,
Flower-C,
Mainichi-Hai,
March-S,
Lord-Derby-CT,
Antares-S,
Fukushima-Umamusume-S,
Niigata-Daishoten,
Heian-S,
Naruo-Kinen,
Mermaid-S,
Epsom-C,
Unicorn-S,
Hakodate-Sprint-S,
CBC-Sho,
Radio-Nikkei-Sho,
Procyon-S,
Tanabata-Sho,
Hakodate-Kinen,
Chukyo-Kinen,
Hakodate-Junior-S,
Ibis-Summer-D,
Queen-S,
Kokura-Kinen,
Leopard-S,
Sekiya-Kinen,
Elm-S,
Kitakyushu-Kinen,
Niigata-Junior-S,
Keeneland-C,
Sapporo-Junior-S,
Kokura-Junior-S,
Niigata-Kinen,
Shion-S,
Keisei-Hai-AH,
Sirius-S,
Saudi-Arabia-RC,
Fuji-S,
Artemis-S,
Fantasy-S,
Miyako-S,
Musashino-S,
Fukushima-Kinen,
Tokyo-Sports-Hai-Junior-S,
Kyoto-Junior-S,
Keihan-Hai,
Challenge-C,
Chunichi-Shimbun-Hai,
Capella-S,
Turquoise-S,
Classic-Triple-Crown-Alt144,
Senior-Spring-Triple-Crown-Alt145,
Dual-Grand-Prix-Alt146,
Takarazuka-Kinen-Alt147,
Kikuka-Sho-Alt148,
Spring-S-Alt149,
Aoi-S,
Senior-Spring-Triple-Crown-Alt151,
Tenno-Sweep-Alt152,
Tenno-Sho-Spring-Alt153,
Classic-Triple-Crown-Alt154,
Satsuki-Sho-Alt155,
]
// Get the name for a saddle.
// Alternate versions of saddles have an indication of their ID in their names.
// If no saddle matches the ID, the result contains the numeric ID.
pub fun show(s: saddle-id): string
match s.game-id
1 -> "Classic Triple Crown"
2 -> "Senior Autumn Triple Crown"
3 -> "Triple Tiara"
4 -> "Senior Spring Triple Crown"
5 -> "Tenno Sweep"
6 -> "Dual Grand Prix"
7 -> "Dual Miles"
8 -> "Dual Sprints"
9 -> "Dual Dirts"
10 -> "Arima Kinen"
11 -> "Japan C."
12 -> "Japanese Derby"
13 -> "Tenno Sho (Spring)"
14 -> "Takarazuka Kinen"
15 -> "Tenno Sho (Autumn)"
16 -> "Kikuka Sho"
17 -> "Osaka Hai"
18 -> "Satsuki Sho"
19 -> "Japanese Oaks"
20 -> "Takamatsunomiya Kinen"
21 -> "Yasuda Kinen"
22 -> "Sprinters S."
23 -> "Mile Ch."
24 -> "Oka Sho"
25 -> "Victoria Mile"
26 -> "Queen Elizabeth II Cup"
27 -> "NHK Mile C."
28 -> "Shuka Sho"
29 -> "Champions C."
30 -> "February S."
31 -> "JBC Classic"
32 -> "Tokyo Daishoten"
33 -> "Asahi Hai F.S."
34 -> "Hopeful S."
35 -> "Hanshin J.F."
36 -> "Teio Sho"
37 -> "JBC Sprint"
38 -> "J.D. Derby"
39 -> "JBC L. Classic"
40 -> "Nikkei Shinshun Hai"
41 -> "Tokai S."
42 -> "American JCC"
43 -> "Kyoto Kinen"
44 -> "Nakayama Kinen"
45 -> "Yayoi Sho"
46 -> "Kinko Sho"
47 -> "Fillies' Revue"
48 -> "Hanshin Daishoten"
49 -> "Spring S."
50 -> "Nikkei Sho"
51 -> "Hanshin Umamusume S."
52 -> "New Zealand T."
53 -> "Yomiuri Milers C."
54 -> "Flora S."
55 -> "Aoba Sho"
56 -> "Kyoto Shimbun Hai"
57 -> "Keio Hai Spring C."
58 -> "Meguro Kinen"
59 -> "Sapporo Kinen"
60 -> "Centaur S."
61 -> "Rose S."
62 -> "St. Lite Kinen"
63 -> "Kobe Shimbun Hai"
64 -> "All Comers"
65 -> "Mainichi Okan"
66 -> "Kyoto Daishoten"
67 -> "Fuchu Umamusume S."
68 -> "Swan S."
69 -> "Keio Hai Junior S."
70 -> "Copa Republica Argentina"
71 -> "Daily Hai Junior S."
72 -> "Stayers S."
73 -> "Hanshin C."
74 -> "Kyoto Kimpai"
75 -> "Nakayama Kimpai"
76 -> "Shinzan Kinen"
77 -> "Fairy S."
78 -> "Aichi Hai"
79 -> "Keisei Hai"
80 -> "Silk Road S."
81 -> "Negishi S."
82 -> "Kisaragi Sho"
83 -> "Tokyo Shimbun Hai"
84 -> "Queen C."
85 -> "Kyodo News Hai"
86 -> "Kyoto Umamusume S."
87 -> "Diamond S."
88 -> "Kokura Daishoten"
89 -> "Arlington C."
90 -> "Hankyu Hai"
91 -> "Tulip Sho"
92 -> "Ocean S."
93 -> "Nakayama Umamusume S."
94 -> "Falcon S."
95 -> "Flower C."
96 -> "Mainichi Hai"
97 -> "March S."
98 -> "Lord Derby C.T."
99 -> "Antares S."
100 -> "Fukushima Umamusume S."
101 -> "Niigata Daishoten"
102 -> "Heian S."
103 -> "Naruo Kinen"
104 -> "Mermaid S."
105 -> "Epsom C."
106 -> "Unicorn S."
107 -> "Hakodate Sprint S."
108 -> "CBC Sho"
109 -> "Radio Nikkei Sho"
110 -> "Procyon S."
111 -> "Tanabata Sho"
112 -> "Hakodate Kinen"
113 -> "Chukyo Kinen"
114 -> "Hakodate Junior S."
115 -> "Ibis Summer D."
116 -> "Queen S."
117 -> "Kokura Kinen"
118 -> "Leopard S."
119 -> "Sekiya Kinen"
120 -> "Elm S."
121 -> "Kitakyushu Kinen"
122 -> "Niigata Junior S."
123 -> "Keeneland C."
124 -> "Sapporo Junior S."
125 -> "Kokura Junior S."
126 -> "Niigata Kinen"
127 -> "Shion S."
128 -> "Keisei Hai A.H."
129 -> "Sirius S."
130 -> "Saudi Arabia R.C."
131 -> "Fuji S."
132 -> "Artemis S."
133 -> "Fantasy S."
134 -> "Miyako S."
135 -> "Musashino S."
136 -> "Fukushima Kinen"
137 -> "Tokyo Sports Hai Junior S."
138 -> "Kyoto Junior S."
139 -> "Keihan Hai"
140 -> "Challenge C."
141 -> "Chunichi Shimbun Hai"
142 -> "Capella S."
143 -> "Turquoise S."
144 -> "Classic Triple Crown" ++ " (Alternate 144)"
145 -> "Senior Spring Triple Crown" ++ " (Alternate 145)"
146 -> "Dual Grand Prix" ++ " (Alternate 146)"
147 -> "Takarazuka Kinen" ++ " (Alternate 147)"
148 -> "Kikuka Sho" ++ " (Alternate 148)"
149 -> "Spring S." ++ " (Alternate 149)"
150 -> "Aoi S."
151 -> "Senior Spring Triple Crown" ++ " (Alternate 151)"
152 -> "Tenno Sweep" ++ " (Alternate 152)"
153 -> "Tenno Sho (Spring)" ++ " (Alternate 153)"
154 -> "Classic Triple Crown" ++ " (Alternate 154)"
155 -> "Satsuki Sho" ++ " (Alternate 155)"
x -> "saddle " ++ x.show
// Get the list of races that entitle a horse to a saddle.
// If no saddle matches the ID, the result is the empty list.
pub fun races(s: saddle-id): list<race-id>
match s.game-id
1 -> [Race-id(100501), Race-id(101001), Race-id(101501), ]
2 -> [Race-id(101601), Race-id(101901), Race-id(102301), ]
3 -> [Race-id(100401), Race-id(100901), Race-id(101401), ]
4 -> [Race-id(100301), Race-id(100601), Race-id(101201), ]
5 -> [Race-id(100601), Race-id(101601), ]
6 -> [Race-id(101201), Race-id(102301), ]
7 -> [Race-id(101101), Race-id(101801), ]
8 -> [Race-id(101301), Race-id(100201), ]
9 -> [Race-id(100101), Race-id(102001), ]
10 -> [Race-id(102301), ]
11 -> [Race-id(101901), ]
12 -> [Race-id(101001), ]
13 -> [Race-id(100601), ]
14 -> [Race-id(101201), ]
15 -> [Race-id(101601), ]
16 -> [Race-id(101501), ]
17 -> [Race-id(100301), ]
18 -> [Race-id(100501), ]
19 -> [Race-id(100901), ]
20 -> [Race-id(100201), ]
21 -> [Race-id(101101), ]
22 -> [Race-id(101301), ]
23 -> [Race-id(101801), ]
24 -> [Race-id(100401), ]
25 -> [Race-id(100801), ]
26 -> [Race-id(101701), ]
27 -> [Race-id(100701), ]
28 -> [Race-id(101401), ]
29 -> [Race-id(102001), ]
30 -> [Race-id(100101), ]
31 -> [Race-id(110501), ]
32 -> [Race-id(110601), ]
33 -> [Race-id(102201), ]
34 -> [Race-id(102401), ]
35 -> [Race-id(102101), ]
36 -> [Race-id(110101), ]
37 -> [Race-id(110401), ]
38 -> [Race-id(110201), ]
39 -> [Race-id(110301), ]
40 -> [Race-id(200101), ]
41 -> [Race-id(200201), ]
42 -> [Race-id(200301), ]
43 -> [Race-id(200401), ]
44 -> [Race-id(200501), ]
45 -> [Race-id(200601), ]
46 -> [Race-id(200701), ]
47 -> [Race-id(200801), ]
48 -> [Race-id(200901), ]
49 -> [Race-id(201001), ]
50 -> [Race-id(201101), ]
51 -> [Race-id(201201), ]
52 -> [Race-id(201301), ]
53 -> [Race-id(201401), ]
54 -> [Race-id(201501), ]
55 -> [Race-id(201601), ]
56 -> [Race-id(201701), ]
57 -> [Race-id(201801), ]
58 -> [Race-id(201901), ]
59 -> [Race-id(202001), ]
60 -> [Race-id(202101), ]
61 -> [Race-id(202201), ]
62 -> [Race-id(202301), ]
63 -> [Race-id(202401), ]
64 -> [Race-id(202501), ]
65 -> [Race-id(202601), ]
66 -> [Race-id(202701), ]
67 -> [Race-id(202801), ]
68 -> [Race-id(202901), ]
69 -> [Race-id(203001), ]
70 -> [Race-id(203101), ]
71 -> [Race-id(203201), ]
72 -> [Race-id(203301), ]
73 -> [Race-id(203401), ]
74 -> [Race-id(300101), ]
75 -> [Race-id(300201), ]
76 -> [Race-id(300301), ]
77 -> [Race-id(300401), ]
78 -> [Race-id(300501), ]
79 -> [Race-id(300601), ]
80 -> [Race-id(300701), ]
81 -> [Race-id(300801), ]
82 -> [Race-id(300901), ]
83 -> [Race-id(301001), ]
84 -> [Race-id(301101), ]
85 -> [Race-id(301201), ]
86 -> [Race-id(301301), ]
87 -> [Race-id(301401), ]
88 -> [Race-id(301501), ]
89 -> [Race-id(301601), ]
90 -> [Race-id(301701), ]
91 -> [Race-id(301801), ]
92 -> [Race-id(301901), ]
93 -> [Race-id(302001), ]
94 -> [Race-id(302101), ]
95 -> [Race-id(302201), ]
96 -> [Race-id(302301), ]
97 -> [Race-id(302401), ]
98 -> [Race-id(302501), ]
99 -> [Race-id(302601), ]
100 -> [Race-id(302701), ]
101 -> [Race-id(302801), ]
102 -> [Race-id(302901), ]
103 -> [Race-id(303001), ]
104 -> [Race-id(303101), ]
105 -> [Race-id(303201), ]
106 -> [Race-id(303301), ]
107 -> [Race-id(303401), ]
108 -> [Race-id(303501), ]
109 -> [Race-id(303601), ]
110 -> [Race-id(303701), ]
111 -> [Race-id(303801), ]
112 -> [Race-id(303901), ]
113 -> [Race-id(304001), ]
114 -> [Race-id(304101), ]
115 -> [Race-id(304201), ]
116 -> [Race-id(304301), ]
117 -> [Race-id(304401), ]
118 -> [Race-id(304501), ]
119 -> [Race-id(304601), ]
120 -> [Race-id(304701), ]
121 -> [Race-id(304801), ]
122 -> [Race-id(304901), ]
123 -> [Race-id(305001), ]
124 -> [Race-id(305101), ]
125 -> [Race-id(305201), ]
126 -> [Race-id(305301), ]
127 -> [Race-id(305401), ]
128 -> [Race-id(305501), ]
129 -> [Race-id(305601), ]
130 -> [Race-id(305701), ]
131 -> [Race-id(305801), ]
132 -> [Race-id(305901), ]
133 -> [Race-id(306001), ]
134 -> [Race-id(306101), ]
135 -> [Race-id(306201), ]
136 -> [Race-id(306301), ]
137 -> [Race-id(306401), ]
138 -> [Race-id(306501), ]
139 -> [Race-id(306601), ]
140 -> [Race-id(306701), ]
141 -> [Race-id(306801), ]
142 -> [Race-id(306901), ]
143 -> [Race-id(307001), ]
144 -> [Race-id(100501), Race-id(101001), Race-id(102601), ]
145 -> [Race-id(100301), Race-id(100601), Race-id(102501), ]
146 -> [Race-id(102501), Race-id(102301), ]
147 -> [Race-id(102501), ]
148 -> [Race-id(102601), ]
149 -> [Race-id(203501), ]
150 -> [Race-id(405001), ]
151 -> [Race-id(100301), Race-id(102701), Race-id(101201), ]
152 -> [Race-id(102701), Race-id(101601), ]
153 -> [Race-id(102701), ]
154 -> [Race-id(102801), Race-id(101001), Race-id(101501), ]
155 -> [Race-id(102801), ]
_ -> []
// Get a saddle's type.
// If no saddle matches the ID, the result is Honor.
pub fun saddle-type(s: saddle-id): saddle-type
match s.game-id
1 -> Honor
2 -> Honor
3 -> Honor
4 -> Honor
5 -> Honor
6 -> Honor
7 -> Honor
8 -> Honor
9 -> Honor
10 -> G1-Win
11 -> G1-Win
12 -> G1-Win
13 -> G1-Win
14 -> G1-Win
15 -> G1-Win
16 -> G1-Win
17 -> G1-Win
18 -> G1-Win
19 -> G1-Win
20 -> G1-Win
21 -> G1-Win
22 -> G1-Win
23 -> G1-Win
24 -> G1-Win
25 -> G1-Win
26 -> G1-Win
27 -> G1-Win
28 -> G1-Win
29 -> G1-Win
30 -> G1-Win
31 -> G1-Win
32 -> G1-Win
33 -> G1-Win
34 -> G1-Win
35 -> G1-Win
36 -> G1-Win
37 -> G1-Win
38 -> G1-Win
39 -> G1-Win
40 -> G2-Win
41 -> G2-Win
42 -> G2-Win
43 -> G2-Win
44 -> G2-Win
45 -> G2-Win
46 -> G2-Win
47 -> G2-Win
48 -> G2-Win
49 -> G2-Win
50 -> G2-Win
51 -> G2-Win
52 -> G2-Win
53 -> G2-Win
54 -> G2-Win
55 -> G2-Win
56 -> G2-Win
57 -> G2-Win
58 -> G2-Win
59 -> G2-Win
60 -> G2-Win
61 -> G2-Win
62 -> G2-Win
63 -> G2-Win
64 -> G2-Win
65 -> G2-Win
66 -> G2-Win
67 -> G2-Win
68 -> G2-Win
69 -> G2-Win
70 -> G2-Win
71 -> G2-Win
72 -> G2-Win
73 -> G2-Win
74 -> G3-Win
75 -> G3-Win
76 -> G3-Win
77 -> G3-Win
78 -> G3-Win
79 -> G3-Win
80 -> G3-Win
81 -> G3-Win
82 -> G3-Win
83 -> G3-Win
84 -> G3-Win
85 -> G3-Win
86 -> G3-Win
87 -> G3-Win
88 -> G3-Win
89 -> G3-Win
90 -> G3-Win
91 -> G2-Win
92 -> G3-Win
93 -> G3-Win
94 -> G3-Win
95 -> G3-Win
96 -> G3-Win
97 -> G3-Win
98 -> G3-Win
99 -> G3-Win
100 -> G3-Win
101 -> G3-Win
102 -> G3-Win
103 -> G3-Win
104 -> G3-Win
105 -> G3-Win
106 -> G3-Win
107 -> G3-Win
108 -> G3-Win
109 -> G3-Win
110 -> G3-Win
111 -> G3-Win
112 -> G3-Win
113 -> G3-Win
114 -> G3-Win
115 -> G3-Win
116 -> G3-Win
117 -> G3-Win
118 -> G3-Win
119 -> G3-Win
120 -> G3-Win
121 -> G3-Win
122 -> G3-Win
123 -> G3-Win
124 -> G3-Win
125 -> G3-Win
126 -> G3-Win
127 -> G3-Win
128 -> G3-Win
129 -> G3-Win
130 -> G3-Win
131 -> G2-Win
132 -> G3-Win
133 -> G3-Win
134 -> G3-Win
135 -> G3-Win
136 -> G3-Win
137 -> G3-Win
138 -> G3-Win
139 -> G3-Win
140 -> G3-Win
141 -> G3-Win
142 -> G3-Win
143 -> G3-Win
144 -> Honor
145 -> Honor
146 -> Honor
147 -> G1-Win
148 -> G1-Win
149 -> G2-Win
150 -> G3-Win
151 -> Honor
152 -> Honor
153 -> G1-Win
154 -> Honor
155 -> G1-Win
_ -> Honor
// Get the primary ID for a saddle.
// For saddles which are the primary version, or if no saddle matches the given ID,
// the result is the input.
pub fun primary(s: saddle-id): saddle-id
match s.game-id
144 -> Saddle-id(1)
145 -> Saddle-id(4)
146 -> Saddle-id(6)
147 -> Saddle-id(14)
148 -> Saddle-id(16)
149 -> Saddle-id(49)
151 -> Saddle-id(4)
152 -> Saddle-id(5)
153 -> Saddle-id(13)
154 -> Saddle-id(1)
155 -> Saddle-id(18)
_ -> s

View File

@@ -67,6 +67,7 @@ const (
SkillMovingPastandBeyond SkillID = 100591 // Moving Past, and Beyond SkillMovingPastandBeyond SkillID = 100591 // Moving Past, and Beyond
SkillJustaLittleFarther SkillID = 100601 // Just a Little Farther! SkillJustaLittleFarther SkillID = 100601 // Just a Little Farther!
SkillPridefulKing SkillID = 100611 // Prideful King SkillPridefulKing SkillID = 100611 // Prideful King
SkillAmbitiontoSurpasstheSakura SkillID = 100691 // Ambition to Surpass the Sakura
SkillDazzlnDiver SkillID = 110011 // Dazzl'n ♪ Diver SkillDazzlnDiver SkillID = 110011 // Dazzl'n ♪ Diver
SkillCertainVictory SkillID = 110031 // Certain Victory SkillCertainVictory SkillID = 110031 // Certain Victory
SkillAKissforCourage SkillID = 110041 // A Kiss for Courage SkillAKissforCourage SkillID = 110041 // A Kiss for Courage
@@ -136,6 +137,7 @@ const (
SkillSpringRunnerLv2 SkillID = 200171 // Spring Runner ◎ SkillSpringRunnerLv2 SkillID = 200171 // Spring Runner ◎
SkillSpringRunner SkillID = 200172 // Spring Runner ○ SkillSpringRunner SkillID = 200172 // Spring Runner ○
SkillSpringRunnerX SkillID = 200173 // Spring Runner × SkillSpringRunnerX SkillID = 200173 // Spring Runner ×
SkillSpringSpectacle SkillID = 200174 // Spring Spectacle
SkillSummerRunnerLv2 SkillID = 200181 // Summer Runner ◎ SkillSummerRunnerLv2 SkillID = 200181 // Summer Runner ◎
SkillSummerRunner SkillID = 200182 // Summer Runner ○ SkillSummerRunner SkillID = 200182 // Summer Runner ○
SkillSummerRunnerX SkillID = 200183 // Summer Runner × SkillSummerRunnerX SkillID = 200183 // Summer Runner ×
@@ -427,6 +429,7 @@ const (
SkillFeatureAct SkillID = 202012 // Feature Act SkillFeatureAct SkillID = 202012 // Feature Act
SkillDaringStrike SkillID = 202021 // Daring Strike SkillDaringStrike SkillID = 202021 // Daring Strike
SkillEarlyStart SkillID = 202022 // Early Start SkillEarlyStart SkillID = 202022 // Early Start
SkillNothingVentured SkillID = 202031 // Nothing Ventured
SkillRiskyBusiness SkillID = 202032 // Risky Business SkillRiskyBusiness SkillID = 202032 // Risky Business
SkillRunaway SkillID = 202051 // Runaway SkillRunaway SkillID = 202051 // Runaway
SkillBurningSpiritSPD SkillID = 210011 // Burning Spirit SPD SkillBurningSpiritSPD SkillID = 210011 // Burning Spirit SPD
@@ -495,6 +498,7 @@ const (
SkillMovingPastandBeyondInherit SkillID = 900591 // Moving Past, and Beyond SkillMovingPastandBeyondInherit SkillID = 900591 // Moving Past, and Beyond
SkillJustaLittleFartherInherit SkillID = 900601 // Just a Little Farther! SkillJustaLittleFartherInherit SkillID = 900601 // Just a Little Farther!
SkillPridefulKingInherit SkillID = 900611 // Prideful King SkillPridefulKingInherit SkillID = 900611 // Prideful King
SkillAmbitiontoSurpasstheSakuraInherit SkillID = 900691 // Ambition to Surpass the Sakura
SkillDazzlnDiverInherit SkillID = 910011 // Dazzl'n ♪ Diver SkillDazzlnDiverInherit SkillID = 910011 // Dazzl'n ♪ Diver
SkillCertainVictoryInherit SkillID = 910031 // Certain Victory SkillCertainVictoryInherit SkillID = 910031 // Certain Victory
SkillAKissforCourageInherit SkillID = 910041 // A Kiss for Courage SkillAKissforCourageInherit SkillID = 910041 // A Kiss for Courage
@@ -578,6 +582,7 @@ var OrderedSkills = [...]SkillID{
SkillMovingPastandBeyond, SkillMovingPastandBeyond,
SkillJustaLittleFarther, SkillJustaLittleFarther,
SkillPridefulKing, SkillPridefulKing,
SkillAmbitiontoSurpasstheSakura,
SkillDazzlnDiver, SkillDazzlnDiver,
SkillCertainVictory, SkillCertainVictory,
SkillAKissforCourage, SkillAKissforCourage,
@@ -647,6 +652,7 @@ var OrderedSkills = [...]SkillID{
SkillSpringRunnerLv2, SkillSpringRunnerLv2,
SkillSpringRunner, SkillSpringRunner,
SkillSpringRunnerX, SkillSpringRunnerX,
SkillSpringSpectacle,
SkillSummerRunnerLv2, SkillSummerRunnerLv2,
SkillSummerRunner, SkillSummerRunner,
SkillSummerRunnerX, SkillSummerRunnerX,
@@ -938,6 +944,7 @@ var OrderedSkills = [...]SkillID{
SkillFeatureAct, SkillFeatureAct,
SkillDaringStrike, SkillDaringStrike,
SkillEarlyStart, SkillEarlyStart,
SkillNothingVentured,
SkillRiskyBusiness, SkillRiskyBusiness,
SkillRunaway, SkillRunaway,
SkillBurningSpiritSPD, SkillBurningSpiritSPD,
@@ -1006,6 +1013,7 @@ var OrderedSkills = [...]SkillID{
SkillMovingPastandBeyondInherit, SkillMovingPastandBeyondInherit,
SkillJustaLittleFartherInherit, SkillJustaLittleFartherInherit,
SkillPridefulKingInherit, SkillPridefulKingInherit,
SkillAmbitiontoSurpasstheSakuraInherit,
SkillDazzlnDiverInherit, SkillDazzlnDiverInherit,
SkillCertainVictoryInherit, SkillCertainVictoryInherit,
SkillAKissforCourageInherit, SkillAKissforCourageInherit,
@@ -2360,6 +2368,27 @@ var AllSkills = map[SkillID]Skill{
UniqueOwner: "[King of Emeralds] King Halo", UniqueOwner: "[King of Emeralds] King Halo",
IconID: 20013, IconID: 20013,
}, },
SkillAmbitiontoSurpasstheSakura: {
ID: 100691,
Name: "Ambition to Surpass the Sakura",
Description: "Increase velocity with blossoming ambition when well-positioned and close to the runner ahead with 300m or less remaining.",
Group: 10069,
Rarity: 5,
GroupRate: 1,
GradeValue: 340,
Activations: []Activation{
{
Condition: "remain_distance<=300&order_rate<=40&bashin_diff_infront<=1",
Duration: 50000,
Cooldown: 5000000,
Abilities: []Ability{
{Type: 27, ValueUsage: 1, Value: 3500, Target: 1, TargetValue: 0},
},
},
},
UniqueOwner: "[Strength in Full Bloom] Sakura Chiyono O",
IconID: 20013,
},
SkillDazzlnDiver: { SkillDazzlnDiver: {
ID: 110011, ID: 110011,
Name: "Dazzl'n ♪ Diver", Name: "Dazzl'n ♪ Diver",
@@ -3780,6 +3809,27 @@ var AllSkills = map[SkillID]Skill{
SPCost: 50, SPCost: 50,
IconID: 10014, IconID: 10014,
}, },
SkillSpringSpectacle: {
ID: 200174,
Name: "Spring Spectacle",
Description: "Increase performance in spring, boosting Speed and Power.",
Group: 20017,
Rarity: 2,
GroupRate: 3,
GradeValue: 461,
Activations: []Activation{
{
Condition: "season==1@season==5",
Duration: -1,
Abilities: []Ability{
{Type: 1, ValueUsage: 1, Value: 600000, Target: 1, TargetValue: 0},
{Type: 3, ValueUsage: 1, Value: 600000, Target: 1, TargetValue: 0},
},
},
},
SPCost: 130,
IconID: 10012,
},
SkillSummerRunnerLv2: { SkillSummerRunnerLv2: {
ID: 200181, ID: 200181,
Name: "Summer Runner ◎", Name: "Summer Runner ◎",
@@ -10116,6 +10166,29 @@ var AllSkills = map[SkillID]Skill{
SPCost: 180, SPCost: 180,
IconID: 20011, IconID: 20011,
}, },
SkillNothingVentured: {
ID: 202031,
Name: "Nothing Ventured",
Description: "Greatly increase velocity in the second half of the race, but also greatly increase fatigue sometimes.",
Group: 20203,
Rarity: 2,
GroupRate: 2,
GradeValue: 334,
WitCheck: true,
Activations: []Activation{
{
Condition: "distance_rate_after_random==50",
Duration: 18000,
Cooldown: 5000000,
Abilities: []Ability{
{Type: 27, ValueUsage: 1, Value: 4500, Target: 1, TargetValue: 0},
{Type: 9, ValueUsage: 8, Value: -10000, Target: 1, TargetValue: 0},
},
},
},
SPCost: 120,
IconID: 20012,
},
SkillRiskyBusiness: { SkillRiskyBusiness: {
ID: 202032, ID: 202032,
Name: "Risky Business", Name: "Risky Business",
@@ -11659,6 +11732,29 @@ var AllSkills = map[SkillID]Skill{
SPCost: 200, SPCost: 200,
IconID: 20011, IconID: 20011,
}, },
SkillAmbitiontoSurpasstheSakuraInherit: {
ID: 900691,
Name: "Ambition to Surpass the Sakura" + " (Inherited)",
Description: "Slightly increase velocity when well-positioned and close to the runner ahead with 300m or less remaining.",
Group: 10069,
Rarity: 1,
GroupRate: 2,
GradeValue: 180,
WitCheck: true,
Activations: []Activation{
{
Condition: "remain_distance<=300&order_rate<=40&bashin_diff_infront<=1",
Duration: 30000,
Cooldown: 5000000,
Abilities: []Ability{
{Type: 27, ValueUsage: 1, Value: 1500, Target: 1, TargetValue: 0},
},
},
},
UniqueOwner: "[Strength in Full Bloom] Sakura Chiyono O",
SPCost: 200,
IconID: 20011,
},
SkillDazzlnDiverInherit: { SkillDazzlnDiverInherit: {
ID: 910011, ID: 910011,
Name: "Dazzl'n ♪ Diver" + " (Inherited)", Name: "Dazzl'n ♪ Diver" + " (Inherited)",
@@ -12075,7 +12171,7 @@ var AllSkills = map[SkillID]Skill{
SkillCarnivalBonus: { SkillCarnivalBonus: {
ID: 1000011, ID: 1000011,
Name: "Carnival Bonus", Name: "Carnival Bonus",
Description: "Gain +{0}% Carnival Points. This skill will disappear when the event ends.", Description: "Increase attributes by +{0} in the Racing Carnival. {1} chance to also raise runner's mood to Great. This skill will disappear when the event ends.",
Group: 100001, Group: 100001,
Rarity: 1, Rarity: 1,
GroupRate: 1, GroupRate: 1,
@@ -12148,6 +12244,7 @@ var SkillNameToID = map[string]SkillID{
"Moving Past, and Beyond": 100591, "Moving Past, and Beyond": 100591,
"Just a Little Farther!": 100601, "Just a Little Farther!": 100601,
"Prideful King": 100611, "Prideful King": 100611,
"Ambition to Surpass the Sakura": 100691,
"Dazzl'n ♪ Diver": 110011, "Dazzl'n ♪ Diver": 110011,
"Certain Victory": 110031, "Certain Victory": 110031,
"A Kiss for Courage": 110041, "A Kiss for Courage": 110041,
@@ -12217,6 +12314,7 @@ var SkillNameToID = map[string]SkillID{
"Spring Runner ◎": 200171, "Spring Runner ◎": 200171,
"Spring Runner ○": 200172, "Spring Runner ○": 200172,
"Spring Runner ×": 200173, "Spring Runner ×": 200173,
"Spring Spectacle": 200174,
"Summer Runner ◎": 200181, "Summer Runner ◎": 200181,
"Summer Runner ○": 200182, "Summer Runner ○": 200182,
"Summer Runner ×": 200183, "Summer Runner ×": 200183,
@@ -12508,6 +12606,7 @@ var SkillNameToID = map[string]SkillID{
"Feature Act": 202012, "Feature Act": 202012,
"Daring Strike": 202021, "Daring Strike": 202021,
"Early Start": 202022, "Early Start": 202022,
"Nothing Ventured": 202031,
"Risky Business": 202032, "Risky Business": 202032,
"Runaway": 202051, "Runaway": 202051,
"Burning Spirit SPD": 210011, "Burning Spirit SPD": 210011,
@@ -12576,6 +12675,7 @@ var SkillNameToID = map[string]SkillID{
"Moving Past, and Beyond" + " (Inherited)": 900591, "Moving Past, and Beyond" + " (Inherited)": 900591,
"Just a Little Farther!" + " (Inherited)": 900601, "Just a Little Farther!" + " (Inherited)": 900601,
"Prideful King" + " (Inherited)": 900611, "Prideful King" + " (Inherited)": 900611,
"Ambition to Surpass the Sakura" + " (Inherited)": 900691,
"Dazzl'n ♪ Diver" + " (Inherited)": 910011, "Dazzl'n ♪ Diver" + " (Inherited)": 910011,
"Certain Victory" + " (Inherited)": 910031, "Certain Victory" + " (Inherited)": 910031,
"A Kiss for Courage" + " (Inherited)": 910041, "A Kiss for Courage" + " (Inherited)": 910041,
@@ -12659,6 +12759,7 @@ var SkillGroups = map[int32][4]SkillID{
10059: {SkillMovingPastandBeyond, SkillMovingPastandBeyondInherit}, 10059: {SkillMovingPastandBeyond, SkillMovingPastandBeyondInherit},
10060: {SkillJustaLittleFarther, SkillJustaLittleFartherInherit}, 10060: {SkillJustaLittleFarther, SkillJustaLittleFartherInherit},
10061: {SkillPridefulKing, SkillPridefulKingInherit}, 10061: {SkillPridefulKing, SkillPridefulKingInherit},
10069: {SkillAmbitiontoSurpasstheSakura, SkillAmbitiontoSurpasstheSakuraInherit},
11001: {SkillDazzlnDiver, SkillDazzlnDiverInherit}, 11001: {SkillDazzlnDiver, SkillDazzlnDiverInherit},
11003: {SkillCertainVictory, SkillCertainVictoryInherit}, 11003: {SkillCertainVictory, SkillCertainVictoryInherit},
11004: {SkillAKissforCourage, SkillAKissforCourageInherit}, 11004: {SkillAKissforCourage, SkillAKissforCourageInherit},
@@ -12692,7 +12793,7 @@ var SkillGroups = map[int32][4]SkillID{
20014: {SkillNonStandardDistanceLv2, SkillNonStandardDistance, SkillNonStandardDistanceX}, 20014: {SkillNonStandardDistanceLv2, SkillNonStandardDistance, SkillNonStandardDistanceX},
20015: {SkillFirmConditionsLv2, SkillFirmConditions, SkillFirmConditionsX}, 20015: {SkillFirmConditionsLv2, SkillFirmConditions, SkillFirmConditionsX},
20016: {SkillWetConditionsLv2, SkillWetConditions, SkillWetConditionsX}, 20016: {SkillWetConditionsLv2, SkillWetConditions, SkillWetConditionsX},
20017: {SkillSpringRunnerLv2, SkillSpringRunner, SkillSpringRunnerX}, 20017: {SkillSpringRunnerLv2, SkillSpringRunner, SkillSpringRunnerX, SkillSpringSpectacle},
20018: {SkillSummerRunnerLv2, SkillSummerRunner, SkillSummerRunnerX}, 20018: {SkillSummerRunnerLv2, SkillSummerRunner, SkillSummerRunnerX},
20019: {SkillFallRunnerLv2, SkillFallRunner, SkillFallRunnerX, SkillFallFrenzy}, 20019: {SkillFallRunnerLv2, SkillFallRunner, SkillFallRunnerX, SkillFallFrenzy},
20020: {SkillWinterRunnerLv2, SkillWinterRunner, SkillWinterRunnerX}, 20020: {SkillWinterRunnerLv2, SkillWinterRunner, SkillWinterRunnerX},
@@ -12843,7 +12944,7 @@ var SkillGroups = map[int32][4]SkillID{
20200: {SkillFamiliarGround}, 20200: {SkillFamiliarGround},
20201: {SkillHeadliner, SkillFeatureAct}, 20201: {SkillHeadliner, SkillFeatureAct},
20202: {SkillDaringStrike, SkillEarlyStart}, 20202: {SkillDaringStrike, SkillEarlyStart},
20203: {SkillRiskyBusiness}, 20203: {SkillNothingVentured, SkillRiskyBusiness},
21001: {SkillBurningSpiritSPD, SkillIgnitedSpiritSPD}, 21001: {SkillBurningSpiritSPD, SkillIgnitedSpiritSPD},
21002: {SkillBurningSpiritSTA, SkillIgnitedSpiritSTA}, 21002: {SkillBurningSpiritSTA, SkillIgnitedSpiritSTA},
21003: {SkillBurningSpiritPWR, SkillIgnitedSpiritPWR}, 21003: {SkillBurningSpiritPWR, SkillIgnitedSpiritPWR},

View File

@@ -72,6 +72,7 @@ pub type skill
Moving-Past-and-Beyond Moving-Past-and-Beyond
Just-a-Little-Farther Just-a-Little-Farther
Prideful-King Prideful-King
Ambition-to-Surpass-the-Sakura
Dazzl-n-Diver Dazzl-n-Diver
Certain-Victory Certain-Victory
A-Kiss-for-Courage A-Kiss-for-Courage
@@ -141,6 +142,7 @@ pub type skill
Spring-Runner-Lv2 Spring-Runner-Lv2
Spring-Runner Spring-Runner
Spring-Runner-x Spring-Runner-x
Spring-Spectacle
Summer-Runner-Lv2 Summer-Runner-Lv2
Summer-Runner Summer-Runner
Summer-Runner-x Summer-Runner-x
@@ -432,6 +434,7 @@ pub type skill
Feature-Act Feature-Act
Daring-Strike Daring-Strike
Early-Start Early-Start
Nothing-Ventured
Risky-Business Risky-Business
Runaway Runaway
Burning-Spirit-SPD Burning-Spirit-SPD
@@ -500,6 +503,7 @@ pub type skill
Moving-Past-and-Beyond-Inherit Moving-Past-and-Beyond-Inherit
Just-a-Little-Farther-Inherit Just-a-Little-Farther-Inherit
Prideful-King-Inherit Prideful-King-Inherit
Ambition-to-Surpass-the-Sakura-Inherit
Dazzl-n-Diver-Inherit Dazzl-n-Diver-Inherit
Certain-Victory-Inherit Certain-Victory-Inherit
A-Kiss-for-Courage-Inherit A-Kiss-for-Courage-Inherit
@@ -584,6 +588,7 @@ pub fun skill-id(s: skill): skill-id
Moving-Past-and-Beyond -> Skill-id(100591) Moving-Past-and-Beyond -> Skill-id(100591)
Just-a-Little-Farther -> Skill-id(100601) Just-a-Little-Farther -> Skill-id(100601)
Prideful-King -> Skill-id(100611) Prideful-King -> Skill-id(100611)
Ambition-to-Surpass-the-Sakura -> Skill-id(100691)
Dazzl-n-Diver -> Skill-id(110011) Dazzl-n-Diver -> Skill-id(110011)
Certain-Victory -> Skill-id(110031) Certain-Victory -> Skill-id(110031)
A-Kiss-for-Courage -> Skill-id(110041) A-Kiss-for-Courage -> Skill-id(110041)
@@ -653,6 +658,7 @@ pub fun skill-id(s: skill): skill-id
Spring-Runner-Lv2 -> Skill-id(200171) Spring-Runner-Lv2 -> Skill-id(200171)
Spring-Runner -> Skill-id(200172) Spring-Runner -> Skill-id(200172)
Spring-Runner-x -> Skill-id(200173) Spring-Runner-x -> Skill-id(200173)
Spring-Spectacle -> Skill-id(200174)
Summer-Runner-Lv2 -> Skill-id(200181) Summer-Runner-Lv2 -> Skill-id(200181)
Summer-Runner -> Skill-id(200182) Summer-Runner -> Skill-id(200182)
Summer-Runner-x -> Skill-id(200183) Summer-Runner-x -> Skill-id(200183)
@@ -944,6 +950,7 @@ pub fun skill-id(s: skill): skill-id
Feature-Act -> Skill-id(202012) Feature-Act -> Skill-id(202012)
Daring-Strike -> Skill-id(202021) Daring-Strike -> Skill-id(202021)
Early-Start -> Skill-id(202022) Early-Start -> Skill-id(202022)
Nothing-Ventured -> Skill-id(202031)
Risky-Business -> Skill-id(202032) Risky-Business -> Skill-id(202032)
Runaway -> Skill-id(202051) Runaway -> Skill-id(202051)
Burning-Spirit-SPD -> Skill-id(210011) Burning-Spirit-SPD -> Skill-id(210011)
@@ -1012,6 +1019,7 @@ pub fun skill-id(s: skill): skill-id
Moving-Past-and-Beyond-Inherit -> Skill-id(900591) Moving-Past-and-Beyond-Inherit -> Skill-id(900591)
Just-a-Little-Farther-Inherit -> Skill-id(900601) Just-a-Little-Farther-Inherit -> Skill-id(900601)
Prideful-King-Inherit -> Skill-id(900611) Prideful-King-Inherit -> Skill-id(900611)
Ambition-to-Surpass-the-Sakura-Inherit -> Skill-id(900691)
Dazzl-n-Diver-Inherit -> Skill-id(910011) Dazzl-n-Diver-Inherit -> Skill-id(910011)
Certain-Victory-Inherit -> Skill-id(910031) Certain-Victory-Inherit -> Skill-id(910031)
A-Kiss-for-Courage-Inherit -> Skill-id(910041) A-Kiss-for-Courage-Inherit -> Skill-id(910041)
@@ -1095,6 +1103,7 @@ pub val all = [
Moving-Past-and-Beyond, Moving-Past-and-Beyond,
Just-a-Little-Farther, Just-a-Little-Farther,
Prideful-King, Prideful-King,
Ambition-to-Surpass-the-Sakura,
Dazzl-n-Diver, Dazzl-n-Diver,
Certain-Victory, Certain-Victory,
A-Kiss-for-Courage, A-Kiss-for-Courage,
@@ -1164,6 +1173,7 @@ pub val all = [
Spring-Runner-Lv2, Spring-Runner-Lv2,
Spring-Runner, Spring-Runner,
Spring-Runner-x, Spring-Runner-x,
Spring-Spectacle,
Summer-Runner-Lv2, Summer-Runner-Lv2,
Summer-Runner, Summer-Runner,
Summer-Runner-x, Summer-Runner-x,
@@ -1455,6 +1465,7 @@ pub val all = [
Feature-Act, Feature-Act,
Daring-Strike, Daring-Strike,
Early-Start, Early-Start,
Nothing-Ventured,
Risky-Business, Risky-Business,
Runaway, Runaway,
Burning-Spirit-SPD, Burning-Spirit-SPD,
@@ -1523,6 +1534,7 @@ pub val all = [
Moving-Past-and-Beyond-Inherit, Moving-Past-and-Beyond-Inherit,
Just-a-Little-Farther-Inherit, Just-a-Little-Farther-Inherit,
Prideful-King-Inherit, Prideful-King-Inherit,
Ambition-to-Surpass-the-Sakura-Inherit,
Dazzl-n-Diver-Inherit, Dazzl-n-Diver-Inherit,
Certain-Victory-Inherit, Certain-Victory-Inherit,
A-Kiss-for-Courage-Inherit, A-Kiss-for-Courage-Inherit,
@@ -1606,6 +1618,7 @@ val name2id: rbmap<string, skill-id> = rb-map/empty()
.set("Moving Past, and Beyond", Skill-id(100591)) .set("Moving Past, and Beyond", Skill-id(100591))
.set("Just a Little Farther!", Skill-id(100601)) .set("Just a Little Farther!", Skill-id(100601))
.set("Prideful King", Skill-id(100611)) .set("Prideful King", Skill-id(100611))
.set("Ambition to Surpass the Sakura", Skill-id(100691))
.set("Dazzl'n ♪ Diver", Skill-id(110011)) .set("Dazzl'n ♪ Diver", Skill-id(110011))
.set("Certain Victory", Skill-id(110031)) .set("Certain Victory", Skill-id(110031))
.set("A Kiss for Courage", Skill-id(110041)) .set("A Kiss for Courage", Skill-id(110041))
@@ -1675,6 +1688,7 @@ val name2id: rbmap<string, skill-id> = rb-map/empty()
.set("Spring Runner ◎", Skill-id(200171)) .set("Spring Runner ◎", Skill-id(200171))
.set("Spring Runner ○", Skill-id(200172)) .set("Spring Runner ○", Skill-id(200172))
.set("Spring Runner ×", Skill-id(200173)) .set("Spring Runner ×", Skill-id(200173))
.set("Spring Spectacle", Skill-id(200174))
.set("Summer Runner ◎", Skill-id(200181)) .set("Summer Runner ◎", Skill-id(200181))
.set("Summer Runner ○", Skill-id(200182)) .set("Summer Runner ○", Skill-id(200182))
.set("Summer Runner ×", Skill-id(200183)) .set("Summer Runner ×", Skill-id(200183))
@@ -1966,6 +1980,7 @@ val name2id: rbmap<string, skill-id> = rb-map/empty()
.set("Feature Act", Skill-id(202012)) .set("Feature Act", Skill-id(202012))
.set("Daring Strike", Skill-id(202021)) .set("Daring Strike", Skill-id(202021))
.set("Early Start", Skill-id(202022)) .set("Early Start", Skill-id(202022))
.set("Nothing Ventured", Skill-id(202031))
.set("Risky Business", Skill-id(202032)) .set("Risky Business", Skill-id(202032))
.set("Runaway", Skill-id(202051)) .set("Runaway", Skill-id(202051))
.set("Burning Spirit SPD", Skill-id(210011)) .set("Burning Spirit SPD", Skill-id(210011))
@@ -2034,6 +2049,7 @@ val name2id: rbmap<string, skill-id> = rb-map/empty()
.set("Moving Past, and Beyond" ++ " (Inherited)", Skill-id(900591)) .set("Moving Past, and Beyond" ++ " (Inherited)", Skill-id(900591))
.set("Just a Little Farther!" ++ " (Inherited)", Skill-id(900601)) .set("Just a Little Farther!" ++ " (Inherited)", Skill-id(900601))
.set("Prideful King" ++ " (Inherited)", Skill-id(900611)) .set("Prideful King" ++ " (Inherited)", Skill-id(900611))
.set("Ambition to Surpass the Sakura" ++ " (Inherited)", Skill-id(900691))
.set("Dazzl'n ♪ Diver" ++ " (Inherited)", Skill-id(910011)) .set("Dazzl'n ♪ Diver" ++ " (Inherited)", Skill-id(910011))
.set("Certain Victory" ++ " (Inherited)", Skill-id(910031)) .set("Certain Victory" ++ " (Inherited)", Skill-id(910031))
.set("A Kiss for Courage" ++ " (Inherited)", Skill-id(910041)) .set("A Kiss for Courage" ++ " (Inherited)", Skill-id(910041))
@@ -2126,6 +2142,7 @@ pub fun show(s: skill-id): string
100591 -> "Moving Past, and Beyond" 100591 -> "Moving Past, and Beyond"
100601 -> "Just a Little Farther!" 100601 -> "Just a Little Farther!"
100611 -> "Prideful King" 100611 -> "Prideful King"
100691 -> "Ambition to Surpass the Sakura"
110011 -> "Dazzl'n ♪ Diver" 110011 -> "Dazzl'n ♪ Diver"
110031 -> "Certain Victory" 110031 -> "Certain Victory"
110041 -> "A Kiss for Courage" 110041 -> "A Kiss for Courage"
@@ -2195,6 +2212,7 @@ pub fun show(s: skill-id): string
200171 -> "Spring Runner ◎" 200171 -> "Spring Runner ◎"
200172 -> "Spring Runner ○" 200172 -> "Spring Runner ○"
200173 -> "Spring Runner ×" 200173 -> "Spring Runner ×"
200174 -> "Spring Spectacle"
200181 -> "Summer Runner ◎" 200181 -> "Summer Runner ◎"
200182 -> "Summer Runner ○" 200182 -> "Summer Runner ○"
200183 -> "Summer Runner ×" 200183 -> "Summer Runner ×"
@@ -2486,6 +2504,7 @@ pub fun show(s: skill-id): string
202012 -> "Feature Act" 202012 -> "Feature Act"
202021 -> "Daring Strike" 202021 -> "Daring Strike"
202022 -> "Early Start" 202022 -> "Early Start"
202031 -> "Nothing Ventured"
202032 -> "Risky Business" 202032 -> "Risky Business"
202051 -> "Runaway" 202051 -> "Runaway"
210011 -> "Burning Spirit SPD" 210011 -> "Burning Spirit SPD"
@@ -2554,6 +2573,7 @@ pub fun show(s: skill-id): string
900591 -> "Moving Past, and Beyond" ++ " (Inherited)" 900591 -> "Moving Past, and Beyond" ++ " (Inherited)"
900601 -> "Just a Little Farther!" ++ " (Inherited)" 900601 -> "Just a Little Farther!" ++ " (Inherited)"
900611 -> "Prideful King" ++ " (Inherited)" 900611 -> "Prideful King" ++ " (Inherited)"
900691 -> "Ambition to Surpass the Sakura" ++ " (Inherited)"
910011 -> "Dazzl'n ♪ Diver" ++ " (Inherited)" 910011 -> "Dazzl'n ♪ Diver" ++ " (Inherited)"
910031 -> "Certain Victory" ++ " (Inherited)" 910031 -> "Certain Victory" ++ " (Inherited)"
910041 -> "A Kiss for Courage" ++ " (Inherited)" 910041 -> "A Kiss for Courage" ++ " (Inherited)"
@@ -2640,6 +2660,7 @@ pub fun description(s: skill-id): string
100591 -> "Having run the race calmly, increase acceleration with hardened determination when making a move mid-race, or on a crucial corner late-race whilst in midpack." 100591 -> "Having run the race calmly, increase acceleration with hardened determination when making a move mid-race, or on a crucial corner late-race whilst in midpack."
100601 -> "Increase velocity with flaring fighting spirit when positioned 3rd and about to lose late-race." 100601 -> "Increase velocity with flaring fighting spirit when positioned 3rd and about to lose late-race."
100611 -> "Greatly increase velocity in a true display of skill with 200m remaining after racing calmly." 100611 -> "Greatly increase velocity in a true display of skill with 200m remaining after racing calmly."
100691 -> "Increase velocity with blossoming ambition when well-positioned and close to the runner ahead with 300m or less remaining."
110011 -> "Recover endurance by relaxing after activating 2 skills when positioned midpack mid-race." 110011 -> "Recover endurance by relaxing after activating 2 skills when positioned midpack mid-race."
110031 -> "Greatly increase velocity with an indomitable fighting spirit on the final straight after being on the heels of another runner toward the front on the final corner or later." 110031 -> "Greatly increase velocity with an indomitable fighting spirit on the final straight after being on the heels of another runner toward the front on the final corner or later."
110041 -> "Increase velocity enthusiastically when positioned toward the front in the second half of the race after recovering endurance with a skill." 110041 -> "Increase velocity enthusiastically when positioned toward the front in the second half of the race after recovering endurance with a skill."
@@ -2709,6 +2730,7 @@ pub fun description(s: skill-id): string
200171 -> "Increase performance in spring." 200171 -> "Increase performance in spring."
200172 -> "Moderately increase performance in spring." 200172 -> "Moderately increase performance in spring."
200173 -> "Moderately decrease performance in spring." 200173 -> "Moderately decrease performance in spring."
200174 -> "Increase performance in spring, boosting Speed and Power."
200181 -> "Increase performance in summer." 200181 -> "Increase performance in summer."
200182 -> "Moderately increase performance in summer." 200182 -> "Moderately increase performance in summer."
200183 -> "Moderately decrease performance in summer." 200183 -> "Moderately decrease performance in summer."
@@ -3000,6 +3022,7 @@ pub fun description(s: skill-id): string
202012 -> "Slightly increase velocity when positioned toward the front upon approaching late-race. (Long)" 202012 -> "Slightly increase velocity when positioned toward the front upon approaching late-race. (Long)"
202021 -> "Moderately increase velocity for a medium duration when positioned toward the back mid-race. (End Closer)" 202021 -> "Moderately increase velocity for a medium duration when positioned toward the back mid-race. (End Closer)"
202022 -> "Very slightly increase velocity for a medium duration when positioned toward the back mid-race. (End Closer)" 202022 -> "Very slightly increase velocity for a medium duration when positioned toward the back mid-race. (End Closer)"
202031 -> "Greatly increase velocity in the second half of the race, but also greatly increase fatigue sometimes."
202032 -> "Moderately increase velocity in the second half of the race, but also greatly increase fatigue sometimes." 202032 -> "Moderately increase velocity in the second half of the race, but also greatly increase fatigue sometimes."
202051 -> "Attempt to gain an especially large lead and keep it until the finish. (Front Runner)" 202051 -> "Attempt to gain an especially large lead and keep it until the finish. (Front Runner)"
210011 -> "Burn bright with team spirit, increasing velocity in proportion to the total Speed of racing team members mid-race." 210011 -> "Burn bright with team spirit, increasing velocity in proportion to the total Speed of racing team members mid-race."
@@ -3068,6 +3091,7 @@ pub fun description(s: skill-id): string
900591 -> "Having run the race calmly, slightly increase acceleration when making a move mid-race, or on a crucial corner late-race whilst in midpack." 900591 -> "Having run the race calmly, slightly increase acceleration when making a move mid-race, or on a crucial corner late-race whilst in midpack."
900601 -> "Slightly increase velocity when positioned 3rd and about to lose late-race." 900601 -> "Slightly increase velocity when positioned 3rd and about to lose late-race."
900611 -> "Moderately increase velocity in a true display of skill with 200m remaining after racing calmly." 900611 -> "Moderately increase velocity in a true display of skill with 200m remaining after racing calmly."
900691 -> "Slightly increase velocity when well-positioned and close to the runner ahead with 300m or less remaining."
910011 -> "Slightly recover endurance after activating 2 skills mid-race." 910011 -> "Slightly recover endurance after activating 2 skills mid-race."
910031 -> "Moderately increase velocity on the final straight after being on the heels of another runner toward the front on the final corner or later." 910031 -> "Moderately increase velocity on the final straight after being on the heels of another runner toward the front on the final corner or later."
910041 -> "Slightly increase velocity when positioned toward the front in the second half of the race after recovering endurance with a skill." 910041 -> "Slightly increase velocity when positioned toward the front in the second half of the race after recovering endurance with a skill."
@@ -3085,7 +3109,7 @@ pub fun description(s: skill-id): string
910451 -> "Very slightly increase ability to break out of the pack when well-positioned and close to the runner ahead on the final straight." 910451 -> "Very slightly increase ability to break out of the pack when well-positioned and close to the runner ahead on the final straight."
910521 -> "Give max effort when far from the lead on the final corner, very slightly increasing velocity steadily for a duration proportional to distance from the lead." 910521 -> "Give max effort when far from the lead on the final corner, very slightly increasing velocity steadily for a duration proportional to distance from the lead."
910561 -> "Slightly increase velocity with a surge of fortune when pressured by another runner toward the back in the second half of the race." 910561 -> "Slightly increase velocity with a surge of fortune when pressured by another runner toward the back in the second half of the race."
1000011 -> "Gain +{0}% Carnival Points. This skill will disappear when the event ends." 1000011 -> "Increase attributes by +{0} in the Racing Carnival. {1} chance to also raise runner's mood to Great. This skill will disappear when the event ends."
_ -> "" _ -> ""
// Get the skill group ID for a skill. // Get the skill group ID for a skill.
@@ -3154,6 +3178,7 @@ pub fun group(s: skill-id): skill-group-id
100591 -> Skill-group-id(10059) 100591 -> Skill-group-id(10059)
100601 -> Skill-group-id(10060) 100601 -> Skill-group-id(10060)
100611 -> Skill-group-id(10061) 100611 -> Skill-group-id(10061)
100691 -> Skill-group-id(10069)
110011 -> Skill-group-id(11001) 110011 -> Skill-group-id(11001)
110031 -> Skill-group-id(11003) 110031 -> Skill-group-id(11003)
110041 -> Skill-group-id(11004) 110041 -> Skill-group-id(11004)
@@ -3223,6 +3248,7 @@ pub fun group(s: skill-id): skill-group-id
200171 -> Skill-group-id(20017) 200171 -> Skill-group-id(20017)
200172 -> Skill-group-id(20017) 200172 -> Skill-group-id(20017)
200173 -> Skill-group-id(20017) 200173 -> Skill-group-id(20017)
200174 -> Skill-group-id(20017)
200181 -> Skill-group-id(20018) 200181 -> Skill-group-id(20018)
200182 -> Skill-group-id(20018) 200182 -> Skill-group-id(20018)
200183 -> Skill-group-id(20018) 200183 -> Skill-group-id(20018)
@@ -3514,6 +3540,7 @@ pub fun group(s: skill-id): skill-group-id
202012 -> Skill-group-id(20201) 202012 -> Skill-group-id(20201)
202021 -> Skill-group-id(20202) 202021 -> Skill-group-id(20202)
202022 -> Skill-group-id(20202) 202022 -> Skill-group-id(20202)
202031 -> Skill-group-id(20203)
202032 -> Skill-group-id(20203) 202032 -> Skill-group-id(20203)
202051 -> Skill-group-id(20205) 202051 -> Skill-group-id(20205)
210011 -> Skill-group-id(21001) 210011 -> Skill-group-id(21001)
@@ -3582,6 +3609,7 @@ pub fun group(s: skill-id): skill-group-id
900591 -> Skill-group-id(10059) 900591 -> Skill-group-id(10059)
900601 -> Skill-group-id(10060) 900601 -> Skill-group-id(10060)
900611 -> Skill-group-id(10061) 900611 -> Skill-group-id(10061)
900691 -> Skill-group-id(10069)
910011 -> Skill-group-id(11001) 910011 -> Skill-group-id(11001)
910031 -> Skill-group-id(11003) 910031 -> Skill-group-id(11003)
910041 -> Skill-group-id(11004) 910041 -> Skill-group-id(11004)
@@ -3668,6 +3696,7 @@ pub fun rarity(s: skill-id): rarity
100591 -> Unique 100591 -> Unique
100601 -> Unique-Upgraded 100601 -> Unique-Upgraded
100611 -> Unique-Upgraded 100611 -> Unique-Upgraded
100691 -> Unique
110011 -> Unique 110011 -> Unique
110031 -> Unique 110031 -> Unique
110041 -> Unique 110041 -> Unique
@@ -3737,6 +3766,7 @@ pub fun rarity(s: skill-id): rarity
200171 -> Common 200171 -> Common
200172 -> Common 200172 -> Common
200173 -> Common 200173 -> Common
200174 -> Rare
200181 -> Common 200181 -> Common
200182 -> Common 200182 -> Common
200183 -> Common 200183 -> Common
@@ -4028,6 +4058,7 @@ pub fun rarity(s: skill-id): rarity
202012 -> Common 202012 -> Common
202021 -> Rare 202021 -> Rare
202022 -> Common 202022 -> Common
202031 -> Rare
202032 -> Common 202032 -> Common
202051 -> Rare 202051 -> Rare
210011 -> Rare 210011 -> Rare
@@ -4096,6 +4127,7 @@ pub fun rarity(s: skill-id): rarity
900591 -> Common 900591 -> Common
900601 -> Common 900601 -> Common
900611 -> Common 900611 -> Common
900691 -> Common
910011 -> Common 910011 -> Common
910031 -> Common 910031 -> Common
910041 -> Common 910041 -> Common
@@ -4182,6 +4214,7 @@ pub fun group-rate(s: skill-id): int
100591 -> 1 100591 -> 1
100601 -> 1 100601 -> 1
100611 -> 1 100611 -> 1
100691 -> 1
110011 -> 1 110011 -> 1
110031 -> 1 110031 -> 1
110041 -> 1 110041 -> 1
@@ -4251,6 +4284,7 @@ pub fun group-rate(s: skill-id): int
200171 -> 2 200171 -> 2
200172 -> 1 200172 -> 1
200173 -> -1 200173 -> -1
200174 -> 3
200181 -> 2 200181 -> 2
200182 -> 1 200182 -> 1
200183 -> -1 200183 -> -1
@@ -4542,6 +4576,7 @@ pub fun group-rate(s: skill-id): int
202012 -> 1 202012 -> 1
202021 -> 2 202021 -> 2
202022 -> 1 202022 -> 1
202031 -> 2
202032 -> 1 202032 -> 1
202051 -> 2 202051 -> 2
210011 -> 2 210011 -> 2
@@ -4610,6 +4645,7 @@ pub fun group-rate(s: skill-id): int
900591 -> 2 900591 -> 2
900601 -> 2 900601 -> 2
900611 -> 2 900611 -> 2
900691 -> 2
910011 -> 2 910011 -> 2
910031 -> 2 910031 -> 2
910041 -> 2 910041 -> 2
@@ -4696,6 +4732,7 @@ pub fun grade-value(s: skill-id): int
100591 -> 340 100591 -> 340
100601 -> 340 100601 -> 340
100611 -> 340 100611 -> 340
100691 -> 340
110011 -> 340 110011 -> 340
110031 -> 340 110031 -> 340
110041 -> 340 110041 -> 340
@@ -4765,6 +4802,7 @@ pub fun grade-value(s: skill-id): int
200171 -> 174 200171 -> 174
200172 -> 129 200172 -> 129
200173 -> -129 200173 -> -129
200174 -> 461
200181 -> 174 200181 -> 174
200182 -> 129 200182 -> 129
200183 -> -129 200183 -> -129
@@ -5056,6 +5094,7 @@ pub fun grade-value(s: skill-id): int
202012 -> 217 202012 -> 217
202021 -> 508 202021 -> 508
202022 -> 217 202022 -> 217
202031 -> 334
202032 -> 129 202032 -> 129
202051 -> 370 202051 -> 370
210011 -> 633 210011 -> 633
@@ -5124,6 +5163,7 @@ pub fun grade-value(s: skill-id): int
900591 -> 180 900591 -> 180
900601 -> 180 900601 -> 180
900611 -> 180 900611 -> 180
900691 -> 180
910011 -> 180 910011 -> 180
910031 -> 180 910031 -> 180
910041 -> 180 910041 -> 180
@@ -5210,6 +5250,7 @@ pub fun wit-check(s: skill-id): bool
100591 -> False 100591 -> False
100601 -> False 100601 -> False
100611 -> False 100611 -> False
100691 -> False
110011 -> False 110011 -> False
110031 -> False 110031 -> False
110041 -> False 110041 -> False
@@ -5279,6 +5320,7 @@ pub fun wit-check(s: skill-id): bool
200171 -> False 200171 -> False
200172 -> False 200172 -> False
200173 -> False 200173 -> False
200174 -> False
200181 -> False 200181 -> False
200182 -> False 200182 -> False
200183 -> False 200183 -> False
@@ -5570,6 +5612,7 @@ pub fun wit-check(s: skill-id): bool
202012 -> True 202012 -> True
202021 -> True 202021 -> True
202022 -> True 202022 -> True
202031 -> True
202032 -> True 202032 -> True
202051 -> False 202051 -> False
210011 -> True 210011 -> True
@@ -5638,6 +5681,7 @@ pub fun wit-check(s: skill-id): bool
900591 -> True 900591 -> True
900601 -> True 900601 -> True
900611 -> True 900611 -> True
900691 -> True
910011 -> True 910011 -> True
910031 -> True 910031 -> True
910041 -> True 910041 -> True
@@ -6695,6 +6739,21 @@ pub fun activations(s: skill-id): list<activation>
] ]
), ),
] ]
100691 -> [
Activation(
precondition = "",
condition = "remain_distance<=300&order_rate<=40&bashin_diff_infront<=1",
duration = 50000.decimal(-4),
cooldown = 5000000.decimal(-4),
abilities = [
Ability(
ability-type = Target-Speed(3500.decimal(-4)),
value-usage = Direct,
target = Self
),
]
),
]
110011 -> [ 110011 -> [
Activation( Activation(
precondition = "", precondition = "",
@@ -7786,6 +7845,26 @@ pub fun activations(s: skill-id): list<activation>
] ]
), ),
] ]
200174 -> [
Activation(
precondition = "",
condition = "season==1@season==5",
duration = -1.decimal,
cooldown = 0.decimal,
abilities = [
Ability(
ability-type = Passive-Speed(600000.decimal(-4)),
value-usage = Direct,
target = Self
),
Ability(
ability-type = Passive-Power(600000.decimal(-4)),
value-usage = Direct,
target = Self
),
]
),
]
200181 -> [ 200181 -> [
Activation( Activation(
precondition = "", precondition = "",
@@ -12331,6 +12410,26 @@ pub fun activations(s: skill-id): list<activation>
] ]
), ),
] ]
202031 -> [
Activation(
precondition = "",
condition = "distance_rate_after_random==50",
duration = 18000.decimal(-4),
cooldown = 5000000.decimal(-4),
abilities = [
Ability(
ability-type = Target-Speed(4500.decimal(-4)),
value-usage = Direct,
target = Self
),
Ability(
ability-type = HP(-10000.decimal(-4)),
value-usage = Multiply-Random,
target = Self
),
]
),
]
202032 -> [ 202032 -> [
Activation( Activation(
precondition = "", precondition = "",
@@ -13454,6 +13553,21 @@ pub fun activations(s: skill-id): list<activation>
] ]
), ),
] ]
900691 -> [
Activation(
precondition = "",
condition = "remain_distance<=300&order_rate<=40&bashin_diff_infront<=1",
duration = 30000.decimal(-4),
cooldown = 5000000.decimal(-4),
abilities = [
Ability(
ability-type = Target-Speed(1500.decimal(-4)),
value-usage = Direct,
target = Self
),
]
),
]
910011 -> [ 910011 -> [
Activation( Activation(
precondition = "", precondition = "",
@@ -13831,6 +13945,7 @@ pub fun unique-owner(s: skill-id): maybe<trainee-id>
100591 -> Just(Trainee-id(105901)) 100591 -> Just(Trainee-id(105901))
100601 -> Just(Trainee-id(106001)) 100601 -> Just(Trainee-id(106001))
100611 -> Just(Trainee-id(106101)) 100611 -> Just(Trainee-id(106101))
100691 -> Just(Trainee-id(106901))
110011 -> Just(Trainee-id(100102)) 110011 -> Just(Trainee-id(100102))
110031 -> Just(Trainee-id(100302)) 110031 -> Just(Trainee-id(100302))
110041 -> Just(Trainee-id(100402)) 110041 -> Just(Trainee-id(100402))
@@ -13894,6 +14009,7 @@ pub fun unique-owner(s: skill-id): maybe<trainee-id>
900591 -> Just(Trainee-id(105901)) 900591 -> Just(Trainee-id(105901))
900601 -> Just(Trainee-id(106001)) 900601 -> Just(Trainee-id(106001))
900611 -> Just(Trainee-id(106101)) 900611 -> Just(Trainee-id(106101))
900691 -> Just(Trainee-id(106901))
910011 -> Just(Trainee-id(100102)) 910011 -> Just(Trainee-id(100102))
910031 -> Just(Trainee-id(100302)) 910031 -> Just(Trainee-id(100302))
910041 -> Just(Trainee-id(100402)) 910041 -> Just(Trainee-id(100402))
@@ -13979,6 +14095,7 @@ pub fun sp-cost(s: skill-id): int
100591 -> 0 100591 -> 0
100601 -> 0 100601 -> 0
100611 -> 0 100611 -> 0
100691 -> 0
110011 -> 0 110011 -> 0
110031 -> 0 110031 -> 0
110041 -> 0 110041 -> 0
@@ -14048,6 +14165,7 @@ pub fun sp-cost(s: skill-id): int
200171 -> 110 200171 -> 110
200172 -> 90 200172 -> 90
200173 -> 50 200173 -> 50
200174 -> 130
200181 -> 110 200181 -> 110
200182 -> 90 200182 -> 90
200183 -> 50 200183 -> 50
@@ -14339,6 +14457,7 @@ pub fun sp-cost(s: skill-id): int
202012 -> 160 202012 -> 160
202021 -> 180 202021 -> 180
202022 -> 180 202022 -> 180
202031 -> 120
202032 -> 120 202032 -> 120
202051 -> 200 202051 -> 200
210011 -> 200 210011 -> 200
@@ -14407,6 +14526,7 @@ pub fun sp-cost(s: skill-id): int
900591 -> 200 900591 -> 200
900601 -> 200 900601 -> 200
900611 -> 200 900611 -> 200
900691 -> 200
910011 -> 200 910011 -> 200
910031 -> 200 910031 -> 200
910041 -> 200 910041 -> 200
@@ -14493,6 +14613,7 @@ pub fun icon-id(s: skill-id): skill-icon-id
100591 -> Skill-icon-id(20043) 100591 -> Skill-icon-id(20043)
100601 -> Skill-icon-id(20013) 100601 -> Skill-icon-id(20013)
100611 -> Skill-icon-id(20013) 100611 -> Skill-icon-id(20013)
100691 -> Skill-icon-id(20013)
110011 -> Skill-icon-id(20023) 110011 -> Skill-icon-id(20023)
110031 -> Skill-icon-id(20013) 110031 -> Skill-icon-id(20013)
110041 -> Skill-icon-id(20013) 110041 -> Skill-icon-id(20013)
@@ -14562,6 +14683,7 @@ pub fun icon-id(s: skill-id): skill-icon-id
200171 -> Skill-icon-id(10011) 200171 -> Skill-icon-id(10011)
200172 -> Skill-icon-id(10011) 200172 -> Skill-icon-id(10011)
200173 -> Skill-icon-id(10014) 200173 -> Skill-icon-id(10014)
200174 -> Skill-icon-id(10012)
200181 -> Skill-icon-id(10011) 200181 -> Skill-icon-id(10011)
200182 -> Skill-icon-id(10011) 200182 -> Skill-icon-id(10011)
200183 -> Skill-icon-id(10014) 200183 -> Skill-icon-id(10014)
@@ -14853,6 +14975,7 @@ pub fun icon-id(s: skill-id): skill-icon-id
202012 -> Skill-icon-id(20011) 202012 -> Skill-icon-id(20011)
202021 -> Skill-icon-id(20012) 202021 -> Skill-icon-id(20012)
202022 -> Skill-icon-id(20011) 202022 -> Skill-icon-id(20011)
202031 -> Skill-icon-id(20012)
202032 -> Skill-icon-id(20011) 202032 -> Skill-icon-id(20011)
202051 -> Skill-icon-id(40012) 202051 -> Skill-icon-id(40012)
210011 -> Skill-icon-id(20102) 210011 -> Skill-icon-id(20102)
@@ -14921,6 +15044,7 @@ pub fun icon-id(s: skill-id): skill-icon-id
900591 -> Skill-icon-id(20041) 900591 -> Skill-icon-id(20041)
900601 -> Skill-icon-id(20011) 900601 -> Skill-icon-id(20011)
900611 -> Skill-icon-id(20011) 900611 -> Skill-icon-id(20011)
900691 -> Skill-icon-id(20011)
910011 -> Skill-icon-id(20021) 910011 -> Skill-icon-id(20021)
910031 -> Skill-icon-id(20011) 910031 -> Skill-icon-id(20011)
910041 -> Skill-icon-id(20011) 910041 -> Skill-icon-id(20011)
@@ -15008,6 +15132,7 @@ pub fun skill-group/show(sg: skill-group-id): string
10059 ->"Moving Past, and Beyond" 10059 ->"Moving Past, and Beyond"
10060 ->"Just a Little Farther!" 10060 ->"Just a Little Farther!"
10061 ->"Prideful King" 10061 ->"Prideful King"
10069 ->"Ambition to Surpass the Sakura"
11001 ->"Dazzl'n ♪ Diver" 11001 ->"Dazzl'n ♪ Diver"
11003 ->"Certain Victory" 11003 ->"Certain Victory"
11004 ->"A Kiss for Courage" 11004 ->"A Kiss for Courage"
@@ -15276,6 +15401,7 @@ pub fun skill-group/skills(sg: skill-group-id): list<skill-id>
10059 -> [Skill-id(100591), Skill-id(900591), ] 10059 -> [Skill-id(100591), Skill-id(900591), ]
10060 -> [Skill-id(100601), Skill-id(900601), ] 10060 -> [Skill-id(100601), Skill-id(900601), ]
10061 -> [Skill-id(100611), Skill-id(900611), ] 10061 -> [Skill-id(100611), Skill-id(900611), ]
10069 -> [Skill-id(100691), Skill-id(900691), ]
11001 -> [Skill-id(110011), Skill-id(910011), ] 11001 -> [Skill-id(110011), Skill-id(910011), ]
11003 -> [Skill-id(110031), Skill-id(910031), ] 11003 -> [Skill-id(110031), Skill-id(910031), ]
11004 -> [Skill-id(110041), Skill-id(910041), ] 11004 -> [Skill-id(110041), Skill-id(910041), ]
@@ -15309,7 +15435,7 @@ pub fun skill-group/skills(sg: skill-group-id): list<skill-id>
20014 -> [Skill-id(200141), Skill-id(200142), Skill-id(200143), ] 20014 -> [Skill-id(200141), Skill-id(200142), Skill-id(200143), ]
20015 -> [Skill-id(200151), Skill-id(200152), Skill-id(200153), ] 20015 -> [Skill-id(200151), Skill-id(200152), Skill-id(200153), ]
20016 -> [Skill-id(200161), Skill-id(200162), Skill-id(200163), ] 20016 -> [Skill-id(200161), Skill-id(200162), Skill-id(200163), ]
20017 -> [Skill-id(200171), Skill-id(200172), Skill-id(200173), ] 20017 -> [Skill-id(200171), Skill-id(200172), Skill-id(200173), Skill-id(200174), ]
20018 -> [Skill-id(200181), Skill-id(200182), Skill-id(200183), ] 20018 -> [Skill-id(200181), Skill-id(200182), Skill-id(200183), ]
20019 -> [Skill-id(200191), Skill-id(200192), Skill-id(200193), Skill-id(200194), ] 20019 -> [Skill-id(200191), Skill-id(200192), Skill-id(200193), Skill-id(200194), ]
20020 -> [Skill-id(200201), Skill-id(200202), Skill-id(200203), ] 20020 -> [Skill-id(200201), Skill-id(200202), Skill-id(200203), ]
@@ -15460,7 +15586,7 @@ pub fun skill-group/skills(sg: skill-group-id): list<skill-id>
20200 -> [Skill-id(202002), ] 20200 -> [Skill-id(202002), ]
20201 -> [Skill-id(202011), Skill-id(202012), ] 20201 -> [Skill-id(202011), Skill-id(202012), ]
20202 -> [Skill-id(202021), Skill-id(202022), ] 20202 -> [Skill-id(202021), Skill-id(202022), ]
20203 -> [Skill-id(202032), ] 20203 -> [Skill-id(202031), Skill-id(202032), ]
21001 -> [Skill-id(210011), Skill-id(210012), ] 21001 -> [Skill-id(210011), Skill-id(210012), ]
21002 -> [Skill-id(210021), Skill-id(210022), ] 21002 -> [Skill-id(210021), Skill-id(210022), ]
21003 -> [Skill-id(210031), Skill-id(210032), ] 21003 -> [Skill-id(210031), Skill-id(210032), ]

View File

@@ -1,6 +1,7 @@
module horse/legacy module horse/legacy
import horse/character import horse/character
import horse/game-id
import horse/race import horse/race
import horse/spark import horse/spark
@@ -9,9 +10,9 @@ pub struct legacy
parents: (veteran, veteran) parents: (veteran, veteran)
pub struct veteran pub struct veteran
character: character character: character-id
stat: spark<stat> stat: spark<stat>
aptitude: spark<aptitude> aptitude: spark<aptitude>
unique: maybe<spark<unique>> unique: maybe<spark<unique>>
generic: list<spark<generic>> generic: list<spark<generic>>
results: list<race-result> saddles: list<saddle-id>

View File

@@ -3,9 +3,6 @@ package horse
type RaceID int32 type RaceID int32
// Race is the internal data about a race. // Race is the internal data about a race.
//
// Races may be offered multiple times in a career in different years.
// Each separate offering is a different race instance of the same race.
type Race struct { type Race struct {
ID RaceID ID RaceID
Name string Name string
@@ -15,3 +12,26 @@ type Race struct {
// For such races, this field holds the normal race ID. // For such races, this field holds the normal race ID.
Primary RaceID Primary RaceID
} }
type SaddleID int32
// Saddle is the internal data about a race win saddle.
type Saddle struct {
ID SaddleID
Name string
Races []RaceID
Type SaddleType
// Saddles that involve alternate races are themselves alternate.
// For such saddles, this field holds the normal saddle ID.
Primary SaddleID
}
type SaddleType int8
const (
// Saddle for multiple race wins, e.g. Classic Triple Crown, Dual Grand Prix, &c.
SaddleTypeHonor SaddleType = iota
SaddleTypeG3
SaddleTypeG2
SaddleTypeG1
)

View File

@@ -35,28 +35,85 @@ pub type grade
G1 G1
EX EX
// Graded race that a veteran ran.
pub struct race-result
race-id: race-id
place: int
turn: turn
// Automatically generated. // Automatically generated.
// Equality comparison of the `race-result` type. // Comparison of the `grade` type.
pub fun race-result/(==)(this : race-result, other : race-result) : e bool pub fun grade/cmp(this : grade, other : grade) : e order
match (this, other) match (this, other)
(Race-result(race, place, turn), Race-result(race', place', turn')) -> race == race' && place == place' && turn == turn' (Pre-OP, Pre-OP) -> Eq
(Pre-OP, _) -> Lt
(_, Pre-OP) -> Gt
(OP, OP) -> Eq
(OP, _) -> Lt
(_, OP) -> Gt
(G3, G3) -> Eq
(G3, _) -> Lt
(_, G3) -> Gt
(G2, G2) -> Eq
(G2, _) -> Lt
(_, G2) -> Gt
(G1, G1) -> Eq
(G1, _) -> Lt
(_, G1) -> Gt
(EX, EX) -> Eq
// Automatically generated. // Automatically generated.
// Shows a string representation of the `race-result` type. // Shows a string representation of the `grade` type.
pub fun race-result/show(this : race-result, ?race/show: (race-id) -> string) : e string pub fun grade/show(this : grade) : e string
match this match this
Race-result(race-id, place, turn) -> turn.show ++ " " ++ race-id.show ++ ": " ++ place.show Pre-OP -> "Pre-OP"
OP -> "OP"
G3 -> "G3"
G2 -> "G2"
G1 -> "G1"
EX -> "EX"
// Determine whether two race results are for the same race. pub struct saddle-detail
// This differs from (==) which also requires the race to be on the same turn. saddle-id: saddle-id
pub fun race-result/same-race(a: race-result, b: race-result): bool name: string
a.race-id == b.race-id races: list<race-id>
saddle-type: saddle-type
// For careers with unusual races, granted saddles also differ.
// This field holds the normal saddle's ID for such cases.
primary: saddle-id
pub fun saddle/detail(
id: saddle-id,
?saddle/show: (saddle-id) -> string,
?saddle/races: (saddle-id) -> list<race-id>,
?saddle/saddle-type: (saddle-id) -> saddle-type,
?saddle/primary: (saddle-id) -> saddle-id
): saddle-detail
Saddle-detail(id, id.show, id.races, id.saddle-type, id.primary)
pub fun saddle-detail/show(s: saddle-detail): string
val Saddle-detail(Saddle-id(id), name, _, _, Saddle-id(primary)) = s
if id == primary then name else name ++ " (Alternate " ++ id.show ++ ")"
// Types of saddles.
pub type saddle-type
Honor // multiple race wins: classic triple crown, dual grand prix, &c.
G3-Win
G2-Win
G1-Win
// Automatically generated.
// Shows a string representation of the `saddle-type` type.
pub fun saddle-type/show(this : saddle-type) : e string
match this
Honor -> "Honor"
G3-Win -> "G3"
G2-Win -> "G2"
G1-Win -> "G1"
// Automatically generated.
// Equality comparison of the `saddle-type` type.
pub fun saddle-type/(==)(this : saddle-type, other : saddle-type) : e bool
match (this, other)
(Honor, Honor) -> True
(G3-Win, G3-Win) -> True
(G2-Win, G2-Win) -> True
(G1-Win, G1-Win) -> True
(_, _) -> False
// Turn that a race occurred. // Turn that a race occurred.
pub struct turn pub struct turn

View File

@@ -93,7 +93,25 @@ func (a Ability) String() string {
r = append(r, " track widths"...) r = append(r, " track widths"...)
} }
} }
if a.Target != TargetSelf { switch a.Target {
case TargetSelf:
// do nothing
case TargetStyle, TargetRushingStyle:
// TargetValue is the style to target, not the number of targets.
r = append(r, " to "...)
r = append(r, a.Target.String()...)
switch a.TargetValue {
case 1:
r = append(r, " Front Runner"...)
case 2:
r = append(r, " Pace Chaser"...)
case 3:
r = append(r, " Late Surger"...)
case 4:
r = append(r, " End Closer"...)
}
default:
// For other targeting types, TargetValue is either irrelevant or limit.
r = append(r, " to "...) r = append(r, " to "...)
if a.TargetValue > 1 && a.TargetValue < 18 { if a.TargetValue > 1 && a.TargetValue < 18 {
r = strconv.AppendInt(r, int64(a.TargetValue), 10) r = strconv.AppendInt(r, int64(a.TargetValue), 10)

View File

@@ -1,6 +1,8 @@
module horse/trainee module horse/trainee
import horse/game-id
import horse/movement import horse/movement
import horse/race
// Details of a trainee. // Details of a trainee.
pub struct trainee-detail pub struct trainee-detail

View File

@@ -11,7 +11,7 @@ import (
"unicode" "unicode"
) )
//go:embed character.kk.template skill.kk.template character.go.template skill.go.template race.kk.template race.go.template //go:embed *.template
var templates embed.FS var templates embed.FS
// LoadTemplates sets up templates to render game data to source code. // LoadTemplates sets up templates to render game data to source code.
@@ -108,6 +108,21 @@ func ExecRace(t *template.Template, region string, kk, g io.Writer, races []Race
return err return err
} }
func ExecSaddle(t *template.Template, region string, kk, g io.Writer, saddles []Saddle) error {
data := struct {
Region string
Saddles []Saddle
}{region, saddles}
var err error
if kk != nil {
err = errors.Join(err, t.ExecuteTemplate(kk, "koka-saddle", &data))
}
if g != nil {
err = errors.Join(err, t.ExecuteTemplate(g, "go-saddle", &data))
}
return err
}
const wordSeps = " ,!?/-+();#○☆♡'=♪∀゚∴" const wordSeps = " ,!?/-+();#○☆♡'=♪∀゚∴"
var ( var (

View File

@@ -26,6 +26,9 @@ var skillSQL string
//go:embed race.sql //go:embed race.sql
var raceSQL string var raceSQL string
//go:embed saddle.sql
var saddleSQL string
type ( type (
Character struct{} Character struct{}
SkillGroup struct{} SkillGroup struct{}
@@ -325,6 +328,7 @@ type Race struct {
Grade int Grade int
ThumbnailID int ThumbnailID int
Primary int Primary int
Alternate int
} }
func Races(ctx context.Context, db *sqlitex.Pool) ([]Race, error) { func Races(ctx context.Context, db *sqlitex.Pool) ([]Race, error) {
@@ -354,8 +358,52 @@ func Races(ctx context.Context, db *sqlitex.Pool) ([]Race, error) {
Grade: stmt.ColumnInt(2), Grade: stmt.ColumnInt(2),
ThumbnailID: stmt.ColumnInt(3), ThumbnailID: stmt.ColumnInt(3),
Primary: stmt.ColumnInt(4), Primary: stmt.ColumnInt(4),
Alternate: stmt.ColumnInt(5),
} }
r = append(r, race) r = append(r, race)
} }
return r, nil return r, nil
} }
type Saddle struct {
ID int
Name string
Races [3]int
Type int
Primary int
Alternate int
}
func Saddles(ctx context.Context, db *sqlitex.Pool) ([]Saddle, error) {
conn, err := db.Take(ctx)
defer db.Put(conn)
if err != nil {
return nil, fmt.Errorf("couldn't get connection for saddles: %w", err)
}
stmt, _, err := conn.PrepareTransient(saddleSQL)
if err != nil {
return nil, fmt.Errorf("couldn't prepare statement for saddles: %w", err)
}
defer stmt.Finalize()
var r []Saddle
for {
ok, err := stmt.Step()
if err != nil {
return nil, fmt.Errorf("error stepping saddles: %w", err)
}
if !ok {
break
}
s := Saddle{
ID: stmt.ColumnInt(0),
Name: stmt.ColumnText(1),
Races: [3]int{stmt.ColumnInt(2), stmt.ColumnInt(3), stmt.ColumnInt(4)},
Type: stmt.ColumnInt(5),
Primary: stmt.ColumnInt(6),
Alternate: stmt.ColumnInt(7),
}
r = append(r, s)
}
return r, nil
}

View File

@@ -45,12 +45,13 @@ func main() {
eg, ctx := errgroup.WithContext(pctx) eg, ctx := errgroup.WithContext(pctx)
var ( var (
charas []NamedID[Character] charas []NamedID[Character]
pairs []AffinityRelation pairs []AffinityRelation
trios []AffinityRelation trios []AffinityRelation
sg []NamedID[SkillGroup] sg []NamedID[SkillGroup]
skills []Skill skills []Skill
races []Race races []Race
saddles []Saddle
) )
eg.Go(func() error { eg.Go(func() error {
slog.Info("get characters") slog.Info("get characters")
@@ -88,6 +89,12 @@ func main() {
races = r races = r
return err return err
}) })
eg.Go(func() error {
slog.Info("get saddles")
s, err := Saddles(ctx, db)
saddles = s
return err
})
if err := eg.Wait(); err != nil { if err := eg.Wait(); err != nil {
slog.Error("load", slog.Any("err", err)) slog.Error("load", slog.Any("err", err))
os.Exit(1) os.Exit(1)
@@ -135,6 +142,18 @@ func main() {
slog.Info("write races") slog.Info("write races")
return ExecRace(t, region, kf, gf, races) return ExecRace(t, region, kf, gf, races)
}) })
eg.Go(func() error {
kf, err := os.Create(filepath.Join(out, region, "saddle.kk"))
if err != nil {
return err
}
gf, err := os.Create(filepath.Join(out, region, "saddle.go"))
if err != nil {
return err
}
slog.Info("write saddles")
return ExecSaddle(t, region, kf, gf, saddles)
})
if err := eg.Wait(); err != nil { if err := eg.Wait(); err != nil {
slog.Error("generate", slog.Any("err", err)) slog.Error("generate", slog.Any("err", err))
os.Exit(1) os.Exit(1)

View File

@@ -7,15 +7,15 @@ import . "git.sunturtle.xyz/zephyr/horse/horse"
const ( const (
{{- range $r := $.Races }} {{- range $r := $.Races }}
Race{{ goenum $r.Name }}{{ if ne $r.Primary $r.ID }}Alternate{{ end }} RaceID = {{ $r.ID }} // {{ $r.Name }} Race{{ goenum $r.Name }}{{ if $r.Alternate }}Alt{{ $r.ID }}{{ end }} RaceID = {{ $r.ID }} // {{ $r.Name }}
{{- end }} {{- end }}
) )
var AllRaces = map[RaceID]Race{ var AllRaces = map[RaceID]Race{
{{- range $r := $.Races }} {{- range $r := $.Races }}
Race{{ goenum $r.Name }}{{ if ne $r.Primary $r.ID }}Alternate{{ end }}: { Race{{ goenum $r.Name }}{{ if $r.Alternate }}Alt{{ $r.ID }}{{ end }}: {
ID: {{ $r.ID }}, ID: {{ $r.ID }},
Name: {{ printf "%q" $r.Name }}{{ if ne $r.Primary $r.ID }} + " (Alternate)"{{ end }}, Name: {{ printf "%q" $r.Name }}{{ if $r.Alternate }} + " (Alternate {{ $r.ID }})"{{ end }},
Thumbnail: {{ $r.ThumbnailID }}, Thumbnail: {{ $r.ThumbnailID }},
{{- if ne $r.Primary $r.ID }} {{- if ne $r.Primary $r.ID }}
Primary: {{ $r.Primary }}, Primary: {{ $r.Primary }},
@@ -26,7 +26,7 @@ var AllRaces = map[RaceID]Race{
var RaceNameToID = map[string]RaceID{ var RaceNameToID = map[string]RaceID{
{{- range $r := $.Races }} {{- range $r := $.Races }}
{{ printf "%q" $r.Name }}{{ if ne $r.Primary $r.ID }} + " (Alternate)"{{ end }}: {{ $r.ID }}, {{ printf "%q" $r.Name }}{{ if $r.Alternate }} + " (Alternate {{ $r.ID }})"{{ end }}: {{ $r.ID }},
{{- end }} {{- end }}
} }
{{ end }} {{ end }}

View File

@@ -10,41 +10,41 @@ pub import horse/race
// Enumeration of all races for type-safe programming. // Enumeration of all races for type-safe programming.
pub type race pub type race
{{- range $r := $.Races }} {{- range $r := $.Races }}
{{ kkenum $r.Name }}{{ if ne $r.Primary $r.ID }}-Alternate{{ end }} {{ kkenum $r.Name }}{{ if $r.Alternate }}-Alt{{ $r.ID }}{{ end }}
{{- end }} {{- end }}
// Get the race ID for a race. // Get the race ID for a race.
pub fun race-id(r: race): race-id pub fun race-id(r: race): race-id
match r match r
{{- range $r := $.Races }} {{- range $r := $.Races }}
{{ kkenum $r.Name }}{{ if ne $r.Primary $r.ID }}-Alternate{{ end }} -> Race-id({{ $r.ID }}) {{ kkenum $r.Name }}{{ if $r.Alternate }}-Alt{{ $r.ID }}{{ end }} -> Race-id({{ $r.ID }})
{{- end }} {{- end }}
// List of all races in ID order for easy iterating. // List of all races in ID order for easy iterating.
pub val all = [ pub val all = [
{{- range $r := $.Races }} {{- range $r := $.Races }}
{{ kkenum $r.Name }}{{ if ne $r.Primary $r.ID }}-Alternate{{ end }}, {{ kkenum $r.Name }}{{ if $r.Alternate }}-Alt{{ $r.ID }}{{ end }},
{{- end }} {{- end }}
] ]
val name2id: rbmap<string, race-id> = rb-map/empty() val name2id: rbmap<string, race-id> = rb-map/empty()
{{- range $r := $.Races }} {{- range $r := $.Races }}
.set({{ printf "%q" $r.Name }}{{ if ne $r.Primary $r.ID }} ++ " (Alternate)"{{ end }}, Race-id({{ $r.ID }})) .set({{ printf "%q" $r.Name }}{{ if $r.Alternate }} ++ " (Alternate {{ $r.ID }})"{{ end }}, Race-id({{ $r.ID }}))
{{- end }} {{- end }}
// Get the race ID that has the given exact name. // Get the race ID that has the given exact name.
// Alternate versions of races have " (Alternate)" in their names. // Alternate versions of races have an indication of their ID in their names.
// If no race matches the name, the result is an invalid ID. // If no race matches the name, the result is an invalid ID.
pub fun from-name(name: string): race-id pub fun from-name(name: string): race-id
name2id.lookup(name).default(Race-id(0)) name2id.lookup(name).default(Race-id(0))
// Get the name for a race. // Get the name for a race.
// Alternate versions of races have " (Alternate)" in their names. // Alternate versions of races have an indication of their ID in their names.
// If no race matches the ID, the result is the numeric ID. // If no race matches the ID, the result is the numeric ID.
pub fun show(r: race-id): string pub fun show(r: race-id): string
match r.game-id match r.game-id
{{- range $r := $.Races }} {{- range $r := $.Races }}
{{ $r.ID }} -> {{ printf "%q" $r.Name }}{{ if ne $r.Primary $r.ID }} ++ " (Alternate)"{{ end }} {{ $r.ID }} -> {{ printf "%q" $r.Name }}{{ if $r.Alternate }} ++ " (Alternate {{ $r.ID }})"{{ end }}
{{- end }} {{- end }}
x -> "race " ++ x.show x -> "race " ++ x.show
@@ -72,7 +72,7 @@ pub fun thumbnail(r: race-id): race-thumbnail-id
pub fun primary(r: race-id): race-id pub fun primary(r: race-id): race-id
match r.game-id match r.game-id
{{- range $r := $.Races }} {{- range $r := $.Races }}
{{- if ne $r.ID $r.Primary }} {{- if $r.Alternate }}
{{ $r.ID }} -> Race-id({{ $r.Primary }}) {{ $r.ID }} -> Race-id({{ $r.Primary }})
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@@ -6,7 +6,8 @@ SELECT
race_names.name, race_names.name,
race.grade, race.grade,
race.thumbnail_id, race.thumbnail_id,
MIN(race.id) OVER (PARTITION BY race_names.name) AS "primary" MIN(race.id) OVER (PARTITION BY race_names.name) AS "primary",
ROW_NUMBER() OVER (PARTITION BY race_names.name ORDER BY race.id) - 1 AS "alternate"
FROM race FROM race
JOIN race_names ON race.id = race_names.id JOIN race_names ON race.id = race_names.id
WHERE race."group" = 1 WHERE race."group" = 1

View File

@@ -0,0 +1,27 @@
{{- define "go-saddle" -}}
package {{ $.Region }}
// Automatically generated with horsegen; DO NOT EDIT
import . "git.sunturtle.xyz/zephyr/horse/horse"
const (
{{- range $s := $.Saddles }}
Saddle{{ goenum $s.Name }}{{ if $s.Alternate }}Alt{{ $s.Alternate }}{{ end }} SaddleID = {{ $s.ID }} // {{ $s.Name }}
{{- end }}
)
var AllSaddles = map[SaddleID]Saddle{
{{- range $s := $.Saddles }}
Saddle{{ goenum $s.Name }}{{ if $s.Alternate }}Alt{{ $s.Alternate }}{{ end }}: {
ID: {{ $s.ID }},
Name: {{ printf "%q" $s.Name }}{{ if $s.Alternate }} + " (Alternate {{ $s.Alternate }})"{{ end }},
Races: []RaceID{ {{- range $id := $s.Races }}{{ if $id }}{{ $id }}, {{ end }}{{ end -}} },
Type: SaddleType{{ if eq $s.Type 0 }}Honor{{ else if eq $s.Type 1 }}G3{{ else if eq $s.Type 2 }}G2{{ else if eq $s.Type 3 }}G1{{ else }}??? $s.Type={{ $s.Type }}{{ end }},
{{- if $s.Alternate }}
Primary: {{ $s.Primary }},
{{- end }}
},
{{- end }}
}
{{ end }}

View File

@@ -0,0 +1,69 @@
{{- define "koka-saddle" -}}
module horse/{{ $.Region }}/saddle
// Automatically generated with horsegen; DO NOT EDIT
import horse/game-id
pub import horse/race
pub import horse/{{ $.Region }}/race
// Enumeration of all saddles for type-safe programming.
pub type saddle
{{- range $s := $.Saddles }}
{{ kkenum $s.Name }}{{ if $s.Alternate }}-Alt{{ $s.ID }}{{ end }}
{{- end }}
// Get the saddle ID for a saddle.
pub fun saddle-id(s: saddle): saddle-id
match s
{{- range $s := $.Saddles }}
{{ kkenum $s.Name }}{{ if $s.Alternate }}-Alt{{ $s.ID }}{{ end }} -> Saddle-id({{ $s.ID }})
{{- end }}
// List of all saddles in ID order for easy iterating.
pub val all = [
{{- range $s := $.Saddles }}
{{ kkenum $s.Name }}{{ if $s.Alternate }}-Alt{{ $s.ID }}{{ end }},
{{- end }}
]
// Get the name for a saddle.
// Alternate versions of saddles have an indication of their ID in their names.
// If no saddle matches the ID, the result contains the numeric ID.
pub fun show(s: saddle-id): string
match s.game-id
{{- range $s := $.Saddles }}
{{ $s.ID }} -> {{ printf "%q" $s.Name }}{{ if $s.Alternate }} ++ " (Alternate {{ $s.ID }})"{{ end }}
{{- end }}
x -> "saddle " ++ x.show
// Get the list of races that entitle a horse to a saddle.
// If no saddle matches the ID, the result is the empty list.
pub fun races(s: saddle-id): list<race-id>
match s.game-id
{{- range $s := $.Saddles }}
{{ $s.ID }} -> [{{ range $id := $s.Races }}{{ if $id }}Race-id({{ $id }}), {{ end }}{{ end }}]
{{- end }}
_ -> []
// Get a saddle's type.
// If no saddle matches the ID, the result is Honor.
pub fun saddle-type(s: saddle-id): saddle-type
match s.game-id
{{- range $s := $.Saddles }}
{{ $s.ID }} -> {{ if eq $s.Type 0 }}Honor{{ else if eq $s.Type 1 }}G3-Win{{ else if eq $s.Type 2 }}G2-Win{{ else if eq $s.Type 3 }}G1-Win{{ else }}??? $s.Type={{ $s.Type }}{{ end }}
{{- end }}
_ -> Honor
// Get the primary ID for a saddle.
// For saddles which are the primary version, or if no saddle matches the given ID,
// the result is the input.
pub fun primary(s: saddle-id): saddle-id
match s.game-id
{{- range $s := $.Saddles }}
{{- if $s.Alternate }}
{{ $s.ID }} -> Saddle-id({{ $s.Primary }})
{{- end }}
{{- end }}
_ -> s
{{ end }}

20
horsegen/saddle.sql Normal file
View File

@@ -0,0 +1,20 @@
WITH saddle_names AS (
SELECT "index" AS id, "text" AS name
FROM text_data
WHERE category = 111
)
SELECT
s.id,
n.name,
ri1.id AS race1,
IFNULL(ri2.id, 0) AS race2,
IFNULL(ri3.id, 0) AS race3,
s.win_saddle_type,
MIN(s.id) OVER (PARTITION BY n.name) AS "primary",
ROW_NUMBER() OVER (PARTITION BY n.name ORDER BY s.id) - 1 AS "alternate"
FROM single_mode_wins_saddle s
JOIN race_instance ri1 ON s.race_instance_id_1 = ri1.id
LEFT JOIN race_instance ri2 ON s.race_instance_id_2 = ri2.id
LEFT JOIN race_instance ri3 ON s.race_instance_id_3 = ri3.id
LEFT JOIN saddle_names n ON s.id = n.id
ORDER BY s.id