From a86aa0daebfe71bdbf04c1775932568fe32cddfc Mon Sep 17 00:00:00 2001 From: Branden J Brown Date: Fri, 16 Jan 2026 23:30:14 -0500 Subject: [PATCH] horsegen: treat inherited skills as being in the original's group --- horse/global/skill.go | 120 +++++++++++++++++++++--------------------- horsegen/gen.go | 11 ---- horsegen/skill.sql | 7 +-- 3 files changed, 64 insertions(+), 74 deletions(-) diff --git a/horse/global/skill.go b/horse/global/skill.go index 4b62c86..90a75ea 100644 --- a/horse/global/skill.go +++ b/horse/global/skill.go @@ -9659,7 +9659,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900011, Name: "Shooting Star" + " (Inherited)", Description: "Slightly increase velocity and very minimally increase acceleration after passing another runner toward the front late-race.", - Group: 90001, + Group: 10001, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9682,7 +9682,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900021, Name: "The View from the Lead Is Mine!" + " (Inherited)", Description: "Slightly increase velocity when in the lead by a fair margin in the second half of the race.", - Group: 90002, + Group: 10002, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9704,7 +9704,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900031, Name: "Sky-High Teio Step" + " (Inherited)", Description: "Moderately increase velocity when closing the gap to runners ahead on the final straight.", - Group: 90003, + Group: 10003, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9726,7 +9726,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900041, Name: "Red Shift/LP1211-M" + " (Inherited)", Description: "Slightly increase acceleration when positioned toward the front on the final corner or later.", - Group: 90004, + Group: 10004, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9748,7 +9748,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900051, Name: "Lights of Vaudeville" + " (Inherited)", Description: "Moderately increase velocity when just breaking out of the pack toward the front on the final straight.", - Group: 90005, + Group: 10005, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9770,7 +9770,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900061, Name: "Triumphant Pulse" + " (Inherited)", Description: "Moderately increase ability to break out of the pack when positioned toward the front with 200m remaining.", - Group: 90006, + Group: 10006, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9792,7 +9792,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900071, Name: "Anchors Aweigh!" + " (Inherited)", Description: "Very slightly increase velocity steadily with a long spurt starting halfway through the race.", - Group: 90007, + Group: 10007, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9814,7 +9814,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900081, Name: "Cut and Drive!" + " (Inherited)", Description: "Slightly increase velocity when positioned toward the front with 200m or less remaining.", - Group: 90008, + Group: 10008, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9836,7 +9836,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900091, Name: "Resplendent Red Ace" + " (Inherited)", Description: "Very slightly swell with the determination to be number one when positioned toward the front in the second half of the race.", - Group: 90009, + Group: 10009, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9859,7 +9859,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900101, Name: "Shooting for Victory!" + " (Inherited)", Description: "Slightly increase acceleration when well-positioned upon approaching the final straight.", - Group: 90010, + Group: 10010, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9881,7 +9881,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900111, Name: "Where There's a Will, There's a Way" + " (Inherited)", Description: "Slightly increase velocity when passing another runner toward the back on the final straight.", - Group: 90011, + Group: 10011, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9903,7 +9903,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900121, Name: "You and Me! One-on-One!" + " (Inherited)", Description: "Slightly increase velocity on the final straight after passing another runner on the outside toward the back on the final corner or later.", - Group: 90012, + Group: 10012, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9926,7 +9926,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900131, Name: "The Duty of Dignity Calls" + " (Inherited)", Description: "Slightly increase velocity when positioned toward the front on the final corner.", - Group: 90013, + Group: 10013, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9948,7 +9948,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900141, Name: "Victoria por plancha ☆" + " (Inherited)", Description: "Very slightly hang on to the advantage when positioned toward the front with energy to spare on the final straight.", - Group: 90014, + Group: 10014, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9971,7 +9971,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900151, Name: "This Dance Is for Vittoria!" + " (Inherited)", Description: "Slightly increase velocity when positioned toward the front and close to the runner ahead or behind on the final corner or later.", - Group: 90015, + Group: 10015, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -9993,7 +9993,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900161, Name: "Shadow Break" + " (Inherited)", Description: "Slightly increase velocity when passing another runner on the outside on the final corner or later. If the skill user engaged in a challenge mid-race, moderately increase velocity instead.", - Group: 90016, + Group: 10016, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10024,7 +10024,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900171, Name: "Behold Thine Emperor's Divine Might" + " (Inherited)", Description: "Moderately increase velocity on the final straight after passing another runner 3 times late-race.", - Group: 90017, + Group: 10017, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10046,7 +10046,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900181, Name: "Blazing Pride" + " (Inherited)", Description: "Slightly increase velocity when passing another runner from midpack or further back on the final corner.", - Group: 90018, + Group: 10018, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10068,7 +10068,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900191, Name: "OMG! (゚∀゚) The Final Sprint! ☆" + " (Inherited)", Description: "Slightly increase velocity and navigation after passing another runner 2 times late-race.", - Group: 90019, + Group: 10019, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10091,7 +10091,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900201, Name: "Angling and Scheming" + " (Inherited)", Description: "Slightly increase acceleration when in the lead on a corner late-race.", - Group: 90020, + Group: 10020, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10113,7 +10113,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900221, Name: "Fairy Tale" + " (Inherited)", Description: "Slightly increase velocity when engaged in a challenge while well-positioned in the second half of the race.", - Group: 90022, + Group: 10022, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10135,7 +10135,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900231, Name: "∴win Q.E.D." + " (Inherited)", Description: "Slightly increase velocity when passing another runner toward the front on the final corner or later.", - Group: 90023, + Group: 10023, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10157,7 +10157,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900241, Name: "Flashy☆Landing" + " (Inherited)", Description: "Very slightly increase ability to break out of the pack on the straight after engaging in a challenge toward the front on the final corner or later.", - Group: 90024, + Group: 10024, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10180,7 +10180,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900251, Name: "Chasing After You" + " (Inherited)", Description: "Very slightly increase velocity steadily and very minimally intimidate runners ahead when in midpack in the second half of the race.", - Group: 90025, + Group: 10025, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10203,7 +10203,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900261, Name: "G00 1st. F∞;" + " (Inherited)", Description: "Slightly increase velocity when positioned toward the front after making it to the final straight without faltering.", - Group: 90026, + Group: 10026, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10225,7 +10225,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900271, Name: "Let's Pump Some Iron!" + " (Inherited)", Description: "Slightly increase acceleration in an attempt to move up on a corner late-race.", - Group: 90027, + Group: 10027, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10247,7 +10247,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900281, Name: "YUMMY☆SPEED!" + " (Inherited)", Description: "Very slightly kick forward when moderately tired while well-positioned halfway through the race.", - Group: 90028, + Group: 10028, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10270,7 +10270,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900301, Name: "Blue Rose Closer" + " (Inherited)", Description: "Slightly increase velocity on the final straight after passing another runner in the front part of the pack on the final corner or later.", - Group: 90030, + Group: 10030, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10293,7 +10293,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900321, Name: "U=ma2" + " (Inherited)", Description: "Slightly recover endurance and very slightly increase velocity for a moderate duration when sitting off the pace on a corner in the second half of the race.", - Group: 90032, + Group: 10032, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10316,7 +10316,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900351, Name: "Our Ticket to Win!" + " (Inherited)", Description: "Slightly increase velocity when positioned toward the front on the final straight after engaging in a challenge on the final corner or later.", - Group: 90035, + Group: 10035, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10339,7 +10339,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900371, Name: "Schwarzes Schwert" + " (Inherited)", Description: "Slightly increase velocity in a dash for the lead after running calmly and according to plan up until the final straight.", - Group: 90037, + Group: 10037, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10361,7 +10361,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900381, Name: "#LookatCurren" + " (Inherited)", Description: "Very slightly begin to advance when passing another runner while well-positioned around halfway through the race.", - Group: 90038, + Group: 10038, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10384,7 +10384,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900391, Name: "A Princess Must Seize Victory!" + " (Inherited)", Description: "Slightly increase velocity when engaged in a challenge on the final straight.", - Group: 90039, + Group: 10039, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10406,7 +10406,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900401, Name: "KEEP IT REAL." + " (Inherited)", Description: "Very slightly increase acceleration steadily when starting to make a move from midpack in the second half of the race.", - Group: 90040, + Group: 10040, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10428,7 +10428,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900411, Name: "Genius x Bakushin = Victory" + " (Inherited)", Description: "Slightly increase velocity when engaged in a challenge toward the front in the second half of the race.", - Group: 90041, + Group: 10041, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10450,7 +10450,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900451, Name: "Pure Heart" + " (Inherited)", Description: "Moderately recover endurance when well-positioned mid-race.", - Group: 90045, + Group: 10045, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10472,7 +10472,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900461, Name: "SPARKLY☆STARDOM" + " (Inherited)", Description: "Become very slightly empowered to keep the advantage when positioned toward the front and close to the runner behind on a straight mid-race.", - Group: 90046, + Group: 10046, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10495,7 +10495,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900481, Name: "Pop & Polish" + " (Inherited)", Description: "Slightly increase velocity when pressured by or passing another runner while well-positioned on the final straight.", - Group: 90048, + Group: 10048, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10517,7 +10517,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900501, Name: "Nemesis" + " (Inherited)", Description: "Slightly increase velocity when moving up from midpack on the final corner or later.", - Group: 90050, + Group: 10050, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10539,7 +10539,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900521, Name: "Super-Duper Climax" + " (Inherited)", Description: "Slightly recover endurance with a glance at nearby runners when positioned toward the back on the final corner.", - Group: 90052, + Group: 10052, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10561,7 +10561,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900561, Name: "I See Victory in My Future!" + " (Inherited)", Description: "Slightly clear a path forward depending on divination results when the way ahead is jammed late-race.", - Group: 90056, + Group: 10056, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10584,7 +10584,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900581, Name: "I Never Goof Up!" + " (Inherited)", Description: "Very slightly aim for the front when passing another runner from midpack or further back on a corner late-race.", - Group: 90058, + Group: 10058, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10607,7 +10607,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900591, Name: "Moving Past, and Beyond" + " (Inherited)", Description: "Having run the race calmly, slightly increase acceleration when making a move mid-race, or on a crucial corner late-race whilst in midpack.", - Group: 90059, + Group: 10059, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10629,7 +10629,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900601, Name: "Just a Little Farther!" + " (Inherited)", Description: "Slightly increase velocity when positioned 3rd and about to lose late-race.", - Group: 90060, + Group: 10060, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10651,7 +10651,7 @@ var AllSkills = map[SkillID]Skill{ ID: 900611, Name: "Prideful King" + " (Inherited)", Description: "Moderately increase velocity in a true display of skill with 200m remaining after racing calmly.", - Group: 90061, + Group: 10061, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10673,7 +10673,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910011, Name: "Dazzl'n ♪ Diver" + " (Inherited)", Description: "Slightly recover endurance after activating 2 skills mid-race.", - Group: 91001, + Group: 11001, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10695,7 +10695,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910031, Name: "Certain Victory" + " (Inherited)", Description: "Moderately increase velocity on the final straight after being on the heels of another runner toward the front on the final corner or later.", - Group: 91003, + Group: 11003, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10718,7 +10718,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910041, Name: "A Kiss for Courage" + " (Inherited)", Description: "Slightly increase velocity when positioned toward the front in the second half of the race after recovering endurance with a skill.", - Group: 91004, + Group: 11004, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10740,7 +10740,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910061, Name: "Festive Miracle" + " (Inherited)", Description: "Very slightly control breathing and kick forward toward victory in the second half of the race after recovering endurance with skills at least 3 times.", - Group: 91006, + Group: 11006, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10764,7 +10764,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910111, Name: "Superior Heal" + " (Inherited)", Description: "Moderately recover endurance when overtaken toward the back mid-race.", - Group: 91011, + Group: 11011, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10786,7 +10786,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910131, Name: "Legacy of the Strong" + " (Inherited)", Description: "Slightly increase velocity continuously when pressured by another runner and running out of energy toward the front on the final corner or later.", - Group: 91013, + Group: 11013, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10808,7 +10808,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910141, Name: "Condor's Fury" + " (Inherited)", Description: "Slightly increase acceleration when aiming for the front from midpack on the final corner.", - Group: 91014, + Group: 11014, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10830,7 +10830,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910171, Name: "Arrows Whistle, Shadows Disperse" + " (Inherited)", Description: "Slightly increase velocity when pressured by another runner in the front part of the pack on the final corner or later.", - Group: 91017, + Group: 11017, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10852,7 +10852,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910181, Name: "Eternal Moments" + " (Inherited)", Description: "Slightly increase velocity when starting to make a move from a position toward the front mid-race.", - Group: 91018, + Group: 11018, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10874,7 +10874,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910231, Name: "Presents from X" + " (Inherited)", Description: "Slightly increase velocity mid-race after staying well-positioned from the start of the race up until the second half.", - Group: 91023, + Group: 11023, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10896,7 +10896,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910241, Name: "Flowery☆Maneuver" + " (Inherited)", Description: "Slightly increase velocity when passing another runner toward the front on the final corner. If passing toward the back, slightly increase acceleration instead.", - Group: 91024, + Group: 11024, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10926,7 +10926,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910301, Name: "Every Rose Has Its Fangs" + " (Inherited)", Description: "Slightly drain endurance from runners ahead when well-positioned and pressured by another runner mid-race.", - Group: 91030, + Group: 11030, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10949,7 +10949,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910401, Name: "Dancing in the Leaves" + " (Inherited)", Description: "Very slightly increase ability to break out of the pack when engaged in a challenge in midpack on the final corner.", - Group: 91040, + Group: 11040, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10972,7 +10972,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910451, Name: "Give Mummy a Hug ♡" + " (Inherited)", Description: "Very slightly increase ability to break out of the pack when well-positioned and close to the runner ahead on the final straight.", - Group: 91045, + Group: 11045, Rarity: 1, GroupRate: 2, GradeValue: 180, @@ -10995,7 +10995,7 @@ var AllSkills = map[SkillID]Skill{ ID: 910561, Name: "Bountiful Harvest" + " (Inherited)", Description: "Slightly increase velocity with a surge of fortune when pressured by another runner toward the back in the second half of the race.", - Group: 91056, + Group: 11056, Rarity: 1, GroupRate: 2, GradeValue: 180, diff --git a/horsegen/gen.go b/horsegen/gen.go index 5d5d249..317688c 100644 --- a/horsegen/gen.go +++ b/horsegen/gen.go @@ -74,19 +74,8 @@ func ExecCharacter(t *template.Template, region string, kk, g io.Writer, c []Nam func ExecSkill(t *template.Template, region string, kk, g io.Writer, groups []NamedID[SkillGroup], skills []Skill) error { m := make(map[int][]Skill, len(groups)) - u := make(map[int]int, len(groups)) for _, t := range skills { 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 skills { - if t.InheritID != 0 { - m[u[t.InheritID]] = append(m[u[t.InheritID]], t) - } } data := struct { Region string diff --git a/horsegen/skill.sql b/horsegen/skill.sql index 4c0708e..4aee6d2 100644 --- a/horsegen/skill.sql +++ b/horsegen/skill.sql @@ -17,7 +17,7 @@ SELECT d.id, n.name, n.description, - d.group_id, + IIF(d.unique_skill_id_1 = 0, d.group_id, ud.group_id) AS group_id, CASE WHEN g.name IS NOT NULL THEN g.name WHEN d.unique_skill_id_1 != 0 THEN n.name @@ -48,8 +48,8 @@ SELECT d.target_value_1_3, d.precondition_2, d.condition_2, - float_ability_time_2, - float_cooldown_time_2, + d.float_ability_time_2, + d.float_cooldown_time_2, d.ability_type_2_1, d.ability_value_usage_2_1, d.float_ability_value_2_1, @@ -71,6 +71,7 @@ SELECT ROW_NUMBER() OVER (ORDER BY d.id) - 1 AS "index" FROM skill_data d JOIN skill_names n ON d.id = n.id + LEFT JOIN skill_data ud ON d.unique_skill_id_1 = ud.id LEFT JOIN skill_groups g ON d.group_id = g.group_id LEFT JOIN single_mode_skill_need_point p ON d.id = p.id ORDER BY d.id