diff --git a/horse/skill.kk b/horse/skill.kk index bf2c69a..db96eb8 100644 --- a/horse/skill.kk +++ b/horse/skill.kk @@ -1974,6 +1974,258 @@ pub fip fun skill/order2(a: skill, b: skill): order2 pub fun skill/(==)(a: skill, b: skill): bool a.skill-id == b.skill-id +// Get the skills in a skill group. +pub fun skill-group/skills(g: skill-group): list + match g + Warning-Shot -> [Warning-Shot, ] + Xceleration -> [Xceleration, ] + Red-Ace -> [Red-Ace, ] + Focused-Mind -> [Focused-Mind, ] + Corazon-Ardiente -> [Corazon-Ardiente, ] + Empresss-Pride -> [Empresss-Pride, ] + First-Place-Kiss -> [First-Place-Kiss, ] + Feel-the-Burn -> [Feel-the-Burn, ] + Introduction-to-Physiology -> [Introduction-to-Physiology, ] + V-Is-for-Victory -> [V-Is-for-Victory, ] + Class-Rep-Speed-Bakushin -> [Class-Rep-Speed-Bakushin, ] + Clear-Heart -> [Clear-Heart, ] + Super-Duper-Stoked -> [Super-Duper-Stoked, ] + Luck-Be-with-Me -> [Luck-Be-with-Me, ] + I-Can-Win-Sometimes-Right -> [I-Can-Win-Sometimes-Right, ] + Call-Me-King -> [Call-Me-King, ] + Shooting-Star -> [Shooting-Star, Shooting-Star-Inherit, ] + The-View-from-the-Lead-Is-Mine -> [The-View-from-the-Lead-Is-Mine, The-View-from-the-Lead-Is-Mine-Inherit, ] + Sky-High-Teio-Step -> [Sky-High-Teio-Step, Sky-High-Teio-Step-Inherit, ] + Red-Shift-LP1211-M -> [Red-Shift-LP1211-M, Red-Shift-LP1211-M-Inherit, ] + Lights-of-Vaudeville -> [Lights-of-Vaudeville, Lights-of-Vaudeville-Inherit, ] + Triumphant-Pulse -> [Triumphant-Pulse, Triumphant-Pulse-Inherit, ] + Anchors-Aweigh -> [Anchors-Aweigh, Anchors-Aweigh-Inherit, ] + Cut-and-Drive -> [Cut-and-Drive, Cut-and-Drive-Inherit, ] + Resplendent-Red-Ace -> [Resplendent-Red-Ace, Resplendent-Red-Ace-Inherit, ] + Shooting-for-Victory -> [Shooting-for-Victory, Shooting-for-Victory-Inherit, ] + Where-Theres-a-Will-Theres-a-Way -> [Where-Theres-a-Will-Theres-a-Way, Where-Theres-a-Will-Theres-a-Way-Inherit, ] + You-and-Me-One-on-One -> [You-and-Me-One-on-One, You-and-Me-One-on-One-Inherit, ] + The-Duty-of-Dignity-Calls -> [The-Duty-of-Dignity-Calls, The-Duty-of-Dignity-Calls-Inherit, ] + Victoria-por-plancha -> [Victoria-por-plancha, Victoria-por-plancha-Inherit, ] + This-Dance-Is-for-Vittoria -> [This-Dance-Is-for-Vittoria, This-Dance-Is-for-Vittoria-Inherit, ] + Shadow-Break -> [Shadow-Break, Shadow-Break-Inherit, ] + Behold-Thine-Emperors-Divine-Might -> [Behold-Thine-Emperors-Divine-Might, Behold-Thine-Emperors-Divine-Might-Inherit, ] + Blazing-Pride -> [Blazing-Pride, Blazing-Pride-Inherit, ] + OMG-The-Final-Sprint -> [OMG-The-Final-Sprint, OMG-The-Final-Sprint-Inherit, ] + Angling-and-Scheming -> [Angling-and-Scheming, Angling-and-Scheming-Inherit, ] + Win-QED -> [Win-QED, Win-QED-Inherit, ] + Flashy-Landing -> [Flashy-Landing, Flashy-Landing-Inherit, ] + Chasing-After-You -> [Chasing-After-You, Chasing-After-You-Inherit, ] + G00-First-FInfinity -> [G00-First-FInfinity, G00-First-FInfinity-Inherit, ] + Lets-Pump-Some-Iron -> [Lets-Pump-Some-Iron, Lets-Pump-Some-Iron-Inherit, ] + YUMMY-SPEED -> [YUMMY-SPEED, YUMMY-SPEED-Inherit, ] + Blue-Rose-Closer -> [Blue-Rose-Closer, Blue-Rose-Closer-Inherit, ] + U-ma2 -> [U-ma2, U-ma2-Inherit, ] + Our-Ticket-to-Win -> [Our-Ticket-to-Win, Our-Ticket-to-Win-Inherit, ] + Schwarzes-Schwert -> [Schwarzes-Schwert, Schwarzes-Schwert-Inherit, ] + LookatCurren -> [LookatCurren, LookatCurren-Inherit, ] + A-Princess-Must-Seize-Victory -> [A-Princess-Must-Seize-Victory, A-Princess-Must-Seize-Victory-Inherit, ] + KEEP-IT-REAL -> [KEEP-IT-REAL, KEEP-IT-REAL-Inherit, ] + Genius-x-Bakushin-Victory -> [Genius-x-Bakushin-Victory, Genius-x-Bakushin-Victory-Inherit, ] + Pure-Heart -> [Pure-Heart, Pure-Heart-Inherit, ] + SPARKLY-STARDOM -> [SPARKLY-STARDOM, SPARKLY-STARDOM-Inherit, ] + Pop-and-Polish -> [Pop-and-Polish, Pop-and-Polish-Inherit, ] + Nemesis -> [Nemesis, Nemesis-Inherit, ] + Super-Duper-Climax -> [Super-Duper-Climax, Super-Duper-Climax-Inherit, ] + I-See-Victory-in-My-Future -> [I-See-Victory-in-My-Future, I-See-Victory-in-My-Future-Inherit, ] + I-Never-Goof-Up -> [I-Never-Goof-Up, I-Never-Goof-Up-Inherit, ] + Moving-Past-and-Beyond -> [Moving-Past-and-Beyond, Moving-Past-and-Beyond-Inherit, ] + Just-a-Little-Farther -> [Just-a-Little-Farther, Just-a-Little-Farther-Inherit, ] + Prideful-King -> [Prideful-King, Prideful-King-Inherit, ] + Dazzl-n-Diver -> [Dazzl-n-Diver, Dazzl-n-Diver-Inherit, ] + Certain-Victory -> [Certain-Victory, Certain-Victory-Inherit, ] + A-Kiss-for-Courage -> [A-Kiss-for-Courage, A-Kiss-for-Courage-Inherit, ] + Festive-Miracle -> [Festive-Miracle, Festive-Miracle-Inherit, ] + Superior-Heal -> [Superior-Heal, Superior-Heal-Inherit, ] + Legacy-of-the-Strong -> [Legacy-of-the-Strong, Legacy-of-the-Strong-Inherit, ] + Condors-Fury -> [Condors-Fury, Condors-Fury-Inherit, ] + Arrows-Whistle-Shadows-Disperse -> [Arrows-Whistle-Shadows-Disperse, Arrows-Whistle-Shadows-Disperse-Inherit, ] + Eternal-Moments -> [Eternal-Moments, Eternal-Moments-Inherit, ] + Presents-from-X -> [Presents-from-X, Presents-from-X-Inherit, ] + Flowery-Maneuver -> [Flowery-Maneuver, Flowery-Maneuver-Inherit, ] + Every-Rose-Has-Its-Fangs -> [Every-Rose-Has-Its-Fangs, Every-Rose-Has-Its-Fangs-Inherit, ] + Dancing-in-the-Leaves -> [Dancing-in-the-Leaves, Dancing-in-the-Leaves-Inherit, ] + Give-Mummy-a-Hug -> [Give-Mummy-a-Hug, Give-Mummy-a-Hug-Inherit, ] + Bountiful-Harvest -> [Bountiful-Harvest, Bountiful-Harvest-Inherit, ] + Right-Handed -> [Right-Handed-Lv2, Right-Handed, Right-Handed-x, ] + Left-Handed -> [Left-Handed-Lv2, Left-Handed, Left-Handed-x, ] + Tokyo-Racecourse -> [Tokyo-Racecourse-Lv2, Tokyo-Racecourse, Tokyo-Racecourse-x, ] + Nakayama-Racecourse -> [Nakayama-Racecourse-Lv2, Nakayama-Racecourse, Nakayama-Racecourse-x, ] + Hanshin-Racecourse -> [Hanshin-Racecourse-Lv2, Hanshin-Racecourse, Hanshin-Racecourse-x, ] + Kyoto-Racecourse -> [Kyoto-Racecourse-Lv2, Kyoto-Racecourse, Kyoto-Racecourse-x, Yodo-Invicta, ] + Chukyo-Racecourse -> [Chukyo-Racecourse-Lv2, Chukyo-Racecourse, Chukyo-Racecourse-x, ] + Sapporo-Racecourse -> [Sapporo-Racecourse-Lv2, Sapporo-Racecourse, Sapporo-Racecourse-x, ] + Hakodate-Racecourse -> [Hakodate-Racecourse-Lv2, Hakodate-Racecourse, Hakodate-Racecourse-x, ] + Fukushima-Racecourse -> [Fukushima-Racecourse-Lv2, Fukushima-Racecourse, Fukushima-Racecourse-x, ] + Niigata-Racecourse -> [Niigata-Racecourse-Lv2, Niigata-Racecourse, Niigata-Racecourse-x, ] + Kokura-Racecourse -> [Kokura-Racecourse-Lv2, Kokura-Racecourse, Kokura-Racecourse-x, ] + Standard-Distance -> [Standard-Distance-Lv2, Standard-Distance, Standard-Distance-x, ] + Non-Standard-Distance -> [Non-Standard-Distance-Lv2, Non-Standard-Distance, Non-Standard-Distance-x, ] + Firm-Conditions -> [Firm-Conditions-Lv2, Firm-Conditions, Firm-Conditions-x, ] + Wet-Conditions -> [Wet-Conditions-Lv2, Wet-Conditions, Wet-Conditions-x, ] + Spring-Runner -> [Spring-Runner-Lv2, Spring-Runner, Spring-Runner-x, ] + Summer-Runner -> [Summer-Runner-Lv2, Summer-Runner, Summer-Runner-x, ] + Fall-Runner -> [Fall-Runner-Lv2, Fall-Runner, Fall-Runner-x, Fall-Frenzy, ] + Winter-Runner -> [Winter-Runner-Lv2, Winter-Runner, Winter-Runner-x, ] + Sunny-Days -> [Sunny-Days-Lv2, Sunny-Days, ] + Cloudy-Days -> [Cloudy-Days-Lv2, Cloudy-Days, ] + Rainy-Days -> [Rainy-Days-Lv2, Rainy-Days, Rainy-Days-x, ] + Snowy-Days -> [Snowy-Days-Lv2, Snowy-Days, ] + Inner-Post-Proficiency -> [Inner-Post-Proficiency-Lv2, Inner-Post-Proficiency, Inner-Post-Averseness, ] + Outer-Post-Proficiency -> [Outer-Post-Proficiency-Lv2, Outer-Post-Proficiency, Outer-Post-Averseness, ] + Maverick -> [Maverick-Lv2, Maverick, ] + Competitive-Spirit -> [Competitive-Spirit-Lv2, Competitive-Spirit, Wallflower, ] + Target-in-Sight -> [Target-in-Sight-Lv2, Target-in-Sight, ] + Long-Shot -> [Long-Shot-Lv2, Long-Shot, ] + Corner-Adept -> [Professor-of-Curvature, Corner-Adept, Corner-Adept-x, ] + Corner-Acceleration -> [Corner-Connoisseur, Corner-Acceleration, Corner-Acceleration-x, ] + Corner-Recovery -> [Swinging-Maestro, Corner-Recovery, Corner-Recovery-x, ] + Straightaway-Adept -> [Beeline-Burst, Straightaway-Adept, ] + Straightaway-Acceleration -> [Rushing-Gale, Straightaway-Acceleration, ] + Straightaway-Recovery -> [Breath-of-Fresh-Air, Straightaway-Recovery, ] + Focus -> [Concentration, Focus, Gatekept, ] + Lay-Low -> [Iron-Will, Lay-Low, ] + Prudent-Positioning -> [Center-Stage, Prudent-Positioning, ] + Ramp-Up -> [Its-On, Ramp-Up, ] + Pace-Strategy -> [Indomitable, Pace-Strategy, ] + Calm-in-a-Crowd -> [Unruffled, Calm-in-a-Crowd, ] + Nimble-Navigator -> [No-Stopping-Me, Nimble-Navigator, ] + Go-with-the-Flow -> [Lane-Legerdemain, Go-with-the-Flow, ] + Homestretch-Haste -> [In-Body-and-Mind, Homestretch-Haste, ] + Early-Lead -> [Taking-the-Lead, Early-Lead, ] + Fast-Paced -> [Escape-Artist, Fast-Paced, ] + Final-Push -> [Unrestrained, Final-Push, ] + Stamina-to-Spare -> [Calm-and-Collected, Stamina-to-Spare, ] + Preferred-Position -> [Race-Planner, Preferred-Position, ] + Prepared-to-Pass -> [Speed-Star, Prepared-to-Pass, ] + Position-Pilfer -> [Fast-and-Furious, Position-Pilfer, ] + Slick-Surge -> [On-Your-Left, Slick-Surge, ] + Outer-Swell -> [Rising-Dragon, Outer-Swell, ] + Standing-By -> [Sleeping-Lion, Standing-By, ] + Masterful-Gambit -> [Sturm-und-Drang, Masterful-Gambit, ] + Straightaway-Spurt -> [Encroaching-Shadow, Straightaway-Spurt, ] + Sprinting-Gear -> [Turbo-Sprint, Sprinting-Gear, ] + Wait-and-See -> [Wait-and-See, ] + Gap-Closer -> [Blinding-Flash, Gap-Closer, ] + Productive-Plan -> [Mile-Maven, Productive-Plan, ] + Watchful-Eye -> [Keen-Eye, Watchful-Eye, ] + Updrafters -> [Furious-Feat, Updrafters, ] + Rosy-Outlook -> [Trackblazer, Rosy-Outlook, ] + Up-Tempo -> [Killer-Tunes, Up-Tempo, ] + Steadfast -> [Unyielding, Steadfast, ] + Deep-Breaths -> [Cooldown, Deep-Breaths, ] + Inside-Scoop -> [Innate-Experience, Inside-Scoop, ] + Extra-Tank -> [Adrenaline-Rush, Extra-Tank, ] + Trick-Front -> [Trick-Front, Tantalizing-Trick, ] + Trick-Rear -> [Trick-Rear, ] + Frenzied-Front-Runners -> [Frenzied-Front-Runners, ] + Frenzied-Pace-Chasers -> [Frenzied-Pace-Chasers, ] + Frenzied-Late-Surgers -> [Frenzied-Late-Surgers, ] + Frenzied-End-Closers -> [Frenzied-End-Closers, ] + Subdued-Front-Runners -> [Subdued-Front-Runners, ] + Flustered-Front-Runners -> [Flustered-Front-Runners, ] + Hesitant-Front-Runners -> [Hesitant-Front-Runners, ] + Subdued-Pace-Chasers -> [Subdued-Pace-Chasers, ] + Flustered-Pace-Chasers -> [Flustered-Pace-Chasers, ] + Hesitant-Pace-Chasers -> [Hesitant-Pace-Chasers, ] + Subdued-Late-Surgers -> [Subdued-Late-Surgers, ] + Flustered-Late-Surgers -> [Flustered-Late-Surgers, ] + Hesitant-Late-Surgers -> [Hesitant-Late-Surgers, ] + Subdued-End-Closers -> [Subdued-End-Closers, ] + Flustered-End-Closers -> [Flustered-End-Closers, ] + Hesitant-End-Closers -> [Hesitant-End-Closers, ] + Oi-Racecourse -> [Oi-Racecourse-Lv2, Oi-Racecourse, Oi-Racecourse-x, ] + Sprint-Straightaways -> [Sprint-Straightaways-Lv2, Sprint-Straightaways, ] + Sprint-Corners -> [Sprint-Corners-Lv2, Sprint-Corners, ] + Huge-Lead -> [Staggering-Lead, Huge-Lead, ] + Countermeasure -> [Plan-X, Countermeasure, ] + Meticulous-Measures -> [Perfect-Prep, Meticulous-Measures, ] + Intimidate -> [Adored-by-All, Intimidate, ] + Stop-Right-There -> [You-ve-Got-No-Shot, Stop-Right-There, ] + Mile-Straightaways -> [Mile-Straightaways-Lv2, Mile-Straightaways, ] + Mile-Corners -> [Mile-Corners-Lv2, Mile-Corners, ] + Shifting-Gears -> [Changing-Gears, Shifting-Gears, ] + Acceleration -> [Step-on-the-Gas, Acceleration, ] + Unyielding-Spirit -> [Big-Sisterly, Unyielding-Spirit, ] + Speed-Eater -> [Greed-for-Speed, Speed-Eater, ] + Opening-Gambit -> [Battle-Formation, Opening-Gambit, ] + Medium-Straightaways -> [Medium-Straightaways-Lv2, Medium-Straightaways, ] + Medium-Corners -> [Medium-Corners-Lv2, Medium-Corners, ] + Hawkeye -> [Clairvoyance, Hawkeye, ] + Thunderbolt-Step -> [Lightning-Step, Thunderbolt-Step, ] + Soft-Step -> [Miraculous-Step, Soft-Step, ] + Tether -> [Dominator, Tether, ] + Murmur -> [Mystifying-Murmur, Murmur, ] + Long-Straightaways -> [Long-Straightaways-Lv2, Long-Straightaways, ] + Long-Corners -> [Long-Corners-Lv2, Long-Corners, ] + Keeping-the-Lead -> [Vanguard-Spirit, Keeping-the-Lead, ] + Passing-Pro -> [VIP-Pass, Passing-Pro, ] + Pressure -> [Overwhelming-Pressure, Pressure, ] + Stamina-Eater -> [Stamina-Siphon, Stamina-Eater, ] + Smoke-Screen -> [Illusionist, Smoke-Screen, ] + Front-Runner-Straightaways -> [Front-Runner-Straightaways-Lv2, Front-Runner-Straightaways, ] + Front-Runner-Corners -> [Front-Runner-Corners-Lv2, Front-Runner-Corners, ] + Dodging-Danger -> [Sixth-Sense, Dodging-Danger, ] + Leaders-Pride -> [Leaders-Pride, ] + Moxie -> [Restless, Moxie, ] + Second-Wind -> [Reignition, Second-Wind, ] + Restart -> [Restart, ] + Pace-Chaser-Straightaways -> [Pace-Chaser-Straightaways-Lv2, Pace-Chaser-Straightaways, ] + Pace-Chaser-Corners -> [Pace-Chaser-Corners-Lv2, Pace-Chaser-Corners, ] + Shrewd-Step -> [Technician, Shrewd-Step, ] + Straight-Descent -> [Determined-Descent, Straight-Descent, ] + Hydrate -> [Gourmand, Hydrate, ] + Tactical-Tweak -> [Shatterproof, Tactical-Tweak, ] + Disorient -> [Dazzling-Disorientation, Disorient, ] + Late-Surger-Straightaways -> [Late-Surger-Straightaways-Lv2, Late-Surger-Straightaways, ] + Late-Surger-Corners -> [Late-Surger-Corners-Lv2, Late-Surger-Corners, ] + Fighter -> [Hard-Worker, Fighter, ] + One-Million-CC -> [Fifteen-Million-CC, One-Million-CC, ] + A-Small-Breather -> [Relax, A-Small-Breather, ] + Studious -> [The-Bigger-Picture, Studious, ] + Sharp-Gaze -> [All-Seeing-Eyes, Sharp-Gaze, ] + End-Closer-Straightaways -> [End-Closer-Straightaways-Lv2, End-Closer-Straightaways, ] + End-Closer-Corners -> [End-Closer-Corners-Lv2, End-Closer-Corners, ] + I-Can-See-Right-Through-You -> [The-Coast-Is-Clear, I-Can-See-Right-Through-You, ] + After-School-Stroll -> [Go-Home-Specialist, After-School-Stroll, ] + Levelheaded -> [Serenity, Levelheaded, ] + Strategist -> [Crusader, Strategist, ] + Intense-Gaze -> [Petrifying-Gaze, Intense-Gaze, ] + Front-Runner-Savvy -> [Front-Runner-Savvy-Lv2, Front-Runner-Savvy, ] + Pace-Chaser-Savvy -> [Pace-Chaser-Savvy-Lv2, Pace-Chaser-Savvy, ] + Late-Surger-Savvy -> [Late-Surger-Savvy-Lv2, Late-Surger-Savvy, ] + End-Closer-Savvy -> [End-Closer-Savvy-Lv2, End-Closer-Savvy, ] + Lucky-Seven -> [Super-Lucky-Seven, Lucky-Seven, ] + Triple-Sevens -> [Triple-Sevens, ] + Highlander -> [Highlander, ] + Uma-Stan -> [Uma-Stan, Superstan, ] + Groundwork -> [Groundwork, ] + Tail-Held-High -> [Tail-Held-High, ] + Shake-It-Out -> [Shake-It-Out, ] + Sympathy -> [Sympathy, ] + Lone-Wolf -> [Lone-Wolf, ] + Slipstream -> [Slipstream, ] + Playtimes-Over -> [Playtimes-Over, ] + Top-Pick -> [Trending-in-the-Charts, Top-Pick, ] + Forward-March -> [Lead-the-Charge, Forward-March, ] + Be-Still -> [Lie-in-Wait, Be-Still, ] + All-I-ve-Got -> [Come-What-May, All-I-ve-Got, ] + Head-On -> [Head-On, ] + Early-Start -> [Early-Start, ] + Risky-Business -> [Risky-Business, ] + Ignited-Spirit-SPD -> [Burning-Spirit-SPD, Ignited-Spirit-SPD, ] + Ignited-Spirit-STA -> [Burning-Spirit-STA, Ignited-Spirit-STA, ] + Ignited-Spirit-PWR -> [Burning-Spirit-PWR, Ignited-Spirit-PWR, ] + Ignited-Spirit-GUTS -> [Burning-Spirit-GUTS, Ignited-Spirit-GUTS, ] + Ignited-Spirit-WIT -> [Burning-Spirit-WIT, Ignited-Spirit-WIT, ] + Unquenched-Thirst -> [Unquenched-Thirst, ] + Unchanging -> [Unchanging, ] + // Get complete skill info. pub fun skill/detail(^s: skill): skill-detail match s diff --git a/horsegen/gen.go b/horsegen/gen.go index 4fac85c..7887eb8 100644 --- a/horsegen/gen.go +++ b/horsegen/gen.go @@ -62,10 +62,26 @@ func ExecCharacterKK(t *template.Template, w io.Writer, c []NamedID[Character], } func ExecSkillKK(t *template.Template, w io.Writer, g []NamedID[SkillGroup], s []Skill) error { + m := make(map[int][]Skill, len(g)) + u := make(map[int]int, len(g)) + for _, t := range s { + m[t.GroupID] = append(m[t.GroupID], t) + if t.Rarity >= 4 { + // Add inheritable uniques to u so we can add inherited versions to groups. + u[t.ID] = t.GroupID + } + } + // Now that u is set up, iterate through again and add in inherited skills. + for _, t := range s { + if t.InheritID != 0 { + m[u[t.InheritID]] = append(m[u[t.InheritID]], t) + } + } data := struct { - Groups []NamedID[SkillGroup] - Skills []Skill - }{g, s} + Groups []NamedID[SkillGroup] + Skills []Skill + Related map[int][]Skill + }{g, s, m} return t.ExecuteTemplate(w, "koka-skill", &data) } diff --git a/horsegen/skill.kk.template b/horsegen/skill.kk.template index a60a5bc..c984ca9 100644 --- a/horsegen/skill.kk.template +++ b/horsegen/skill.kk.template @@ -92,6 +92,13 @@ pub fip fun skill/order2(a: skill, b: skill): order2 pub fun skill/(==)(a: skill, b: skill): bool a.skill-id == b.skill-id +// Get the skills in a skill group. +pub fun skill-group/skills(g: skill-group): list + match g + {{- range $g := $.Groups }} + {{ kkenum $g.Name }} -> [ {{- range $s := index $.Related $g.ID }}{{ kkenum $s.Name }}{{ if ne $s.InheritID 0 }}-Inherit{{ end }}, {{ end }}] + {{- end }} + // Get complete skill info. pub fun skill/detail(^s: skill): skill-detail match s