@@ -15,6 +15,8 @@ import (
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/sync/errgroup"
|
||||
"zombiezen.com/go/sqlite"
|
||||
@@ -170,6 +172,7 @@ func main() {
|
||||
},
|
||||
}),
|
||||
UniqueOwner: s.ColumnText(52), // TODO(zeph): should be id, not name
|
||||
Tags: parseTags(s.ColumnText(54)),
|
||||
SPCost: s.ColumnInt(49),
|
||||
IconID: s.ColumnInt(53),
|
||||
}
|
||||
@@ -395,6 +398,20 @@ type SparkEffImm struct {
|
||||
Value2 int32
|
||||
}
|
||||
|
||||
func parseTags(s string) []uint16 {
|
||||
r := make([]uint16, 0, 8)
|
||||
for s != "" {
|
||||
t, u, _ := strings.Cut(s, "/")
|
||||
s = u
|
||||
v, err := strconv.ParseUint(t, 10, 16)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("parsing skill tags: %w", err))
|
||||
}
|
||||
r = append(r, uint16(v))
|
||||
}
|
||||
return trimZeros(r...)
|
||||
}
|
||||
|
||||
func trimAbilities(s []horse.Ability) []horse.Ability {
|
||||
for len(s) > 0 && s[len(s)-1].Type == 0 {
|
||||
s = s[:len(s)-1]
|
||||
|
||||
@@ -87,7 +87,7 @@ SELECT
|
||||
COALESCE(u.owner_id, iu.owner_id, 0) AS unique_owner_id,
|
||||
COALESCE(u.name, iu.name, '') AS unique_owner,
|
||||
d.icon_id,
|
||||
ROW_NUMBER() OVER (ORDER BY d.id) - 1 AS "index"
|
||||
d.tag_id
|
||||
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
|
||||
|
||||
2182
global/skill.json
2182
global/skill.json
File diff suppressed because it is too large
Load Diff
@@ -227,6 +227,10 @@ export interface Skill {
|
||||
* Name of the Uma which owns this skill as a unique, if applicable.
|
||||
*/
|
||||
unique_owner?: string;
|
||||
/**
|
||||
* Skill tags, numeric IDs for matching against other effects.
|
||||
*/
|
||||
tags: number[];
|
||||
/**
|
||||
* SP cost to purchase the skill, if applicable.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user