Compare commits
267
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55aa03aa41 | ||
|
|
0ffd2c099a | ||
|
|
6828b1bd88 | ||
|
|
78aee43e5f | ||
|
|
745c9d01dd | ||
|
|
e00fe0965a | ||
|
|
caa19dd85a | ||
|
|
3bf17944b3 | ||
|
|
30f89e86f0 | ||
|
|
8850dd4a08 | ||
|
|
8946091b93 | ||
|
|
9e3e06f0a0 | ||
|
|
12fea4c37e | ||
|
|
ad02e0711d | ||
|
|
869235a8c2 | ||
|
|
15f6d2c59a | ||
|
|
d0c11aa527 | ||
|
|
c7a847f677 | ||
|
|
0791fdd3d4 | ||
|
|
e5f18d3c78 | ||
|
|
0d3cf24714 | ||
|
|
a8ed0dbbe0 | ||
|
|
84f4f8e358 | ||
|
|
7085fea1b7 | ||
|
|
1f195024e1 | ||
|
|
a91980e603 | ||
|
|
8de957b59b | ||
|
|
206fee797c | ||
|
|
6ef2a190cd | ||
|
|
9a7028a44f | ||
|
|
a7218c68ed | ||
|
|
1f31ef223d | ||
|
|
444fea85f0 | ||
|
|
e92ce64b17 | ||
|
|
8d2a0e6c0d | ||
|
|
6b8b494739 | ||
|
|
d8d9ec6543 | ||
|
|
cb48e238a8 | ||
|
|
2bf229b5da | ||
|
|
bde080eadd | ||
|
|
1fe397ca81 | ||
|
|
5a13519189 | ||
|
|
9f4574e176 | ||
|
|
eaee64dca4 | ||
|
|
a232f78ac7 | ||
|
|
061fe89b7f | ||
|
|
c0ddc32997 | ||
|
|
9521b5e7c5 | ||
|
|
efcdf5d525 | ||
|
|
8faf5cadc7 | ||
|
|
656e155625 | ||
|
|
ff07b90c73 | ||
|
|
d265c81735 | ||
|
|
998156d345 | ||
|
|
aaa7c6d5b5 | ||
|
|
48118efeeb | ||
|
|
79d4e76090 | ||
|
|
ea39be0510 | ||
|
|
7bac55ca43 | ||
|
|
435da61405 | ||
|
|
f3e7c7b43b | ||
|
|
eded415df4 | ||
|
|
34029fe001 | ||
|
|
ffb700545f | ||
|
|
70ad09a13e | ||
|
|
74c22c7313 | ||
|
|
2c1b4b9261 | ||
|
|
e5128b6783 | ||
|
|
b22c8307fd | ||
|
|
cb54bbe414 | ||
|
|
096cff28b6 | ||
|
|
197df8f022 | ||
|
|
009dd1d695 | ||
|
|
bdafc93315 | ||
|
|
ef5b06d66e | ||
|
|
65b81612bc | ||
|
|
6269665e79 | ||
|
|
cae7d5b8f4 | ||
|
|
fca43e64b5 | ||
|
|
bc395a0788 | ||
|
|
1d879cbf9f | ||
|
|
240a3d9a73 | ||
|
|
3d73460934 | ||
|
|
0c518a9ce2 | ||
|
|
5cbb6d7b1d | ||
|
|
b0bd16fd04 | ||
|
|
55175c9c40 | ||
|
|
06e5a06680 | ||
|
|
dbb0dcd2dc | ||
|
|
02f723b83a | ||
|
|
1f58dec491 | ||
|
|
a6d264c79d | ||
|
|
d62e729052 | ||
|
|
9ce665865e | ||
|
|
7d395b2cc7 | ||
|
|
2b69211a6c | ||
|
|
67377c4690 | ||
|
|
1d65a0ec14 | ||
|
|
ad58edbfe1 | ||
|
|
f8e7bfbec6 | ||
|
|
2e618b613f | ||
|
|
cc2b5fcfcb | ||
|
|
8ef3936be5 | ||
|
|
b06e4b537b | ||
|
|
7b4cd41d3b | ||
|
|
2c9434729a | ||
|
|
7f02925ff7 | ||
|
|
b217691c8a | ||
|
|
4bce196c09 | ||
|
|
aa17d8ccf3 | ||
|
|
26a5ca4496 | ||
|
|
51f942ee18 | ||
|
|
2c773391f0 | ||
|
|
c66d969c82 | ||
|
|
bc9d722ee0 | ||
|
|
6482f11620 | ||
|
|
75024c7c11 | ||
|
|
dc78d51def | ||
|
|
5f0ad1b0e0 | ||
|
|
6db0ca5230 | ||
|
|
049617c22e | ||
|
|
d431d3382a | ||
|
|
a848c8eb72 | ||
|
|
871fd5fdcc | ||
|
|
e3dd37f515 | ||
|
|
3557b32298 | ||
|
|
20db674d25 | ||
|
|
2a4da0a73e | ||
|
|
e6335c1d6e | ||
|
|
f40fea0ec5 | ||
|
|
96503e40f6 | ||
|
|
c95e9bb4cc | ||
|
|
825fe0f2fb | ||
|
|
4ea689f426 | ||
|
|
f0bb6d1926 | ||
|
|
13436abd1a | ||
|
|
bed60a8a67 | ||
|
|
2b8ef759df | ||
|
|
9318bb9091 | ||
|
|
847f2eb8ca | ||
|
|
0b7201779c | ||
|
|
2b37c00ed0 | ||
|
|
2e5a78e1d8 | ||
|
|
277c904bc5 | ||
|
|
8945a3943b | ||
|
|
1cfd80ac3d | ||
|
|
b4e6a34aca | ||
|
|
b3c8699635 | ||
|
|
223495a04a | ||
|
|
40a015363c | ||
|
|
2869e7c160 | ||
|
|
30a72d91b8 | ||
|
|
efb36f705c | ||
|
|
6a30b1d6f0 | ||
|
|
7b45b8761b | ||
|
|
a89ef8fc4c | ||
|
|
bae79a5320 | ||
|
|
0f14ece4da | ||
|
|
b1c6850ce1 | ||
|
|
bd99cfaa6d | ||
|
|
3ab17cf9b0 | ||
|
|
4bd7962182 | ||
|
|
09f099171b | ||
|
|
4fff7069a8 | ||
|
|
3e2153b39c | ||
|
|
d0fa6ab15c | ||
|
|
9f8024d488 | ||
|
|
1df3bc1db9 | ||
|
|
a8c1b9c754 | ||
|
|
7600c48cc7 | ||
|
|
2e31560d6c | ||
|
|
2a07f193ec | ||
|
|
b720b325b3 | ||
|
|
80573a84ea | ||
|
|
bc94d66002 | ||
|
|
aca5fccaa7 | ||
|
|
ee6ced1390 | ||
|
|
af8e5907b9 | ||
|
|
9cf9fd198f | ||
|
|
0c2db10082 | ||
|
|
fae9c38098 | ||
|
|
0799bf658f | ||
|
|
2cec7c5699 | ||
|
|
b10a2572ec | ||
|
|
657cf22f71 | ||
|
|
dce58357ae | ||
|
|
7abe427c03 | ||
|
|
1a55150ddd | ||
|
|
3e879f3687 | ||
|
|
0eb932dc3c | ||
|
|
eb26b42543 | ||
|
|
d082ce3374 | ||
|
|
faccc3e912 | ||
|
|
af8edb8999 | ||
|
|
0abe5fc3e4 | ||
|
|
5a444ea08c | ||
|
|
dfb2ad2950 | ||
|
|
256e11d320 | ||
|
|
467098a9e4 | ||
|
|
9532e0ec89 | ||
|
|
c14850a048 | ||
|
|
d0aec5c501 | ||
|
|
ccef87f0a3 | ||
|
|
34140c0bba | ||
|
|
0ad064725f | ||
|
|
886dccb6b8 | ||
|
|
57e8a06383 | ||
|
|
ab14f58079 | ||
|
|
4106215180 | ||
|
|
cdea376f94 | ||
|
|
d157dfc9b6 | ||
|
|
773625b842 | ||
|
|
22ca5c98f3 | ||
|
|
08deedea8f | ||
|
|
86b769d7ed | ||
|
|
e139eae06d | ||
|
|
34e8c1f812 | ||
|
|
cc3128d65a | ||
|
|
d04544030a | ||
|
|
e13c435afa | ||
|
|
4429bbecd1 | ||
|
|
2099eeb97e | ||
|
|
c22ed0dc83 | ||
|
|
494aeeb401 | ||
|
|
298b1368e8 | ||
|
|
b20a1a5964 | ||
|
|
af8e04473a | ||
|
|
351f606d29 | ||
|
|
da376647af | ||
|
|
2ec8d9cfdb | ||
|
|
2dd75edc03 | ||
|
|
e08580925d | ||
|
|
63659a4934 | ||
|
|
af4e06411d | ||
|
|
4426925ebb | ||
|
|
8632bb8c3c | ||
|
|
7ff271ff2d | ||
|
|
5540bb2c4e | ||
|
|
9a73f2147b | ||
|
|
01b88994f3 | ||
|
|
424f65dc8a | ||
|
|
cf814c6c72 | ||
|
|
7972bab46c | ||
|
|
3fa30903cd | ||
|
|
9ef568202c | ||
|
|
b0e422ac01 | ||
|
|
2184515938 | ||
|
|
489457c63c | ||
|
|
9b3c9b22aa | ||
|
|
1f2824246f | ||
|
|
63e8327125 | ||
|
|
e608363a24 | ||
|
|
e3903e5312 | ||
|
|
5e7103befd | ||
|
|
0723fe0c6a | ||
|
|
cbe08cd8a7 | ||
|
|
db3e18e586 | ||
|
|
8fb29a953c | ||
|
|
c00d3d0186 | ||
|
|
a534975601 | ||
|
|
b55e1bc200 | ||
|
|
c58dbd19b0 | ||
|
|
2fcd608102 | ||
|
|
546f2db327 | ||
|
|
856c94723f | ||
|
|
2393bf2fa5 | ||
|
|
bf06de0f5e |
@@ -1,3 +0,0 @@
|
|||||||
[submodule "std"]
|
|
||||||
path = std
|
|
||||||
url = git@github.com:koka-community/std.git
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: main
|
||||||
|
- event: pull_request
|
||||||
|
- event: manual
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
image: golang:1.26-alpine
|
||||||
|
commands:
|
||||||
|
- go vet ./...
|
||||||
|
- go test ./...
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: main
|
||||||
|
- event: pull_request
|
||||||
|
- event: manual
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
image: node:24-alpine
|
||||||
|
commands:
|
||||||
|
- cd zenno
|
||||||
|
- npm ci
|
||||||
|
- npm run check
|
||||||
|
- npm run lint
|
||||||
|
- npm run test
|
||||||
@@ -27,13 +27,13 @@ const (
|
|||||||
_AbilityTarget_name_0 = "selfothers with Sympathy"
|
_AbilityTarget_name_0 = "selfothers with Sympathy"
|
||||||
_AbilityTarget_name_1 = "others in view"
|
_AbilityTarget_name_1 = "others in view"
|
||||||
_AbilityTarget_name_2 = "frontmost"
|
_AbilityTarget_name_2 = "frontmost"
|
||||||
_AbilityTarget_name_3 = "others aheadothers behindall teammates"
|
_AbilityTarget_name_3 = "aheadbehindall teammates"
|
||||||
_AbilityTarget_name_4 = "using stylerushing others aheadrushing others behindrushing using stylespecific characterwhosoever triggered this skill"
|
_AbilityTarget_name_4 = "using stylerushing others aheadrushing others behindrushing using stylespecific characterwhosoever triggered this skill"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
_AbilityTarget_index_0 = [...]uint8{0, 4, 24}
|
_AbilityTarget_index_0 = [...]uint8{0, 4, 24}
|
||||||
_AbilityTarget_index_3 = [...]uint8{0, 12, 25, 38}
|
_AbilityTarget_index_3 = [...]uint8{0, 5, 11, 24}
|
||||||
_AbilityTarget_index_4 = [...]uint8{0, 11, 31, 52, 71, 89, 119}
|
_AbilityTarget_index_4 = [...]uint8{0, 11, 31, 52, 71, 89, 119}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,27 +18,34 @@ func _() {
|
|||||||
_ = x[AbilityHP-9]
|
_ = x[AbilityHP-9]
|
||||||
_ = x[AbilityGateDelay-10]
|
_ = x[AbilityGateDelay-10]
|
||||||
_ = x[AbilityFrenzy-13]
|
_ = x[AbilityFrenzy-13]
|
||||||
|
_ = x[AbilityAddGateDelay-14]
|
||||||
_ = x[AbilityCurrentSpeed-21]
|
_ = x[AbilityCurrentSpeed-21]
|
||||||
|
_ = x[AbilityCurrentSpeedUp-22]
|
||||||
_ = x[AbilityTargetSpeed-27]
|
_ = x[AbilityTargetSpeed-27]
|
||||||
_ = x[AbilityLaneSpeed-28]
|
_ = x[AbilityLaneSpeed-28]
|
||||||
|
_ = x[AbilityRushedChance-29]
|
||||||
_ = x[AbilityAccel-31]
|
_ = x[AbilityAccel-31]
|
||||||
_ = x[AbilityLaneChange-35]
|
_ = x[AbilityLaneChange-35]
|
||||||
|
_ = x[AbilityActivateRare-37]
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
_AbilityType_name_0 = "SpeedStaminaPowerGutsWitEnable Great Escape"
|
_AbilityType_name_0 = "SpeedStaminaPowerGutsWitEnable Great Escape"
|
||||||
_AbilityType_name_1 = "VisionHPGate delay multiplier"
|
_AbilityType_name_1 = "VisionHPGate delay multiplier"
|
||||||
_AbilityType_name_2 = "Frenzy"
|
_AbilityType_name_2 = "FrenzyAdded gate delay"
|
||||||
_AbilityType_name_3 = "Current speed"
|
_AbilityType_name_3 = "Current speedCurrent speed"
|
||||||
_AbilityType_name_4 = "Target speedLane change speed"
|
_AbilityType_name_4 = "Target speedLane change speedRushed chance"
|
||||||
_AbilityType_name_5 = "Acceleration"
|
_AbilityType_name_5 = "Acceleration"
|
||||||
_AbilityType_name_6 = "Forced lane change"
|
_AbilityType_name_6 = "Set target lane"
|
||||||
|
_AbilityType_name_7 = "Activate rare skills"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
_AbilityType_index_0 = [...]uint8{0, 5, 12, 17, 21, 24, 43}
|
_AbilityType_index_0 = [...]uint8{0, 5, 12, 17, 21, 24, 43}
|
||||||
_AbilityType_index_1 = [...]uint8{0, 6, 8, 29}
|
_AbilityType_index_1 = [...]uint8{0, 6, 8, 29}
|
||||||
_AbilityType_index_4 = [...]uint8{0, 12, 29}
|
_AbilityType_index_2 = [...]uint8{0, 6, 22}
|
||||||
|
_AbilityType_index_3 = [...]uint8{0, 13, 26}
|
||||||
|
_AbilityType_index_4 = [...]uint8{0, 12, 29, 42}
|
||||||
)
|
)
|
||||||
|
|
||||||
func (i AbilityType) String() string {
|
func (i AbilityType) String() string {
|
||||||
@@ -49,17 +56,21 @@ func (i AbilityType) String() string {
|
|||||||
case 8 <= i && i <= 10:
|
case 8 <= i && i <= 10:
|
||||||
i -= 8
|
i -= 8
|
||||||
return _AbilityType_name_1[_AbilityType_index_1[i]:_AbilityType_index_1[i+1]]
|
return _AbilityType_name_1[_AbilityType_index_1[i]:_AbilityType_index_1[i+1]]
|
||||||
case i == 13:
|
case 13 <= i && i <= 14:
|
||||||
return _AbilityType_name_2
|
i -= 13
|
||||||
case i == 21:
|
return _AbilityType_name_2[_AbilityType_index_2[i]:_AbilityType_index_2[i+1]]
|
||||||
return _AbilityType_name_3
|
case 21 <= i && i <= 22:
|
||||||
case 27 <= i && i <= 28:
|
i -= 21
|
||||||
|
return _AbilityType_name_3[_AbilityType_index_3[i]:_AbilityType_index_3[i+1]]
|
||||||
|
case 27 <= i && i <= 29:
|
||||||
i -= 27
|
i -= 27
|
||||||
return _AbilityType_name_4[_AbilityType_index_4[i]:_AbilityType_index_4[i+1]]
|
return _AbilityType_name_4[_AbilityType_index_4[i]:_AbilityType_index_4[i+1]]
|
||||||
case i == 31:
|
case i == 31:
|
||||||
return _AbilityType_name_5
|
return _AbilityType_name_5
|
||||||
case i == 35:
|
case i == 35:
|
||||||
return _AbilityType_name_6
|
return _AbilityType_name_6
|
||||||
|
case i == 37:
|
||||||
|
return _AbilityType_name_7
|
||||||
default:
|
default:
|
||||||
return "AbilityType(" + strconv.FormatInt(int64(i), 10) + ")"
|
return "AbilityType(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||||
}
|
}
|
||||||
@@ -18,6 +18,7 @@ func _() {
|
|||||||
_ = x[ValueUsageRandom-8]
|
_ = x[ValueUsageRandom-8]
|
||||||
_ = x[ValueUsageRandom2-9]
|
_ = x[ValueUsageRandom2-9]
|
||||||
_ = x[ValueUsageClimax-10]
|
_ = x[ValueUsageClimax-10]
|
||||||
|
_ = x[ValueUsageFans-12]
|
||||||
_ = x[ValueUsageMaxStat-13]
|
_ = x[ValueUsageMaxStat-13]
|
||||||
_ = x[ValueUsageGreenCount-14]
|
_ = x[ValueUsageGreenCount-14]
|
||||||
_ = x[ValueUsageDistAdd-19]
|
_ = x[ValueUsageDistAdd-19]
|
||||||
@@ -29,15 +30,15 @@ func _() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
_AbilityValueUsage_name_0 = "directlyscaling with the number of skillsscaling with team Speedscaling with team Staminascaling with team Powerscaling with team Gutsscaling with team Witwith a random 0× to 0.04× multiplierwith a random 0× to 0.04× multiplierscaling with the number of races won in training"
|
_AbilityValueUsage_name_0 = "directlyscaling with the number of skillsscaling with team Speedscaling with team Staminascaling with team Powerscaling with team Gutsscaling with team Witwith a random 0× to 0.04× multiplierwith a random 0× to 0.04× multiplierscaling with the number of races won in the career"
|
||||||
_AbilityValueUsage_name_1 = "scaling with the highest raw statscaling with the number of Passive skills activated"
|
_AbilityValueUsage_name_1 = "scaling with the number of fans earned in the careerscaling with the highest raw statscaling with the number of Passive skills activated"
|
||||||
_AbilityValueUsage_name_2 = "plus extra when far from the leadscaling with mid-race phase blocked side time"
|
_AbilityValueUsage_name_2 = "plus extra when far from the leadscaling with mid-race phase blocked side time"
|
||||||
_AbilityValueUsage_name_3 = "scaling with overall speedscaling with overall speedscaling with L'Arc global potentialscaling with the longest lead obtained in the first ⅔"
|
_AbilityValueUsage_name_3 = "scaling with overall speedscaling with overall speedscaling with L'Arc global potentialscaling with the longest lead obtained in the first ⅔"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
_AbilityValueUsage_index_0 = [...]uint16{0, 8, 41, 64, 89, 112, 134, 155, 193, 231, 279}
|
_AbilityValueUsage_index_0 = [...]uint16{0, 8, 41, 64, 89, 112, 134, 155, 193, 231, 281}
|
||||||
_AbilityValueUsage_index_1 = [...]uint8{0, 33, 84}
|
_AbilityValueUsage_index_1 = [...]uint8{0, 52, 85, 136}
|
||||||
_AbilityValueUsage_index_2 = [...]uint8{0, 33, 78}
|
_AbilityValueUsage_index_2 = [...]uint8{0, 33, 78}
|
||||||
_AbilityValueUsage_index_3 = [...]uint8{0, 26, 52, 87, 142}
|
_AbilityValueUsage_index_3 = [...]uint8{0, 26, 52, 87, 142}
|
||||||
)
|
)
|
||||||
@@ -47,8 +48,8 @@ func (i AbilityValueUsage) String() string {
|
|||||||
case 1 <= i && i <= 10:
|
case 1 <= i && i <= 10:
|
||||||
i -= 1
|
i -= 1
|
||||||
return _AbilityValueUsage_name_0[_AbilityValueUsage_index_0[i]:_AbilityValueUsage_index_0[i+1]]
|
return _AbilityValueUsage_name_0[_AbilityValueUsage_index_0[i]:_AbilityValueUsage_index_0[i+1]]
|
||||||
case 13 <= i && i <= 14:
|
case 12 <= i && i <= 14:
|
||||||
i -= 13
|
i -= 12
|
||||||
return _AbilityValueUsage_name_1[_AbilityValueUsage_index_1[i]:_AbilityValueUsage_index_1[i+1]]
|
return _AbilityValueUsage_name_1[_AbilityValueUsage_index_1[i]:_AbilityValueUsage_index_1[i+1]]
|
||||||
case 19 <= i && i <= 20:
|
case 19 <= i && i <= 20:
|
||||||
i -= 19
|
i -= 19
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
// Code generated by "stringer -type AptitudeLevel -trimprefix AptitudeLv"; DO NOT EDIT.
|
||||||
|
|
||||||
|
package horse
|
||||||
|
|
||||||
|
import "strconv"
|
||||||
|
|
||||||
|
func _() {
|
||||||
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||||
|
// Re-run the stringer command to generate them again.
|
||||||
|
var x [1]struct{}
|
||||||
|
_ = x[AptitudeLvG-1]
|
||||||
|
_ = x[AptitudeLvF-2]
|
||||||
|
_ = x[AptitudeLvE-3]
|
||||||
|
_ = x[AptitudeLvD-4]
|
||||||
|
_ = x[AptitudeLvC-5]
|
||||||
|
_ = x[AptitudeLvB-6]
|
||||||
|
_ = x[AptitudeLvA-7]
|
||||||
|
_ = x[AptitudeLvS-8]
|
||||||
|
}
|
||||||
|
|
||||||
|
const _AptitudeLevel_name = "GFEDCBAS"
|
||||||
|
|
||||||
|
var _AptitudeLevel_index = [...]uint8{0, 1, 2, 3, 4, 5, 6, 7, 8}
|
||||||
|
|
||||||
|
func (i AptitudeLevel) String() string {
|
||||||
|
idx := int(i) - 1
|
||||||
|
if i < 1 || idx >= len(_AptitudeLevel_index)-1 {
|
||||||
|
return "AptitudeLevel(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||||
|
}
|
||||||
|
return _AptitudeLevel_name[_AptitudeLevel_index[idx]:_AptitudeLevel_index[idx+1]]
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package horse
|
||||||
|
|
||||||
|
type CharacterID int16
|
||||||
|
|
||||||
|
type Character struct {
|
||||||
|
ID CharacterID `json:"chara_id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c Character) String() string {
|
||||||
|
return c.Name
|
||||||
|
}
|
||||||
|
|
||||||
|
// AffinityRelation holds precomputed affinity values for a pair or trio.
|
||||||
|
type AffinityRelation struct {
|
||||||
|
IDA CharacterID `json:"chara_a"`
|
||||||
|
IDB CharacterID `json:"chara_b"`
|
||||||
|
IDC CharacterID `json:"chara_c,omitzero"`
|
||||||
|
Affinity int `json:"affinity"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// AffinityDetail holds a single affinity entry.
|
||||||
|
type AffinityDetail struct {
|
||||||
|
CharaID CharacterID `json:"chara_id"`
|
||||||
|
Relation uint16 `json:"relation"`
|
||||||
|
Affinity uint16 `json:"affinity"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Conversation describes a lobby conversation.
|
||||||
|
type Conversation struct {
|
||||||
|
// ID is the conversation ID.
|
||||||
|
ID int32 `json:"id"`
|
||||||
|
// CharacterID is the ID of the character who has the conversation as
|
||||||
|
// a gallery entry.
|
||||||
|
CharacterID CharacterID `json:"chara_id"`
|
||||||
|
// Number is the conversation number within the character's gallery.
|
||||||
|
Number int `json:"number"`
|
||||||
|
// Location is the ID of the location the conversation occurs in the lobby.
|
||||||
|
Location LobbyConversationLocationID `json:"location"`
|
||||||
|
// Chara1 is the first conversation participant ID.
|
||||||
|
// It does not necessarily match CharacterID.
|
||||||
|
Chara1 CharacterID `json:"chara_1"`
|
||||||
|
// Chara2 is the second conversation participant ID.
|
||||||
|
Chara2 CharacterID `json:"chara_2,omitzero"`
|
||||||
|
// Chara3 is the third conversation participant ID.
|
||||||
|
Chara3 CharacterID `json:"chara_3,omitzero"`
|
||||||
|
// ConditionType is a complete mystery to me.
|
||||||
|
ConditionType int `json:"condition_type"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LobbyConversationLocationID int
|
||||||
|
|
||||||
|
//go:generate go run golang.org/x/tools/cmd/stringer@v0.41.0 -type LobbyConversationLocationID -trimprefix Lobby -linecomment
|
||||||
|
const (
|
||||||
|
LobbyRightFront1 LobbyConversationLocationID = 110 // right side front
|
||||||
|
LobbyRightFront2 LobbyConversationLocationID = 120 // right side front
|
||||||
|
LobbyRightFront3 LobbyConversationLocationID = 130 // right side front
|
||||||
|
LobbyLeftTable1 LobbyConversationLocationID = 210 // left side table
|
||||||
|
LobbyLeftTable2 LobbyConversationLocationID = 220 // left side table
|
||||||
|
LobbyBackSeat LobbyConversationLocationID = 310 // center back seat
|
||||||
|
LobbyPosters1 LobbyConversationLocationID = 410 // center posters
|
||||||
|
LobbyPosters2 LobbyConversationLocationID = 420 // center posters
|
||||||
|
LobbyPosters3 LobbyConversationLocationID = 430 // center posters
|
||||||
|
LobbySchoolMap1 LobbyConversationLocationID = 510 // left side school map
|
||||||
|
LobbySchoolMap2 LobbyConversationLocationID = 520 // left side school map
|
||||||
|
LobbySchoolMap3 LobbyConversationLocationID = 530 // left side school map
|
||||||
|
)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
token
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# horsebot
|
||||||
|
|
||||||
|
Website and 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.
|
||||||
|
|
||||||
|
The `-mdb` flag is mandatory for both website and Discord bot modes.
|
||||||
|
It provides data for both the horsebot API and the discord bot.
|
||||||
|
|
||||||
|
## Running the Website
|
||||||
|
|
||||||
|
If the `-public` flag is provided, its value gives the directory to serve at `/`.
|
||||||
|
The `-img` flag gives a separate directory into which images are synced from GameTora; obtain permission from Gertas prior to using it.
|
||||||
|
The images are served on `/img/`.
|
||||||
|
|
||||||
|
## Running the Discord Bot
|
||||||
|
|
||||||
|
Provide the `-token` flag pointing to a file containing the token.
|
||||||
|
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.
|
||||||
@@ -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") })
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,255 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"encoding/hex"
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
"flag"
|
||||||
|
"fmt"
|
||||||
|
"log/slog"
|
||||||
|
"net"
|
||||||
|
"net/http"
|
||||||
|
"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"
|
||||||
|
httpmiddle "github.com/go-chi/chi/v5/middleware"
|
||||||
|
"zombiezen.com/go/sqlite"
|
||||||
|
"zombiezen.com/go/sqlite/sqlitex"
|
||||||
|
|
||||||
|
"git.sunturtle.xyz/zephyr/horse/mdb"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
var (
|
||||||
|
// public site
|
||||||
|
addr string
|
||||||
|
mdbf string
|
||||||
|
public string
|
||||||
|
img string
|
||||||
|
// discord
|
||||||
|
tokenFile string
|
||||||
|
apiRoute string
|
||||||
|
pubkey string
|
||||||
|
// logging
|
||||||
|
level slog.Level
|
||||||
|
textfmt string
|
||||||
|
)
|
||||||
|
flag.StringVar(&addr, "http", ":13669", "`address` to bind HTTP server")
|
||||||
|
flag.StringVar(&mdbf, "mdb", "", "`path` to master.mdb")
|
||||||
|
flag.StringVar(&public, "public", "", "`dir`ectory containing the website to serve")
|
||||||
|
flag.StringVar(&img, "img", "", "`dir`ectory to save and serve images")
|
||||||
|
flag.StringVar(&tokenFile, "token", "", "`file` containing the Discord bot token")
|
||||||
|
flag.StringVar(&apiRoute, "route", "/interactions/callback", "`path` to serve Discord 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))
|
||||||
|
|
||||||
|
if public != "" {
|
||||||
|
stat, err := os.Stat(public)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("public", slog.Any("err", err))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
if !stat.IsDir() {
|
||||||
|
slog.Error("public", slog.String("err", "not a directory"))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||||
|
|
||||||
|
db, err := sqlitex.NewPool(mdbf, sqlitex.PoolOptions{Flags: sqlite.OpenReadOnly})
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("mdb", slog.Any("err", err))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
if img != "" {
|
||||||
|
// Ensure the img directory is in fact a directory
|
||||||
|
// before we start trying to fill it out.
|
||||||
|
err := os.MkdirAll(img, 0777)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("img", slog.Any("err", err))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
go saveImgs(ctx, db, img)
|
||||||
|
}
|
||||||
|
|
||||||
|
var client *bot.Client
|
||||||
|
if tokenFile != "" {
|
||||||
|
skills, err := mdb.Skills(ctx, db)
|
||||||
|
slog.Info("loaded skills", slog.Int("count", len(skills)))
|
||||||
|
groups, err2 := mdb.SkillGroups(ctx, db)
|
||||||
|
slog.Info("loaded skill groups", slog.Int("count", len(groups)))
|
||||||
|
if err = errors.Join(err, err2); err != nil {
|
||||||
|
slog.Error("loading data", slog.Any("err", err))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
skillSrv := newSkillServer(skills, groups)
|
||||||
|
slog.Info("skill server ready")
|
||||||
|
|
||||||
|
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("/", skillSrv.slash)
|
||||||
|
r.Autocomplete("/", skillSrv.autocomplete)
|
||||||
|
r.SelectMenuComponent("/swap", skillSrv.menu)
|
||||||
|
r.ButtonComponent("/swap/{id}", skillSrv.button)
|
||||||
|
})
|
||||||
|
|
||||||
|
slog.Info("connect", slog.String("disgo", disgo.Version))
|
||||||
|
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'})
|
||||||
|
client, err = disgo.New(string(token), bot.WithDefaultGateway(), bot.WithEventListeners(r))
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("building bot", slog.Any("err", err))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mux := http.NewServeMux()
|
||||||
|
if public != "" {
|
||||||
|
mux.Handle("GET /", httpmiddle.Compress(5)(http.FileServerFS(os.DirFS(public))))
|
||||||
|
}
|
||||||
|
if img != "" {
|
||||||
|
mux.Handle("GET /img/", http.StripPrefix("/img", http.FileServerFS(os.DirFS(img))))
|
||||||
|
}
|
||||||
|
mux.Handle("GET /api/global/affinity", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.AffinitySummary)))
|
||||||
|
mux.Handle("GET /api/global/affinity-detail", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.AffinityDetail)))
|
||||||
|
mux.Handle("GET /api/global/character", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.Characters)))
|
||||||
|
mux.Handle("GET /api/global/conversation", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.Conversations)))
|
||||||
|
mux.Handle("GET /api/global/race", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.Races)))
|
||||||
|
mux.Handle("GET /api/global/racecourse", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.Racecourses)))
|
||||||
|
mux.Handle("GET /api/global/saddle", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.Saddles)))
|
||||||
|
mux.Handle("GET /api/global/scenario", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.Scenarios)))
|
||||||
|
mux.Handle("GET /api/global/skill", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.Skills)))
|
||||||
|
mux.Handle("GET /api/global/skill-group", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.SkillGroups)))
|
||||||
|
mux.Handle("GET /api/global/spark", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.Sparks)))
|
||||||
|
mux.Handle("GET /api/global/support", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.SupportCards)))
|
||||||
|
mux.Handle("GET /api/global/uma", httpmiddle.Compress(5)(dataroute(ctx, db, mdb.Umas)))
|
||||||
|
if pubkey != "" {
|
||||||
|
pk, err := hex.DecodeString(pubkey)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("pubkey", slog.Any("err", err))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
mux.Handle("POST "+apiRoute, httpserver.HandleInteraction(httpserver.DefaultVerifier{}, pk, slog.Default(), client.EventManager.HandleHTTPEvent))
|
||||||
|
slog.Info("Discord HTTP API enabled", slog.String("pubkey", pubkey))
|
||||||
|
}
|
||||||
|
l, err := net.Listen("tcp", addr)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("listen", slog.String("addr", addr), slog.Any("err", err))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
srv := http.Server{
|
||||||
|
Addr: addr,
|
||||||
|
Handler: httpmiddle.Logger(mux),
|
||||||
|
ReadTimeout: 15 * time.Second,
|
||||||
|
WriteTimeout: 15 * time.Second,
|
||||||
|
BaseContext: func(l net.Listener) context.Context { return ctx },
|
||||||
|
}
|
||||||
|
go func() {
|
||||||
|
slog.Info("HTTP", slog.Any("addr", l.Addr()))
|
||||||
|
err := srv.Serve(l)
|
||||||
|
if err == http.ErrServerClosed {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
slog.Error("HTTP server closed", slog.Any("err", err))
|
||||||
|
}()
|
||||||
|
|
||||||
|
if client != nil {
|
||||||
|
if err := handler.SyncCommands(client, commands, nil, rest.WithCtx(ctx)); err != nil {
|
||||||
|
slog.Error("syncing commands", slog.Any("err", err))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
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()
|
||||||
|
if client != nil {
|
||||||
|
client.Close(ctx)
|
||||||
|
}
|
||||||
|
if err := srv.Shutdown(ctx); err != nil {
|
||||||
|
slog.Error("HTTP API shutdown", slog.Any("err", err))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
discord.ApplicationCommandOptionBool{
|
||||||
|
Name: "share",
|
||||||
|
Description: "Share the skill info",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
func dataroute[T any](ctx context.Context, db *sqlitex.Pool, f func(context.Context, *sqlitex.Pool) ([]T, error)) http.HandlerFunc {
|
||||||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
data, err := f(ctx, db)
|
||||||
|
if err != nil {
|
||||||
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
b, err := json.Marshal(data)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
w.Header().Set("Content-Length", strconv.Itoa(len(b)))
|
||||||
|
if _, err := w.Write(b); err != nil {
|
||||||
|
slog.Error("writing response", slog.Any("err", err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"log/slog"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/disgoorg/disgo/discord"
|
||||||
|
"github.com/disgoorg/disgo/handler"
|
||||||
|
|
||||||
|
"git.sunturtle.xyz/zephyr/horse"
|
||||||
|
"git.sunturtle.xyz/zephyr/horse/cmd/horsebot/autocomplete"
|
||||||
|
)
|
||||||
|
|
||||||
|
type skillServer struct {
|
||||||
|
skills map[horse.SkillID]horse.Skill
|
||||||
|
byName map[string]horse.SkillID
|
||||||
|
groups map[horse.SkillGroupID]horse.SkillGroup
|
||||||
|
autocom autocomplete.Set[discord.AutocompleteChoice]
|
||||||
|
}
|
||||||
|
|
||||||
|
func newSkillServer(skills []horse.Skill, groups []horse.SkillGroup) *skillServer {
|
||||||
|
s := skillServer{
|
||||||
|
skills: make(map[horse.SkillID]horse.Skill, len(skills)),
|
||||||
|
byName: make(map[string]horse.SkillID, len(skills)),
|
||||||
|
groups: make(map[horse.SkillGroupID]horse.SkillGroup, len(groups)),
|
||||||
|
}
|
||||||
|
for _, skill := range skills {
|
||||||
|
s.skills[skill.ID] = skill
|
||||||
|
id := strconv.Itoa(int(skill.ID))
|
||||||
|
switch {
|
||||||
|
case skill.UniqueOwner == "":
|
||||||
|
s.byName[skill.Name] = skill.ID
|
||||||
|
s.autocom.Add(skill.Name, discord.AutocompleteChoiceString{Name: skill.Name, Value: id})
|
||||||
|
case skill.Rarity >= 3:
|
||||||
|
s.byName[skill.Name] = skill.ID
|
||||||
|
s.autocom.Add(skill.Name, discord.AutocompleteChoiceString{Name: skill.Name, Value: id})
|
||||||
|
s.autocom.Add(skill.UniqueOwner, discord.AutocompleteChoiceString{Name: "Unique: " + skill.UniqueOwner, Value: id})
|
||||||
|
default:
|
||||||
|
name := skill.Name + " (Inherited)"
|
||||||
|
s.byName[name] = skill.ID
|
||||||
|
s.autocom.Add(name, discord.AutocompleteChoiceString{Name: name, Value: id})
|
||||||
|
s.autocom.Add(skill.UniqueOwner, discord.AutocompleteChoiceString{Name: "Inherited unique: " + skill.UniqueOwner, Value: id})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, g := range groups {
|
||||||
|
s.groups[g.ID] = g
|
||||||
|
}
|
||||||
|
return &s
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *skillServer) slash(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(s.skills[horse.SkillID(id)].ID)
|
||||||
|
}
|
||||||
|
if id == 0 {
|
||||||
|
// Either we weren't given a number or the number doesn't match any skill ID.
|
||||||
|
v := s.byName[q]
|
||||||
|
if v == 0 {
|
||||||
|
// No such skill.
|
||||||
|
m := discord.MessageCreate{
|
||||||
|
Content: "No such skill.",
|
||||||
|
Flags: discord.MessageFlagEphemeral,
|
||||||
|
}
|
||||||
|
return e.CreateMessage(m)
|
||||||
|
}
|
||||||
|
id = int64(v)
|
||||||
|
}
|
||||||
|
m := discord.MessageCreate{
|
||||||
|
Components: []discord.LayoutComponent{s.render(horse.SkillID(id))},
|
||||||
|
Flags: discord.MessageFlagIsComponentsV2,
|
||||||
|
}
|
||||||
|
if !data.Bool("share") {
|
||||||
|
m.Flags |= discord.MessageFlagEphemeral
|
||||||
|
}
|
||||||
|
return e.CreateMessage(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *skillServer) autocomplete(e *handler.AutocompleteEvent) error {
|
||||||
|
q := e.Data.String("query")
|
||||||
|
opts := s.autocom.Find(nil, q)
|
||||||
|
return e.AutocompleteResult(opts[:min(len(opts), 25)])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *skillServer) button(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{s.render(horse.SkillID(id))},
|
||||||
|
}
|
||||||
|
return e.UpdateMessage(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *skillServer) menu(data discord.SelectMenuInteractionData, e *handler.ComponentEvent) error {
|
||||||
|
d, ok := data.(discord.StringSelectMenuInteractionData)
|
||||||
|
if !ok {
|
||||||
|
return fmt.Errorf("wrong select menu type %T", data)
|
||||||
|
}
|
||||||
|
if len(d.Values) != 1 {
|
||||||
|
return fmt.Errorf("wrong number of values: %q", d.Values)
|
||||||
|
}
|
||||||
|
id, err := strconv.ParseInt(d.Values[0], 10, 32)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
m := discord.MessageUpdate{
|
||||||
|
Components: &[]discord.LayoutComponent{s.render(horse.SkillID(id))},
|
||||||
|
}
|
||||||
|
return e.UpdateMessage(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *skillServer) render(id horse.SkillID) discord.ContainerComponent {
|
||||||
|
skill, ok := s.skills[id]
|
||||||
|
if !ok {
|
||||||
|
slog.Error("invalid skill id", slog.Int("id", int(id)))
|
||||||
|
return discord.NewContainer(discord.NewTextDisplayf("invalid skill ID %v made it to render", id))
|
||||||
|
}
|
||||||
|
|
||||||
|
top := "### " + skill.Name
|
||||||
|
if skill.UniqueOwner != "" {
|
||||||
|
top += "\n-# " + skill.UniqueOwner
|
||||||
|
}
|
||||||
|
r := discord.NewContainer(
|
||||||
|
discord.NewTextDisplay(top),
|
||||||
|
discord.NewSmallSeparator(),
|
||||||
|
)
|
||||||
|
var skilltype string
|
||||||
|
switch {
|
||||||
|
case skill.Rarity == 3, skill.Rarity == 4, skill.Rarity == 5:
|
||||||
|
// unique of various star levels
|
||||||
|
r.AccentColor = 0xaca4d4
|
||||||
|
skilltype = "Unique Skill"
|
||||||
|
case skill.UniqueOwner != "":
|
||||||
|
r.AccentColor = 0xcccccc
|
||||||
|
skilltype = "Inherited Unique"
|
||||||
|
case skill.Rarity == 2:
|
||||||
|
// rare (gold)
|
||||||
|
r.AccentColor = 0xd7c25b
|
||||||
|
skilltype = "Rare Skill"
|
||||||
|
case skill.GroupRate == -1:
|
||||||
|
// negative (purple) skill
|
||||||
|
r.AccentColor = 0x9151d4
|
||||||
|
skilltype = "Negative Skill"
|
||||||
|
case !skill.WitCheck:
|
||||||
|
// should be passive (green)
|
||||||
|
r.AccentColor = 0x66ae1c
|
||||||
|
skilltype = "Passive Skill"
|
||||||
|
case isDebuff(skill):
|
||||||
|
// debuff (red)
|
||||||
|
r.AccentColor = 0xe34747
|
||||||
|
skilltype = "Debuff Skill"
|
||||||
|
case skill.Rarity == 1:
|
||||||
|
// common (white)
|
||||||
|
r.AccentColor = 0xcccccc
|
||||||
|
skilltype = "Common Skill"
|
||||||
|
}
|
||||||
|
text := make([]string, 0, 3)
|
||||||
|
abils := make([]string, 0, 3)
|
||||||
|
for _, act := range skill.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 or instantaneous, e.g. recoveries; do nothing
|
||||||
|
case act.Duration >= 500e4:
|
||||||
|
t = "Permanent "
|
||||||
|
case act.DurScale == horse.DurationDirect:
|
||||||
|
t = "For " + act.Duration.String() + "s, "
|
||||||
|
default:
|
||||||
|
t = "For " + act.Duration.String() + "s " + act.DurScale.String() + ", "
|
||||||
|
}
|
||||||
|
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, skill.SPCost, skill.GradeValue, skill.ID)
|
||||||
|
r.Components = append(r.Components, discord.NewSmallSeparator(), l)
|
||||||
|
rel := make([]horse.Skill, 0, 4)
|
||||||
|
group := s.groups[skill.Group]
|
||||||
|
for _, id := range [...]horse.SkillID{group.Skill1, group.Skill2, group.Skill3, group.SkillBad} {
|
||||||
|
if id != 0 {
|
||||||
|
rel = append(rel, s.skills[id])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(rel) > 1 {
|
||||||
|
opts := make([]discord.StringSelectMenuOption, 0, 4)
|
||||||
|
for _, rs := range rel {
|
||||||
|
name := rs.Name
|
||||||
|
emoji := "⚪"
|
||||||
|
switch {
|
||||||
|
case rs.Rarity == 3, rs.Rarity == 4, rs.Rarity == 5:
|
||||||
|
emoji = "🟠"
|
||||||
|
case rs.UniqueOwner != "":
|
||||||
|
name += " (Inherited)"
|
||||||
|
case rs.Rarity == 2:
|
||||||
|
emoji = "🟡"
|
||||||
|
case rs.GroupRate == -1:
|
||||||
|
emoji = "🟣"
|
||||||
|
}
|
||||||
|
b := discord.NewStringSelectMenuOption(name, strconv.Itoa(int(rs.ID))).WithEmoji(discord.NewComponentEmoji(emoji))
|
||||||
|
if rs.ID == skill.ID {
|
||||||
|
b = b.WithDefault(true)
|
||||||
|
}
|
||||||
|
opts = append(opts, b)
|
||||||
|
}
|
||||||
|
row := discord.NewActionRow(discord.NewStringSelectMenu("/skill/swap", "Related skills", opts...))
|
||||||
|
r.Components = append(r.Components, row)
|
||||||
|
}
|
||||||
|
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
|
||||||
|
}
|
||||||
@@ -0,0 +1,185 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"image"
|
||||||
|
"image/png"
|
||||||
|
"log/slog"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"strconv"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/gen2brain/avif"
|
||||||
|
"golang.org/x/image/draw"
|
||||||
|
"golang.org/x/sync/errgroup"
|
||||||
|
"zombiezen.com/go/sqlite"
|
||||||
|
"zombiezen.com/go/sqlite/sqlitex"
|
||||||
|
)
|
||||||
|
|
||||||
|
func saveImgs(ctx context.Context, db *sqlitex.Pool, out string) {
|
||||||
|
skill, err := skillIconIDs(ctx, db)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("skills", slog.Any("err", err))
|
||||||
|
}
|
||||||
|
chara, err := charaIDs(ctx, db)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("characters", slog.Any("err", err))
|
||||||
|
}
|
||||||
|
rank, err := rankIDs(ctx, db)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("ranks", slog.Any("err", err))
|
||||||
|
}
|
||||||
|
supps, err := suppIDs(ctx, db)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("supports", slog.Any("err", err))
|
||||||
|
}
|
||||||
|
|
||||||
|
g, ctx := errgroup.WithContext(ctx)
|
||||||
|
tick := time.NewTicker(250 * time.Millisecond)
|
||||||
|
idouts(ctx, g, tick, skill, filepath.Join(out, "skill"), "https://media.gametora.com/umamusume/skills/icon/%d.png", image.Pt(64, 64), image.Pt(32, 32), image.Pt(16, 16))
|
||||||
|
idouts(ctx, g, tick, chara, filepath.Join(out, "chara"), "https://gametora.com/images/umamusume/characters/icons/chr_icon_%d.png", image.Pt(256, 256), image.Pt(64, 64), image.Pt(32, 32), image.Pt(16, 16))
|
||||||
|
idouts(ctx, g, tick, rank, filepath.Join(out, "rank"), "https://media.gametora.com/umamusume/ui/rank/%02d.png", image.Pt(128, 128), image.Pt(64, 64), image.Pt(32, 32), image.Pt(16, 16))
|
||||||
|
idouts(ctx, g, tick, rank, filepath.Join(out, "rank", "simple"), "https://media.gametora.com/umamusume/ui/rank/simple/%02d.png", image.Pt(50, 50), image.Pt(32, 32), image.Pt(16, 16))
|
||||||
|
idouts(ctx, g, tick, supps, filepath.Join(out, "support"), "https://gametora.com/images/umamusume/supports/support_card_s_%d.png", image.Pt(128, 128), image.Pt(64, 64), image.Pt(32, 32))
|
||||||
|
idouts(ctx, g, tick, []int32{0, 1, 2, 3, 4, 5, 6}, filepath.Join(out, "support", "type"), "https://gametora.com/images/umamusume/icons/utx_ico_obtain_%02d.png", image.Pt(70, 70), image.Pt(35, 35), image.Pt(16, 16))
|
||||||
|
if err := g.Wait(); err != nil {
|
||||||
|
slog.Error("output", slog.Any("err", err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// load scans all results of sql and appends them to r.
|
||||||
|
func load[T any](ctx context.Context, db *sqlitex.Pool, r []T, sql string, row func(*sqlite.Stmt) T) ([]T, error) {
|
||||||
|
conn, err := db.Take(ctx)
|
||||||
|
defer db.Put(conn)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
stmt, err := conn.Prepare(sql)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
for {
|
||||||
|
ok, err := stmt.Step()
|
||||||
|
if err != nil {
|
||||||
|
return r, err
|
||||||
|
}
|
||||||
|
if !ok {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
r = append(r, row(stmt))
|
||||||
|
}
|
||||||
|
return r, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func skillIconIDs(ctx context.Context, db *sqlitex.Pool) ([]int32, error) {
|
||||||
|
return load(ctx, db, nil, "SELECT DISTINCT icon_id FROM skill_data", func(s *sqlite.Stmt) int32 {
|
||||||
|
return s.ColumnInt32(0)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func charaIDs(ctx context.Context, db *sqlitex.Pool) ([]int32, error) {
|
||||||
|
return load(ctx, db, nil, "SELECT id FROM chara_data", func(s *sqlite.Stmt) int32 {
|
||||||
|
return s.ColumnInt32(0)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func rankIDs(ctx context.Context, db *sqlitex.Pool) ([]int32, error) {
|
||||||
|
return load(ctx, db, nil, "SELECT id-1 FROM single_mode_rank", func(s *sqlite.Stmt) int32 {
|
||||||
|
return s.ColumnInt32(0)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func suppIDs(ctx context.Context, db *sqlitex.Pool) ([]int32, error) {
|
||||||
|
return load(ctx, db, nil, "SELECT id FROM support_card_data", func(s *sqlite.Stmt) int32 {
|
||||||
|
return s.ColumnInt32(0)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
var pngenc = &png.Encoder{CompressionLevel: png.BestCompression}
|
||||||
|
|
||||||
|
func idouts(ctx context.Context, g *errgroup.Group, tick *time.Ticker, ids []int32, p, urlf string, sizes ...image.Point) {
|
||||||
|
for _, id := range ids {
|
||||||
|
g.Go(func() error {
|
||||||
|
n := strconv.Itoa(int(id))
|
||||||
|
p := filepath.Join(p, n)
|
||||||
|
_, err := os.Stat(p)
|
||||||
|
if !errors.Is(err, os.ErrNotExist) {
|
||||||
|
slog.DebugContext(ctx, "exists", slog.String("path", p))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if err := os.MkdirAll(p, 0777); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
url := fmt.Sprintf(urlf, id)
|
||||||
|
select {
|
||||||
|
case <-ctx.Done():
|
||||||
|
return ctx.Err()
|
||||||
|
case <-tick.C: // continue on
|
||||||
|
}
|
||||||
|
img, err := dlimg(ctx, url)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
slog.InfoContext(ctx, "resize", slog.String("url", url))
|
||||||
|
rs := resize(img, sizes...)
|
||||||
|
for _, r := range rs {
|
||||||
|
g.Go(func() error {
|
||||||
|
m := r.Bounds().Max
|
||||||
|
o := filepath.Join(p, fmt.Sprintf("%dx%d.png", m.X, m.Y))
|
||||||
|
slog.InfoContext(ctx, "write", slog.String("path", o))
|
||||||
|
f, err := os.Create(o)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
return pngenc.Encode(f, r)
|
||||||
|
})
|
||||||
|
g.Go(func() error {
|
||||||
|
m := r.Bounds().Max
|
||||||
|
o := filepath.Join(p, fmt.Sprintf("%dx%d.avif", m.X, m.Y))
|
||||||
|
slog.InfoContext(ctx, "write", slog.String("path", o))
|
||||||
|
f, err := os.Create(o)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
return avif.Encode(f, r)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func dlimg(ctx context.Context, url string) (image.Image, error) {
|
||||||
|
slog.InfoContext(ctx, "download", slog.String("url", url))
|
||||||
|
ctx, stop := context.WithTimeout(ctx, 5*time.Second)
|
||||||
|
defer stop()
|
||||||
|
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
resp, err := http.DefaultClient.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
|
slog.InfoContext(ctx, "decode", slog.String("url", url))
|
||||||
|
img, _, err := image.Decode(resp.Body)
|
||||||
|
return img, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func resize(img image.Image, sizes ...image.Point) []image.Image {
|
||||||
|
rs := make([]image.Image, 0, len(sizes))
|
||||||
|
for _, sz := range sizes {
|
||||||
|
d := image.NewNRGBA(image.Rectangle{Min: image.Point{}, Max: sz})
|
||||||
|
draw.CatmullRom.Scale(d, d.Bounds(), img, img.Bounds(), draw.Src, nil)
|
||||||
|
rs = append(rs, d)
|
||||||
|
}
|
||||||
|
return rs
|
||||||
|
}
|
||||||
+137122
File diff suppressed because it is too large
Load Diff
+190767
File diff suppressed because it is too large
Load Diff
+227
-8
@@ -6,12 +6,17 @@ This file is my notes from exploring the database.
|
|||||||
|
|
||||||
# text_data categories
|
# text_data categories
|
||||||
|
|
||||||
- 6 is character names, 4 is [variant] character name, 5 is [variant], 14 is variant
|
- 6 is character names, 4 is [variant] character name, 5 is [variant], 14 is clothing names
|
||||||
- 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?
|
||||||
|
- 119 is scenario full titles (e.g. The Beginning: URA Finale), 120 is scenario descriptions, 237 is scenario names (e.g. URA Finale)
|
||||||
|
- 130 is epithet names, 131 is epithet descriptions
|
||||||
|
|
||||||
|
in the decomp, text data categories are named in `public enum MasterString.Category`.
|
||||||
|
some categories seem to be missing, though.
|
||||||
|
|
||||||
# succession factor (sparks)
|
# succession factor (sparks)
|
||||||
|
|
||||||
@@ -23,6 +28,11 @@ factor_type:
|
|||||||
- 5 race
|
- 5 race
|
||||||
- 4 skill
|
- 4 skill
|
||||||
- 6 scenario
|
- 6 scenario
|
||||||
|
- 7 carnival bonus
|
||||||
|
- 10 surface gene (white, on jp)
|
||||||
|
- 8 distance gene (white)
|
||||||
|
- 11 style gene (white)
|
||||||
|
- 9 hidden (white, for things like many wins in west japan, summer sprint series, &c.)
|
||||||
- 3 unique
|
- 3 unique
|
||||||
|
|
||||||
target_type:
|
target_type:
|
||||||
@@ -31,6 +41,8 @@ target_type:
|
|||||||
- 3 power
|
- 3 power
|
||||||
- 4 guts
|
- 4 guts
|
||||||
- 5 wit
|
- 5 wit
|
||||||
|
- 6 skill points
|
||||||
|
- 7 random stat; value 1 is amount, value 2 is always 1?
|
||||||
- 11 turf; value 1 is number of levels (1 or 2), value 2 is 0
|
- 11 turf; value 1 is number of levels (1 or 2), value 2 is 0
|
||||||
- 12 dirt
|
- 12 dirt
|
||||||
- 21 front
|
- 21 front
|
||||||
@@ -41,16 +53,21 @@ target_type:
|
|||||||
- 32 mile
|
- 32 mile
|
||||||
- 33 medium
|
- 33 medium
|
||||||
- 34 long
|
- 34 long
|
||||||
- 41 is skill; value 1 is skill id, value 2 is hint level (1-5)
|
- 41 skill; value 1 is skill id, value 2 is hint level (1-5)
|
||||||
|
- 51 carnival bonus; value 1 is skill id, value 2 is 1
|
||||||
|
- 61 speed cap; value 1 is presumably amount but the numbers are very small, 1-4; value 2 is 0
|
||||||
|
- 62 stam cap
|
||||||
|
- 63 power cap
|
||||||
|
- 64 guts cap
|
||||||
|
- 65 wit cap
|
||||||
|
|
||||||
|
grade is 2 for unique sparks and 1 otherwise.
|
||||||
|
|
||||||
every possible result has a row in succession_factor_effect.
|
every possible result has a row in succession_factor_effect.
|
||||||
effect_id distinguishes possibilities; factors with multiple effects (race and scenario sparks) have multiple rows with equal effect_id.
|
effect_id distinguishes possibilities; factors with multiple effects (race and scenario sparks) have multiple rows with equal effect_id.
|
||||||
effect_group_id determines the pmf, but no tables have non-empty joins with the same column name, so the distribution values are mystery.
|
effect_group_id determines the pmf, but no tables have non-empty joins with the same column name, so the distribution values are mystery.
|
||||||
even searching for 51 and 52 (effect group ids for 1\* and 2\* race and scenario sparks) on consecutive lines gives nothing.
|
even searching for 51 and 52 (effect group ids for 1\* and 2\* race and scenario sparks) on consecutive lines gives nothing.
|
||||||
|
|
||||||
sf.grade = 1 unless it is a unique (green) spark, then sf.grade = 2.
|
|
||||||
=> sf.grade = 2 iff sf.factor_type = 3
|
|
||||||
|
|
||||||
getting all interesting spark data, fully expanded with all effects:
|
getting all interesting spark data, fully expanded with all effects:
|
||||||
```sql
|
```sql
|
||||||
WITH spark AS (
|
WITH spark AS (
|
||||||
@@ -179,12 +196,98 @@ target types:
|
|||||||
- 22 specific character, target value is character id
|
- 22 specific character, target value is character id
|
||||||
- 23 other who triggered the skill
|
- 23 other who triggered the skill
|
||||||
|
|
||||||
TODO target types only in jp: 2, 7, 11, 22, 23
|
|
||||||
|
|
||||||
ability_value_usage can be 1 for plain or 2-6 for aoharu stat skill stat scaling
|
ability_value_usage can be 1 for plain or 2-6 for aoharu stat skill stat scaling
|
||||||
|
|
||||||
seems to be activate_lot = 1 means wit check, 0 means guaranteed
|
seems to be activate_lot = 1 means wit check, 0 means guaranteed
|
||||||
|
|
||||||
|
tag_id is a slash-separated list of numeric IDs that roughly describe all effects relevant to the skill.
|
||||||
|
- 101..104 style front, pace, late, end
|
||||||
|
- 201..204 distance sprint, mile, medium, long
|
||||||
|
- 301..303 timing early, mid, late race
|
||||||
|
- 401 affects speed stat or target speed
|
||||||
|
- 402 affects stamina stat or hp
|
||||||
|
- 403 affects power stat or acceleration
|
||||||
|
- 404 affects guts stat
|
||||||
|
- 405 affects wit stat or vision
|
||||||
|
- 406 is a debuff of any type, or is a main story self-debuff (creeping anxiety, blatant fear), or is Behold Thine Emperor's Divine Might (both own unique and inherited versions are tagged only 406??)
|
||||||
|
- 407 modifies gate delay
|
||||||
|
- 501..502 turf/dirt
|
||||||
|
- 801..812 scenario skill
|
||||||
|
|
||||||
|
600 series applies to skills available in global but are only used in jp.
|
||||||
|
- 601 ground condition passive
|
||||||
|
- 602 weather passive
|
||||||
|
- 603 season passive
|
||||||
|
- 604 race track passive
|
||||||
|
- 605 time of day passive
|
||||||
|
- 606 exchange race passive (kawasaki, funabashi, morioka, ooi)
|
||||||
|
- 607 distance passive (non/standard)
|
||||||
|
- 608 track direction or corner count passive
|
||||||
|
- 609 gate position passive
|
||||||
|
- 610 ground type passive
|
||||||
|
- 611 popularity passive
|
||||||
|
- 612 running style passive
|
||||||
|
- 613 passive depending on other horses' styles or skills
|
||||||
|
- 614 base stat threshold passive
|
||||||
|
- 615 mood passive
|
||||||
|
|
||||||
|
unrelated, query to get all condition types:
|
||||||
|
```sql
|
||||||
|
WITH RECURSIVE condition AS (
|
||||||
|
SELECT DISTINCT precondition_1 AS c FROM skill_data
|
||||||
|
UNION
|
||||||
|
SELECT DISTINCT condition_1 AS c FROM skill_data
|
||||||
|
UNION
|
||||||
|
SELECT DISTINCT precondition_2 AS c FROM skill_data
|
||||||
|
UNION
|
||||||
|
SELECT DISTINCT condition_2 AS c FROM skill_data
|
||||||
|
), disj AS (
|
||||||
|
SELECT
|
||||||
|
IIF(INSTR(c, '@') != 0, SUBSTR(c, 1, INSTR(c, '@')-1), c) AS c,
|
||||||
|
IIF(INSTR(c, '@') != 0, SUBSTR(c, 1 + INSTR(c, '@')), '') AS rest
|
||||||
|
FROM condition
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
IIF(INSTR(rest, '@') != 0, SUBSTR(rest, 1, INSTR(rest, '@')-1), rest) AS c,
|
||||||
|
IIF(INSTR(rest, '@') != 0, SUBSTR(rest, 1 + INSTR(rest, '@')), '') AS rest
|
||||||
|
FROM disj
|
||||||
|
WHERE rest != ''
|
||||||
|
), term AS (
|
||||||
|
SELECT
|
||||||
|
IIF(INSTR(c, '&') != 0, SUBSTR(c, 1, INSTR(c, '&')-1), c) AS term,
|
||||||
|
IIF(INSTR(c, '&') != 0, SUBSTR(c, 1 + INSTR(c, '&')), '') AS rest
|
||||||
|
FROM disj
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
IIF(INSTR(rest, '&') != 0, SUBSTR(rest, 1, INSTR(rest, '&')-1), rest) AS term,
|
||||||
|
IIF(INSTR(rest, '&') != 0, SUBSTR(rest, 1 + INSTR(rest, '&')), '') AS rest
|
||||||
|
FROM term
|
||||||
|
WHERE rest != ''
|
||||||
|
), op AS (
|
||||||
|
SELECT
|
||||||
|
term,
|
||||||
|
CASE
|
||||||
|
WHEN INSTR(term, '==') != 0 THEN '=='
|
||||||
|
WHEN INSTR(term, '!=') != 0 THEN '!='
|
||||||
|
WHEN INSTR(term, '<=') != 0 THEN '<='
|
||||||
|
WHEN INSTR(term, '>=') != 0 THEN '>='
|
||||||
|
WHEN INSTR(term, '<') != 0 THEN '<'
|
||||||
|
WHEN INSTR(term, '>') != 0 THEN '>'
|
||||||
|
END AS op
|
||||||
|
FROM term WHERE term != ''
|
||||||
|
), type_op_arg AS (
|
||||||
|
SELECT DISTINCT
|
||||||
|
term,
|
||||||
|
SUBSTR(term, 1, INSTR(term, op) - 1) AS "type",
|
||||||
|
op,
|
||||||
|
CAST(SUBSTR(term, INSTR(term, op) + LENGTH(op)) AS INTEGER) AS arg
|
||||||
|
FROM op
|
||||||
|
)
|
||||||
|
SELECT DISTINCT CONCAT(type, op), arg FROM type_op_arg
|
||||||
|
```
|
||||||
|
|
||||||
|
final select can be adjusted to get different info, but type+op together seems most useful
|
||||||
|
|
||||||
# races
|
# races
|
||||||
|
|
||||||
- group 1, grade: g1 100, g2 200, g3 300, op 400, pre-op 700
|
- group 1, grade: g1 100, g2 200, g3 300, op 400, pre-op 700
|
||||||
@@ -193,6 +296,25 @@ 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.
|
||||||
|
|
||||||
|
race_course_set defines the racecourse, e.g. hanshin 1600 turf, that a given race occurs on.
|
||||||
|
notably, stat thresholds are defined here via join to race_course_set_status, rather than in course event data.
|
||||||
|
|
||||||
# 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
|
||||||
@@ -200,6 +322,103 @@ single_mode_wins_saddle defines titles (classic triple crown, tenno sweep, &c.)
|
|||||||
- card_talent_upgrade has costs to increase potential level, but it doesn't seem to have skill sets
|
- card_talent_upgrade has costs to increase potential level, but it doesn't seem to have skill sets
|
||||||
- card_talent_hint_upgrade has costs to raise hint levels, but it's actually universal, only six rows
|
- card_talent_hint_upgrade has costs to raise hint levels, but it's actually universal, only six rows
|
||||||
- single_mode_route_race is career goals (not only races)
|
- single_mode_route_race is career goals (not only races)
|
||||||
|
- available_skill_set has starting skills including those unlocked by potential level given under need_rank (0 for pl1, 2 for pl2)
|
||||||
|
- single_mode_special_chara is scenario links
|
||||||
|
|
||||||
|
# gl
|
||||||
|
|
||||||
|
single_mode_live_song_list has the song list for lives ha ha.
|
||||||
|
this is defined from the perspective of bonuses they grant when you have them, not the shop per se.
|
||||||
|
- text_data category for song names is 210, look up by live_id; for post-concert effect text, category 208 indexed by song list id
|
||||||
|
- command_id and live_id are always equal
|
||||||
|
- level is 1 for all songs except the two instances of girls' legend u
|
||||||
|
- master_bonus_content_text_id corresponds to text_data categories 207 for pickup effect text and 209 for song name
|
||||||
|
- live_bonus_type is 1 for specialty prio, 2 for chain frequency, 3 for fb
|
||||||
|
- girls' legend u is defined twice as ids 22 and 24
|
||||||
|
|
||||||
|
costs are in single_mode_live_square.
|
||||||
|
- square_type is 1 for stat up, 2 for skill up, 3 for energy up, 4 for live
|
||||||
|
- perf_type_n is token type: 1 for dance, 2 for passion, 3 for vocals, 4 for visuals, 5 for composure
|
||||||
|
- perf_value_n is number of tokens
|
||||||
|
|
||||||
|
immediate bonuses are in single_mode_live_master_bonus.
|
||||||
|
- master_bonus_type is 1 for stat up, 2 for skill hint, 3 for energy up, 4 for song
|
||||||
|
- master_bonus_type_value is 1 for type 1, live id for type 4, 0 otherwise
|
||||||
|
- master_bonus_gain_type_n is 1 for stat, 2 for skill hint, 3 for energy, 5 for permanent training bonus
|
||||||
|
+ 1 for stat: then master_bonus_gain_value_n_1 is 1-5 for stat id or 6 for sp, n_2 is 1 for fixed or 2 for random (not actually in the game), n_3 is lower bound on gain, n_4 is 0 for fixed or upper bound for random
|
||||||
|
+ 2 for skill hint: then gain_value_n_1 is 3(*), n_2 is skill tag, n_3 is hint level
|
||||||
|
+ 3 for energy: then gain_value_n_1 is amount
|
||||||
|
+ 5 for permanent training bonus: then gain_value_n_1 is stat id (6 for sp), n_2 is amount
|
||||||
|
(*) MasterSingleModeLiveMasterBonus.SingleModeLiveMasterBonus.GainSkillHintTypeEnum defines values of Random = 1 and SkillId = 2, but they are unused in the db.
|
||||||
|
|
||||||
|
there is some ostensibly unused data.
|
||||||
|
- master bonus ids 12001-12206 grant random amounts of stats
|
||||||
|
- id 20000 corresponds to "Group Lesson" "Skill hint appropriate for aptitude"
|
||||||
|
|
||||||
|
# lobby conversations!!!
|
||||||
|
|
||||||
|
table is home_story_trigger.
|
||||||
|
|
||||||
|
pos_id values:
|
||||||
|
- 110 right side, toward the front
|
||||||
|
- 120 same, but two characters
|
||||||
|
- 130 same, but three characters
|
||||||
|
- 210 left side table
|
||||||
|
- 220
|
||||||
|
- 310 center back seat
|
||||||
|
- 410 center posters
|
||||||
|
- 420
|
||||||
|
- 430
|
||||||
|
- 510 left school map
|
||||||
|
- 520
|
||||||
|
- 530
|
||||||
|
|
||||||
|
num is how many characters are involved, but also can just check chara_id_{1,2,3} for nonzero.
|
||||||
|
|
||||||
|
unsure what condition_type is.
|
||||||
|
values of 2 and 3 always have two or three characters, and values of 4 (jp only) always have three, but 0 and 1 can have any number.
|
||||||
|
there's no requirement for stories like having a horse at all, much less an affinity level.
|
||||||
|
|
||||||
|
gallery_chara_id is the character whose conversation it is; chara_id_{1,2,3} are the characters involved.
|
||||||
|
gallery_chara_id is always one of the three, but it can be any one of the three.
|
||||||
|
disp_order then is the conversation number within their gallery.
|
||||||
|
|
||||||
|
getting all conversation data:
|
||||||
|
```sql
|
||||||
|
WITH chara_name AS (
|
||||||
|
SELECT "index" AS id, "text" AS name
|
||||||
|
FROM text_data
|
||||||
|
WHERE category = 6
|
||||||
|
), convo_loc_names AS (
|
||||||
|
SELECT 110 AS pos_id, 'right side front' AS name UNION ALL
|
||||||
|
SELECT 120 AS pos_id, 'right side front' AS name UNION ALL
|
||||||
|
SELECT 130 AS pos_id, 'right side front' AS name UNION ALL
|
||||||
|
SELECT 210 AS pos_id, 'left side table' AS name UNION ALL
|
||||||
|
SELECT 220 AS pos_id, 'left side table' AS name UNION ALL
|
||||||
|
SELECT 310 AS pos_id, 'center back seat' AS name UNION ALL
|
||||||
|
SELECT 410 AS pos_id, 'center posters' AS name UNION ALL
|
||||||
|
SELECT 420 AS pos_id, 'center posters' AS name UNION ALL
|
||||||
|
SELECT 430 AS pos_id, 'center posters' AS name UNION ALL
|
||||||
|
SELECT 510 AS pos_id, 'left side school map' AS name UNION ALL
|
||||||
|
SELECT 520 AS pos_id, 'left side school map' AS name UNION ALL
|
||||||
|
SELECT 530 AS pos_id, 'left side school map' AS name
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
n.name,
|
||||||
|
s.disp_order,
|
||||||
|
l.name,
|
||||||
|
c1.name,
|
||||||
|
c2.name,
|
||||||
|
c3.name,
|
||||||
|
s.condition_type
|
||||||
|
FROM home_story_trigger s
|
||||||
|
LEFT JOIN chara_name n ON s.gallery_chara_id = n.id
|
||||||
|
LEFT JOIN chara_name c1 ON s.chara_id_1 = c1.id
|
||||||
|
LEFT JOIN chara_name c2 ON s.chara_id_2 = c2.id
|
||||||
|
LEFT JOIN chara_name c3 ON s.chara_id_3 = c3.id
|
||||||
|
LEFT JOIN convo_loc_names l ON s.pos_id = l.pos_id
|
||||||
|
ORDER BY s.gallery_chara_id, s.disp_order
|
||||||
|
```
|
||||||
|
|
||||||
# update diffs
|
# update diffs
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
// Code generated by "stringer -type DurScale -trimprefix Duration -linecomment"; DO NOT EDIT.
|
||||||
|
|
||||||
|
package horse
|
||||||
|
|
||||||
|
import "strconv"
|
||||||
|
|
||||||
|
func _() {
|
||||||
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||||
|
// Re-run the stringer command to generate them again.
|
||||||
|
var x [1]struct{}
|
||||||
|
_ = x[DurationDirect-1]
|
||||||
|
_ = x[DurationFrontDistance-2]
|
||||||
|
_ = x[DurationRemainingHP-3]
|
||||||
|
_ = x[DurationIncrementPass-4]
|
||||||
|
_ = x[DurationMidSideBlock-5]
|
||||||
|
_ = x[DurationRemainingHP2-7]
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
_DurScale_name_0 = "directlyscaling with distance from the frontscaling with remaining HPincreasing with each pass while activescaling with mid-race phase blocked side time"
|
||||||
|
_DurScale_name_1 = "scaling with remaining HP"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
_DurScale_index_0 = [...]uint8{0, 8, 44, 69, 107, 152}
|
||||||
|
)
|
||||||
|
|
||||||
|
func (i DurScale) String() string {
|
||||||
|
switch {
|
||||||
|
case 1 <= i && i <= 5:
|
||||||
|
i -= 1
|
||||||
|
return _DurScale_name_0[_DurScale_index_0[i]:_DurScale_index_0[i+1]]
|
||||||
|
case i == 7:
|
||||||
|
return _DurScale_name_1
|
||||||
|
default:
|
||||||
|
return "DurScale(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
go run ./horsegen "$@"
|
|
||||||
go generate ./horse/...
|
|
||||||
go fmt ./...
|
|
||||||
go test ./...
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import "os"
|
|
||||||
|
|
||||||
//go:generate go run ./horsegen
|
|
||||||
//go:generate go generate ./horse/...
|
|
||||||
//go:generate go fmt ./...
|
|
||||||
//go:generate go test ./...
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
os.Stderr.WriteString("go generate, not go run\n")
|
|
||||||
os.Exit(2)
|
|
||||||
}
|
|
||||||
@@ -1,22 +1,40 @@
|
|||||||
module git.sunturtle.xyz/zephyr/horse
|
module git.sunturtle.xyz/zephyr/horse
|
||||||
|
|
||||||
go 1.24.1
|
go 1.25.5
|
||||||
|
|
||||||
require (
|
require (
|
||||||
golang.org/x/sync v0.14.0
|
github.com/disgoorg/disgo v0.19.6
|
||||||
|
github.com/gen2brain/avif v0.6.0
|
||||||
|
github.com/go-chi/chi/v5 v5.3.1
|
||||||
|
github.com/google/go-cmp v0.7.0
|
||||||
|
github.com/junegunn/fzf v0.74.1
|
||||||
|
golang.org/x/image v0.44.0
|
||||||
|
golang.org/x/sync v0.22.0
|
||||||
zombiezen.com/go/sqlite v1.4.2
|
zombiezen.com/go/sqlite v1.4.2
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/disgoorg/godave v0.3.0 // indirect
|
||||||
|
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/ebitengine/purego v0.10.2 // indirect
|
||||||
github.com/google/uuid v1.6.0 // indirect
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/gorilla/websocket v1.5.3 // indirect
|
||||||
github.com/ncruces/go-strftime v0.1.9 // indirect
|
github.com/junegunn/go-shellwords v0.0.0-20250127100254-2aa3b3277741 // indirect
|
||||||
|
github.com/klauspost/compress v1.19.1 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.24 // indirect
|
||||||
|
github.com/ncruces/go-strftime v1.0.0 // indirect
|
||||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||||
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect
|
github.com/rivo/uniseg v0.4.7 // indirect
|
||||||
golang.org/x/sys v0.33.0 // indirect
|
github.com/sasha-s/go-csync v0.0.0-20240107134140-fcbab37b09ad // indirect
|
||||||
modernc.org/libc v1.65.7 // indirect
|
github.com/tetratelabs/wazero v1.12.0 // indirect
|
||||||
|
golang.org/x/crypto v0.54.0 // indirect
|
||||||
|
golang.org/x/sys v0.47.0 // indirect
|
||||||
|
golang.org/x/tools v0.48.0 // indirect
|
||||||
|
modernc.org/libc v1.74.3 // 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
|
||||||
modernc.org/sqlite v1.37.1 // indirect
|
modernc.org/sqlite v1.54.0 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,48 +1,93 @@
|
|||||||
|
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.6 h1:1xJQt6KZgiqvBOnjuziG1gE4Iqd0aJn8DNfE6eE+0qw=
|
||||||
|
github.com/disgoorg/disgo v0.19.6/go.mod h1:NnV63iw4lJdF1fnV0gX27XR43ZgRGqnL122svRMTgTE=
|
||||||
|
github.com/disgoorg/godave v0.3.0 h1:37F3ZuiMd8/EXeoCtTeE8iP2eT2nWsfEa4/ITwoKfe4=
|
||||||
|
github.com/disgoorg/godave v0.3.0/go.mod h1:OreAC3hpabr39bMVA+jwOVDq1EUPXH5A0XUBiZaDI1Y=
|
||||||
|
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/ebitengine/purego v0.10.2 h1:W809HbnvzAxgdm+aOvlSekrM16wGCdT/e76+9tS7gzE=
|
||||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/ebitengine/purego v0.10.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||||
|
github.com/gen2brain/avif v0.6.0 h1:/8WSgcU+IEF0jhKYsUZ/mzlziFuTeJFpIKBj2siTQps=
|
||||||
|
github.com/gen2brain/avif v0.6.0/go.mod h1:QgrYqdVE9y40PCfArK9VakcMIpYeDYpZmCSLkW6C1n8=
|
||||||
|
github.com/go-chi/chi/v5 v5.3.1 h1:3j4HZLGZQ3JpMCrPJF/Jl3mYJfWLKBfNJ6quurUGCf8=
|
||||||
|
github.com/go-chi/chi/v5 v5.3.1/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto=
|
||||||
|
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||||
|
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||||
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/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
|
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
|
||||||
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
|
||||||
|
github.com/junegunn/fzf v0.74.1 h1:rCGVdCSoOkfcfTxtxCO/vG2yceDjRlKSlv7IfCGkc/Y=
|
||||||
|
github.com/junegunn/fzf v0.74.1/go.mod h1:hKDkO8orBWT5VLIZOL8oyhxn7mRLXdGyu+gz1Ss58pU=
|
||||||
|
github.com/junegunn/go-shellwords v0.0.0-20250127100254-2aa3b3277741 h1:7dYDtfMDfKzjT+DVfIS4iqknSEKtZpEcXtu6vuaasHs=
|
||||||
|
github.com/junegunn/go-shellwords v0.0.0-20250127100254-2aa3b3277741/go.mod h1:6EILKtGpo5t+KLb85LNZLAF6P9LKp78hJI80PXMcn3c=
|
||||||
|
github.com/klauspost/compress v1.19.1 h1:VsB4HPswih7mmZ8WleSFQ75c/Ui1M4trX5oAsJnhSlk=
|
||||||
|
github.com/klauspost/compress v1.19.1/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
|
||||||
|
github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI=
|
||||||
|
github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
|
||||||
|
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
|
||||||
|
github.com/ncruces/go-strftime v1.0.0/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=
|
||||||
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM=
|
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||||
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8=
|
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||||
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
|
github.com/sasha-s/go-csync v0.0.0-20240107134140-fcbab37b09ad h1:qIQkSlF5vAUHxEmTbaqt1hkJ/t6skqEGYiMag343ucI=
|
||||||
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
|
github.com/sasha-s/go-csync v0.0.0-20240107134140-fcbab37b09ad/go.mod h1:/pA7k3zsXKdjjAiUhB5CjuKib9KJGCaLvZwtxGC8U0s=
|
||||||
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
|
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||||
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
github.com/tetratelabs/wazero v1.12.0 h1:DuWcpNu/FzgEXgGBDp8J1Spc+CWOvvtvVyjKlaZopYU=
|
||||||
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
github.com/tetratelabs/wazero v1.12.0/go.mod h1:LvKtzl2RqO4gyF27BiXU+nKAjcV8f38U+kP/q2vgxh0=
|
||||||
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
|
||||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
|
||||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
golang.org/x/image v0.44.0 h1:+tDekMZED9+LrtB3G5xzRggpVh9CARjZqROla3R3R+I=
|
||||||
golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc=
|
golang.org/x/image v0.44.0/go.mod h1:V8K3KE9KKKE+pLpQDOeN18w9oacNSvy1tDOirTu4xtY=
|
||||||
golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI=
|
golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk=
|
||||||
modernc.org/cc/v4 v4.26.1 h1:+X5NtzVBn0KgsBCBe+xkDC7twLb/jNVj9FPgiwSQO3s=
|
golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40=
|
||||||
modernc.org/cc/v4 v4.26.1/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0=
|
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
|
||||||
modernc.org/ccgo/v4 v4.28.0 h1:rjznn6WWehKq7dG4JtLRKxb52Ecv8OUGah8+Z/SfpNU=
|
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||||
modernc.org/ccgo/v4 v4.28.0/go.mod h1:JygV3+9AV6SmPhDasu4JgquwU81XAKLd3OKTUDNOiKE=
|
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
||||||
modernc.org/fileutil v1.3.1 h1:8vq5fe7jdtEvoCf3Zf9Nm0Q05sH6kGx0Op2CPx1wTC8=
|
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||||
modernc.org/fileutil v1.3.1/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc=
|
golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
|
||||||
|
golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
|
||||||
|
golang.org/x/tools v0.48.0 h1:3+hClM1aLL5mjMKm5ovokw9epgRXPuu2tILgismM6RE=
|
||||||
|
golang.org/x/tools v0.48.0/go.mod h1:08xX0orndb/F7jJxGDicx061tyd5pcMto75YMAXr6lk=
|
||||||
|
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.29.1 h1:MKgdCV3WykTSPqpVrnxdEDS0HEd2FHpKZDzxzU5LyeI=
|
||||||
|
modernc.org/cc/v4 v4.29.1/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI=
|
||||||
|
modernc.org/ccgo/v4 v4.34.6 h1:sBgfIwyN0TQ9C5hwIeuqyeAKyMWnbvj2fvpF4L11uzU=
|
||||||
|
modernc.org/ccgo/v4 v4.34.6/go.mod h1:SZ8YcN9NG7XVsQYdm6jYBvi8PQP1qi+kqB6OhjqI3Fk=
|
||||||
|
modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM=
|
||||||
|
modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU=
|
||||||
modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=
|
modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=
|
||||||
modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
|
modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
|
||||||
modernc.org/libc v1.65.7 h1:Ia9Z4yzZtWNtUIuiPuQ7Qf7kxYrxP1/jeHZzG8bFu00=
|
modernc.org/gc/v3 v3.1.4 h1:2g65LGVSmFQrXeITAw97x7hCRvZFcyE1uDP+7Vng7JI=
|
||||||
modernc.org/libc v1.65.7/go.mod h1:011EQibzzio/VX3ygj1qGFt5kMjP0lHb0qCW5/D/pQU=
|
modernc.org/gc/v3 v3.1.4/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY=
|
||||||
|
modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks=
|
||||||
|
modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI=
|
||||||
|
modernc.org/libc v1.74.3 h1:a4J+Z8aVaxPyjyxRAdJzw246PqpcFGvVPnfT/AuM5Ws=
|
||||||
|
modernc.org/libc v1.74.3/go.mod h1:4H7h/MJ8wnjL8RAbp9v3OXgnk22X7MouHIhDbvP3gj4=
|
||||||
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
|
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
|
||||||
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
|
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
|
||||||
modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
|
modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
|
||||||
modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
||||||
modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8=
|
modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg=
|
||||||
modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
|
modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
|
||||||
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
|
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
|
||||||
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
|
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
|
||||||
modernc.org/sqlite v1.37.1 h1:EgHJK/FPoqC+q2YBXg7fUmES37pCHFc97sI7zSayBEs=
|
modernc.org/sqlite v1.54.0 h1:JCxR4qwkJvOaqAoYcgDoO25Nc+ROg6EJ2LfBVzdrgog=
|
||||||
modernc.org/sqlite v1.37.1/go.mod h1:XwdRtsE1MpiBcL54+MbKcaDvcuej+IYSMfLN6gSKV8g=
|
modernc.org/sqlite v1.54.0/go.mod h1:4ntCLuNmnH8+GNqjka1wNg7KJd5/Hi5FYp8K+XQ7GZw=
|
||||||
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
|
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
|
||||||
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
|
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
|
||||||
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
|
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# horse
|
|
||||||
|
|
||||||
This directory contains manually written code and types on which the generated code depends.
|
|
||||||
|
|
||||||
The generated code is in ./global; other regions will follow the same convention once they are supported.
|
|
||||||
It is always safe to delete the entire directories and regenerate them.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
package horse
|
|
||||||
|
|
||||||
type CharacterID int16
|
|
||||||
|
|
||||||
type Character struct {
|
|
||||||
ID CharacterID
|
|
||||||
Name string
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c Character) String() string {
|
|
||||||
return c.Name
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
module horse/character
|
|
||||||
|
|
||||||
import horse/game-id
|
|
||||||
|
|
||||||
pub struct character-detail
|
|
||||||
character-id: character-id
|
|
||||||
name: string
|
|
||||||
|
|
||||||
pub fun detail(
|
|
||||||
c: character-id,
|
|
||||||
?character/show: (character-id) -> string
|
|
||||||
): character-detail
|
|
||||||
Character-detail(c, c.show)
|
|
||||||
|
|
||||||
pub fun character-detail/show(d: character-detail): string
|
|
||||||
val Character-detail(Character-id(id), name) = d
|
|
||||||
name ++ " (ID " ++ id.show ++ ")"
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
module horse/game-id
|
|
||||||
|
|
||||||
// Game ID for characters, cards, skills, races, &c.
|
|
||||||
// Values for different categories may overlap.
|
|
||||||
alias game-id = int
|
|
||||||
|
|
||||||
// Specific game ID types.
|
|
||||||
// I've already made mistakes with ID categories and I haven't even committed this file yet.
|
|
||||||
|
|
||||||
// Game ID for characters.
|
|
||||||
// Generally numbers in the range 1000-9999.
|
|
||||||
pub struct character-id
|
|
||||||
game-id: game-id
|
|
||||||
|
|
||||||
// Game ID for trainees, i.e. costume instances of characters.
|
|
||||||
// Generally a character ID with two digits appended.
|
|
||||||
pub struct trainee-id
|
|
||||||
game-id: game-id
|
|
||||||
|
|
||||||
// Game ID for skills.
|
|
||||||
pub struct skill-id
|
|
||||||
game-id: game-id
|
|
||||||
|
|
||||||
// Game ID for skill groups.
|
|
||||||
pub struct skill-group-id
|
|
||||||
game-id: game-id
|
|
||||||
|
|
||||||
// Game ID for skill icons.
|
|
||||||
pub struct skill-icon-id
|
|
||||||
game-id: game-id
|
|
||||||
|
|
||||||
// Game ID for races,
|
|
||||||
// i.e. "Tenno Sho (Spring)" and not "Tenno Sho (Spring) at Kyoto Racecourse."
|
|
||||||
pub struct race-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.
|
|
||||||
pub struct race-thumbnail-id
|
|
||||||
game-id: game-id
|
|
||||||
|
|
||||||
// order2 comparison between any game ID types.
|
|
||||||
pub inline fun order2(x: a, y: a, ?a/game-id: (a) -> game-id): order2<a>
|
|
||||||
match x.game-id.cmp(y.game-id)
|
|
||||||
Lt -> Lt2(x, y)
|
|
||||||
Eq -> Eq2(x)
|
|
||||||
Gt -> Gt2(x, y)
|
|
||||||
|
|
||||||
// Comparison between any game ID types.
|
|
||||||
pub inline fun cmp(x: a, y: a, ?a/game-id: (a) -> game-id): order
|
|
||||||
x.game-id.cmp(y.game-id)
|
|
||||||
|
|
||||||
// Equality between any game ID types.
|
|
||||||
pub inline fun (==)(x: a, y: a, ?a/game-id: (a) -> game-id): bool
|
|
||||||
x.game-id == y.game-id
|
|
||||||
|
|
||||||
// Check whether a game ID is valid, i.e. nonzero.
|
|
||||||
pub inline fun is-valid(x: a, ?a/game-id: (a) -> game-id): bool
|
|
||||||
x.game-id != 0
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-12863
File diff suppressed because it is too large
Load Diff
-15480
File diff suppressed because it is too large
Load Diff
@@ -1,17 +0,0 @@
|
|||||||
module horse/legacy
|
|
||||||
|
|
||||||
import horse/character
|
|
||||||
import horse/race
|
|
||||||
import horse/spark
|
|
||||||
|
|
||||||
pub struct legacy
|
|
||||||
uma: veteran
|
|
||||||
parents: (veteran, veteran)
|
|
||||||
|
|
||||||
pub struct veteran
|
|
||||||
character: character
|
|
||||||
stat: spark<stat>
|
|
||||||
aptitude: spark<aptitude>
|
|
||||||
unique: maybe<spark<unique>>
|
|
||||||
generic: list<spark<generic>>
|
|
||||||
results: list<race-result>
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
module horse/movement
|
|
||||||
|
|
||||||
// Running styles.
|
|
||||||
pub type style
|
|
||||||
Front-Runner
|
|
||||||
Pace-Chaser
|
|
||||||
Late-Surger
|
|
||||||
End-Closer
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Equality comparison of the `style` type.
|
|
||||||
pub fun style/(==)(this : style, other : style) : e bool
|
|
||||||
match (this, other)
|
|
||||||
(Front-Runner, Front-Runner) -> True
|
|
||||||
(Pace-Chaser, Pace-Chaser) -> True
|
|
||||||
(Late-Surger, Late-Surger) -> True
|
|
||||||
(End-Closer, End-Closer) -> True
|
|
||||||
(_, _) -> False
|
|
||||||
|
|
||||||
// Shows a string representation of the `style` type.
|
|
||||||
pub fun style/show(this : style) : e string
|
|
||||||
match this
|
|
||||||
Front-Runner -> "Front Runner"
|
|
||||||
Pace-Chaser -> "Pace Chaser"
|
|
||||||
Late-Surger -> "Late Surger"
|
|
||||||
End-Closer -> "End Closer"
|
|
||||||
|
|
||||||
// Starting aptitude levels.
|
|
||||||
pub type level
|
|
||||||
G
|
|
||||||
F
|
|
||||||
E
|
|
||||||
D
|
|
||||||
C
|
|
||||||
B
|
|
||||||
A
|
|
||||||
S
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Comparison of the `level` type.
|
|
||||||
pub fun level/cmp(this : level, other : level) : e order
|
|
||||||
match (this, other)
|
|
||||||
(G, G) -> Eq
|
|
||||||
(G, _) -> Lt
|
|
||||||
(_, G) -> Gt
|
|
||||||
(F, F) -> Eq
|
|
||||||
(F, _) -> Lt
|
|
||||||
(_, F) -> Gt
|
|
||||||
(E, E) -> Eq
|
|
||||||
(E, _) -> Lt
|
|
||||||
(_, E) -> Gt
|
|
||||||
(D, D) -> Eq
|
|
||||||
(D, _) -> Lt
|
|
||||||
(_, D) -> Gt
|
|
||||||
(C, C) -> Eq
|
|
||||||
(C, _) -> Lt
|
|
||||||
(_, C) -> Gt
|
|
||||||
(B, B) -> Eq
|
|
||||||
(B, _) -> Lt
|
|
||||||
(_, B) -> Gt
|
|
||||||
(A, A) -> Eq
|
|
||||||
(A, _) -> Lt
|
|
||||||
(_, A) -> Gt
|
|
||||||
(S, S) -> Eq
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Fip comparison of the `level` type.
|
|
||||||
pub fun level/order2(this : level, other : level) : order2<level>
|
|
||||||
match (this, other)
|
|
||||||
(G, G) -> Eq2(G)
|
|
||||||
(G, other') -> Lt2(G, other')
|
|
||||||
(this', G) -> Gt2(G, this')
|
|
||||||
(F, F) -> Eq2(F)
|
|
||||||
(F, other') -> Lt2(F, other')
|
|
||||||
(this', F) -> Gt2(F, this')
|
|
||||||
(E, E) -> Eq2(E)
|
|
||||||
(E, other') -> Lt2(E, other')
|
|
||||||
(this', E) -> Gt2(E, this')
|
|
||||||
(D, D) -> Eq2(D)
|
|
||||||
(D, other') -> Lt2(D, other')
|
|
||||||
(this', D) -> Gt2(D, this')
|
|
||||||
(C, C) -> Eq2(C)
|
|
||||||
(C, other') -> Lt2(C, other')
|
|
||||||
(this', C) -> Gt2(C, this')
|
|
||||||
(B, B) -> Eq2(B)
|
|
||||||
(B, other') -> Lt2(B, other')
|
|
||||||
(this', B) -> Gt2(B, this')
|
|
||||||
(A, A) -> Eq2(A)
|
|
||||||
(A, other') -> Lt2(A, other')
|
|
||||||
(this', A) -> Gt2(A, this')
|
|
||||||
(S, S) -> Eq2(S)
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Shows a string representation of the `level` type.
|
|
||||||
pub fun level/show(this : level) : string
|
|
||||||
match this
|
|
||||||
G -> "G"
|
|
||||||
F -> "F"
|
|
||||||
E -> "E"
|
|
||||||
D -> "D"
|
|
||||||
C -> "C"
|
|
||||||
B -> "B"
|
|
||||||
A -> "A"
|
|
||||||
S -> "S"
|
|
||||||
@@ -1,158 +0,0 @@
|
|||||||
module horse/prob/kfl
|
|
||||||
|
|
||||||
// kfl is a semiring of probabilities formed by vibes.
|
|
||||||
pub type kfl
|
|
||||||
// Effectively if not literally impossible events.
|
|
||||||
Impossible
|
|
||||||
// Not worth aiming for, but can technically still happen.
|
|
||||||
Probably-Not
|
|
||||||
// You expect it not to happen most of the time, but it might still be worth
|
|
||||||
// trying for it if you're being forced to play to your outs.
|
|
||||||
Doubtful
|
|
||||||
// More likely that it won't happen, but a success isn't surprising.
|
|
||||||
Unlikely
|
|
||||||
// Either it does or it doesn't.
|
|
||||||
Mayhapsibly
|
|
||||||
// Decent chance it doesn't happen, but you still expect it to.
|
|
||||||
Probably
|
|
||||||
// You expect it to happen most of the time, but accept that there will be failures.
|
|
||||||
Most-Likely
|
|
||||||
// Very close to guaranteed, but technically with a small chance to fail.
|
|
||||||
Cry-If-Not
|
|
||||||
// Absolutely guaranteed events.
|
|
||||||
Guaranteed
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Comparison of the `kfl` type.
|
|
||||||
pub fun cmp(this : kfl, other : kfl) : e order
|
|
||||||
match (this, other)
|
|
||||||
(Impossible, Impossible) -> Eq
|
|
||||||
(Impossible, _) -> Lt
|
|
||||||
(_, Impossible) -> Gt
|
|
||||||
(Probably-Not, Probably-Not) -> Eq
|
|
||||||
(Probably-Not, _) -> Lt
|
|
||||||
(_, Probably-Not) -> Gt
|
|
||||||
(Doubtful, Doubtful) -> Eq
|
|
||||||
(Doubtful, _) -> Lt
|
|
||||||
(_, Doubtful) -> Gt
|
|
||||||
(Unlikely, Unlikely) -> Eq
|
|
||||||
(Unlikely, _) -> Lt
|
|
||||||
(_, Unlikely) -> Gt
|
|
||||||
(Mayhapsibly, Mayhapsibly) -> Eq
|
|
||||||
(Mayhapsibly, _) -> Lt
|
|
||||||
(_, Mayhapsibly) -> Gt
|
|
||||||
(Probably, Probably) -> Eq
|
|
||||||
(Probably, _) -> Lt
|
|
||||||
(_, Probably) -> Gt
|
|
||||||
(Most-Likely, Most-Likely) -> Eq
|
|
||||||
(Most-Likely, _) -> Lt
|
|
||||||
(_, Most-Likely) -> Gt
|
|
||||||
(Cry-If-Not, Cry-If-Not) -> Eq
|
|
||||||
(Cry-If-Not, _) -> Lt
|
|
||||||
(_, Cry-If-Not) -> Gt
|
|
||||||
(Guaranteed, Guaranteed) -> Eq
|
|
||||||
|
|
||||||
// Shows a string representation of the `kfl` type.
|
|
||||||
pub fun show(this : kfl) : e string
|
|
||||||
match this
|
|
||||||
Impossible -> "impossible"
|
|
||||||
Probably-Not -> "probably not"
|
|
||||||
Doubtful -> "doubtful"
|
|
||||||
Unlikely -> "unlikely"
|
|
||||||
Mayhapsibly -> "mayhapsibly"
|
|
||||||
Probably -> "probably"
|
|
||||||
Most-Likely -> "most likely"
|
|
||||||
Cry-If-Not -> "cry if not"
|
|
||||||
Guaranteed -> "guaranteed"
|
|
||||||
|
|
||||||
// KFL multiplication, or the probability of cooccurrence of two independent events.
|
|
||||||
pub fun (*)(a: kfl, b: kfl): e kfl
|
|
||||||
val (l, h) = match a.cmp(b) // this operation is commutative
|
|
||||||
Gt -> (b, a)
|
|
||||||
_ -> (a, b)
|
|
||||||
match (l, h)
|
|
||||||
(r, Guaranteed) -> r // factor out Guaranteed cases
|
|
||||||
(Impossible, _) -> Impossible
|
|
||||||
(Probably-Not, _) -> Impossible
|
|
||||||
(r, Cry-If-Not) -> r // factor out further Cry-If-Not cases
|
|
||||||
(Doubtful, Most-Likely) -> Probably-Not
|
|
||||||
(Doubtful, _) -> Impossible
|
|
||||||
(Unlikely, Most-Likely) -> Doubtful
|
|
||||||
(Unlikely, Probably) -> Doubtful
|
|
||||||
(Unlikely, Mayhapsibly) -> Probably-Not
|
|
||||||
(Unlikely, _) -> Probably-Not // (Unlikely, Unlikely) because commutative
|
|
||||||
(Mayhapsibly, Most-Likely) -> Unlikely
|
|
||||||
(Mayhapsibly, Probably) -> Unlikely
|
|
||||||
(Mayhapsibly, _) -> Unlikely
|
|
||||||
(Probably, Most-Likely) -> Mayhapsibly
|
|
||||||
(Probably, _) -> Unlikely
|
|
||||||
(Most-Likely, _) -> Probably
|
|
||||||
// These two are only needed because the type system doesn't understand commutativity.
|
|
||||||
(Cry-If-Not, _) -> Cry-If-Not
|
|
||||||
(Guaranteed, _) -> Guaranteed
|
|
||||||
|
|
||||||
// KFL addition, or the probability of occurrence of at least one of two independent events.
|
|
||||||
pub fun (+)(a: kfl, b: kfl): e kfl
|
|
||||||
val (l, h) = match a.cmp(b) // this operation is commutative
|
|
||||||
Gt -> (b, a)
|
|
||||||
_ -> (a, b)
|
|
||||||
match (l, h)
|
|
||||||
// Cases with _ on the right are (a, a) due to commutativity.
|
|
||||||
// Cases with _ on the left simplify later cases that all absorb to the right.
|
|
||||||
(Guaranteed, _) -> Guaranteed
|
|
||||||
(_, Guaranteed) -> Guaranteed
|
|
||||||
(Cry-If-Not, _) -> Guaranteed
|
|
||||||
(Most-Likely, Cry-If-Not) -> Cry-If-Not
|
|
||||||
(Most-Likely, _) -> Cry-If-Not
|
|
||||||
(_, Cry-If-Not) -> Cry-If-Not
|
|
||||||
(Probably, Most-Likely) -> Cry-If-Not
|
|
||||||
(Probably, _) -> Most-Likely
|
|
||||||
(_, Most-Likely) -> Most-Likely
|
|
||||||
(Mayhapsibly, Probably) -> Most-Likely
|
|
||||||
(Mayhapsibly, _) -> Probably
|
|
||||||
(Unlikely, Probably) -> Most-Likely
|
|
||||||
(Unlikely, Mayhapsibly) -> Probably
|
|
||||||
(Unlikely, _) -> Mayhapsibly
|
|
||||||
(_, Probably) -> Probably
|
|
||||||
(Doubtful, Mayhapsibly) -> Probably
|
|
||||||
(Doubtful, Unlikely) -> Mayhapsibly
|
|
||||||
(Doubtful, _) -> Unlikely
|
|
||||||
(_, Mayhapsibly) -> Mayhapsibly
|
|
||||||
(_, Unlikely) -> Unlikely
|
|
||||||
(Probably-Not, Doubtful) -> Unlikely
|
|
||||||
(Probably-Not, _) -> Probably-Not
|
|
||||||
(_, Doubtful) -> Doubtful
|
|
||||||
(_, Probably-Not) -> Probably-Not
|
|
||||||
(_, Impossible) -> Impossible
|
|
||||||
|
|
||||||
// KFL union, or the probability of occurrence of exactly one of two independent events.
|
|
||||||
pub fun either(a: kfl, b: kfl): e kfl
|
|
||||||
val (l, h) = match a.cmp(b) // this operation is commutative
|
|
||||||
Gt -> (b, a)
|
|
||||||
_ -> (a, b)
|
|
||||||
match (l, h)
|
|
||||||
(Impossible, r) -> r
|
|
||||||
(Probably-Not, Guaranteed) -> Cry-If-Not
|
|
||||||
(Probably-Not, r) -> r
|
|
||||||
(Doubtful, Guaranteed) -> Most-Likely
|
|
||||||
(Doubtful, Cry-If-Not) -> Most-Likely
|
|
||||||
(Doubtful, Most-Likely) -> Probably
|
|
||||||
(Doubtful, Probably) -> Mayhapsibly
|
|
||||||
(Doubtful, Mayhapsibly) -> Mayhapsibly
|
|
||||||
(Doubtful, Unlikely) -> Mayhapsibly
|
|
||||||
(Doubtful, _) -> Unlikely
|
|
||||||
(Unlikely, Guaranteed) -> Probably
|
|
||||||
(Unlikely, Cry-If-Not) -> Mayhapsibly
|
|
||||||
(Unlikely, Most-Likely) -> Mayhapsibly
|
|
||||||
(Unlikely, _) -> Probably
|
|
||||||
(Mayhapsibly, Guaranteed) -> Mayhapsibly
|
|
||||||
(Mayhapsibly, Cry-If-Not) -> Mayhapsibly
|
|
||||||
(Mayhapsibly, Most-Likely) -> Mayhapsibly
|
|
||||||
(Mayhapsibly, _) -> Probably
|
|
||||||
(Probably, Guaranteed) -> Unlikely
|
|
||||||
(Probably, Cry-If-Not) -> Unlikely
|
|
||||||
(Probably, Most-Likely) -> Unlikely
|
|
||||||
(Probably, _) -> Mayhapsibly
|
|
||||||
(Most-Likely, _) -> Doubtful
|
|
||||||
(Cry-If-Not, _) -> Probably-Not
|
|
||||||
(Guaranteed, _) -> Impossible
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
module horse/prob/pmf
|
|
||||||
|
|
||||||
import std/core/list
|
|
||||||
|
|
||||||
// Discrete-support probability distribution implemented as a list with the invariant
|
|
||||||
// that support is always given in increasing order.
|
|
||||||
pub type pmf<s, v>
|
|
||||||
Event(s: s, v: v, next: pmf<s, v>)
|
|
||||||
End
|
|
||||||
|
|
||||||
// Add an independent event to the distribution.
|
|
||||||
pub fun add(p: pmf<s, v>, s: s, v: v, ?s/cmp: (a: s, b: s) -> order, ?v/(+): (new: v, old: v) -> e v): e pmf<s, v>
|
|
||||||
match p
|
|
||||||
End -> Event(s, v, End)
|
|
||||||
Event(s', v', next) -> match s.cmp(s')
|
|
||||||
Lt -> Event(s, v, Event(s', v', next))
|
|
||||||
Eq -> Event(s, v + v', next)
|
|
||||||
Gt -> Event(s', v', add(next, s, v))
|
|
||||||
|
|
||||||
// Replace an event in the distribution.
|
|
||||||
pub inline fun set(p: pmf<s, v>, s: s, v: v, ?s/cmp: (a: s, b: s) -> order): e pmf<s, v>
|
|
||||||
p.add(s, v, cmp, fn(new, old) new)
|
|
||||||
|
|
||||||
// Construct a pmf from a list of (support, value) entries.
|
|
||||||
pub fun list/pmf(l: list<(s, v)>, ?s/cmp: (a: s, b: s) -> order, ?v/(+): (new: v, old: v) -> e v): e pmf<s, v>
|
|
||||||
l.foldl(End) fn(p, (s, v)) p.add(s, v)
|
|
||||||
|
|
||||||
// Fold over the entries of the distribution.
|
|
||||||
pub tail fun foldl(p: pmf<s, v>, init: a, f: (a, s, v) -> e a): e a
|
|
||||||
match p
|
|
||||||
End -> init
|
|
||||||
Event(s, v, next) -> foldl(next, f(init, s, v), f)
|
|
||||||
|
|
||||||
// Convert the distribution to a list of entries.
|
|
||||||
pub fun pmf/list(p: pmf<s, v>): list<(s, v)>
|
|
||||||
p.foldl(Nil) fn(l, s, v) Cons((s, v), l)
|
|
||||||
|
|
||||||
// Distribution of cooccurrence of two events described by their distributions.
|
|
||||||
pub fun (*)(a: pmf<s, v>, b: pmf<s, v>, ?s/cmp: (a: s, b: s) -> order, ?v/(*): (a: v, b: v) -> e v): e pmf<s, v>
|
|
||||||
match a
|
|
||||||
End -> End
|
|
||||||
Event(sa, va, nexta) -> match b
|
|
||||||
End -> End
|
|
||||||
Event(sb, vb, nextb) -> match sa.cmp(sb)
|
|
||||||
Lt -> nexta * b
|
|
||||||
Eq -> Event(sa, va * vb, nexta * nextb)
|
|
||||||
Gt -> a * nextb
|
|
||||||
|
|
||||||
// Distribution of occurrence of at least one of two events described by their distributions.
|
|
||||||
pub fun (+)(a: pmf<s, v>, b: pmf<s, v>, ?s/cmp: (a: s, b: s) -> order, ?v/(+): (a: v, b: v) -> e v): e pmf<s, v>
|
|
||||||
match a
|
|
||||||
End -> b
|
|
||||||
Event(sa, va, nexta) -> match b
|
|
||||||
End -> a
|
|
||||||
Event(sb, vb, nextb) -> match sa.cmp(sb)
|
|
||||||
Lt -> Event(sa, va, nexta + b)
|
|
||||||
Eq -> Event(sa, va + vb, nexta + nextb)
|
|
||||||
Gt -> Event(sb, vb, a + nextb)
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package horse
|
|
||||||
|
|
||||||
type RaceID int32
|
|
||||||
|
|
||||||
// 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 {
|
|
||||||
ID RaceID
|
|
||||||
Name string
|
|
||||||
Thumbnail int
|
|
||||||
// Some careers contain unusual versions of races, e.g. Tenno Sho (Spring)
|
|
||||||
// in Hanshin instead of Kyoto for Narita Taishin and Biwa Hayahide.
|
|
||||||
// For such races, this field holds the normal race ID.
|
|
||||||
Primary RaceID
|
|
||||||
}
|
|
||||||
-276
@@ -1,276 +0,0 @@
|
|||||||
module horse/race
|
|
||||||
|
|
||||||
import std/data/linearset
|
|
||||||
import horse/game-id
|
|
||||||
|
|
||||||
pub struct race-detail
|
|
||||||
race-id: race-id
|
|
||||||
name: string
|
|
||||||
grade: grade
|
|
||||||
thumbnail-id: race-thumbnail-id
|
|
||||||
// Some careers contain unusual versions of races, e.g. Tenno Sho (Spring)
|
|
||||||
// in Hanshin instead of Kyoto for Narita Taishin and Biwa Hayahide.
|
|
||||||
// For such races, this field holds the normal race ID.
|
|
||||||
primary: race-id
|
|
||||||
|
|
||||||
pub fun detail(
|
|
||||||
r: race-id,
|
|
||||||
?race/show: (race-id) -> string,
|
|
||||||
?race/grade: (race-id) -> grade,
|
|
||||||
?race/thumbnail: (race-id) -> race-thumbnail-id,
|
|
||||||
?race/primary: (race-id) -> race-id
|
|
||||||
): race-detail
|
|
||||||
Race-detail(r, r.show, r.grade, r.thumbnail, r.primary)
|
|
||||||
|
|
||||||
pub fun race-detail/show(r: race-detail): string
|
|
||||||
val Race-detail(Race-id(id), name) = r
|
|
||||||
name ++ " (ID " ++ id.show ++ ")"
|
|
||||||
|
|
||||||
// Race grades.
|
|
||||||
pub type grade
|
|
||||||
Pre-OP
|
|
||||||
OP
|
|
||||||
G3
|
|
||||||
G2
|
|
||||||
G1
|
|
||||||
EX
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Comparison of the `grade` type.
|
|
||||||
pub fun grade/cmp(this : grade, other : grade) : e order
|
|
||||||
match (this, other)
|
|
||||||
(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.
|
|
||||||
// Shows a string representation of the `grade` type.
|
|
||||||
pub fun grade/show(this : grade) : e string
|
|
||||||
match this
|
|
||||||
Pre-OP -> "Pre-OP"
|
|
||||||
OP -> "OP"
|
|
||||||
G3 -> "G3"
|
|
||||||
G2 -> "G2"
|
|
||||||
G1 -> "G1"
|
|
||||||
EX -> "EX"
|
|
||||||
|
|
||||||
// Graded race that a veteran ran.
|
|
||||||
pub struct race-result
|
|
||||||
race-id: race-id
|
|
||||||
place: int
|
|
||||||
turn: turn
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Equality comparison of the `race-result` type.
|
|
||||||
pub fun race-result/(==)(this : race-result, other : race-result) : e bool
|
|
||||||
match (this, other)
|
|
||||||
(Race-result(race, place, turn), Race-result(race', place', turn')) -> race == race' && place == place' && turn == turn'
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Shows a string representation of the `race-result` type.
|
|
||||||
pub fun race-result/show(this : race-result, ?race/show: (race-id) -> string) : e string
|
|
||||||
match this
|
|
||||||
Race-result(race-id, place, turn) -> turn.show ++ " " ++ race-id.show ++ ": " ++ place.show
|
|
||||||
|
|
||||||
// Determine whether two race results are for the same race.
|
|
||||||
// This differs from (==) which also requires the race to be on the same turn.
|
|
||||||
pub fun race-result/same-race(a: race-result, b: race-result): bool
|
|
||||||
a.race-id == b.race-id
|
|
||||||
|
|
||||||
// Turn that a race occurred.
|
|
||||||
pub struct turn
|
|
||||||
year: turn-year
|
|
||||||
month: turn-month
|
|
||||||
half: turn-half
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Equality comparison of the `turn` type.
|
|
||||||
pub fun turn/(==)(this : turn, other : turn) : e bool
|
|
||||||
match (this, other)
|
|
||||||
(Turn(year, month, half), Turn(year', month', half')) -> year == year' && month == month' && half == half'
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Fip comparison of the `turn` type.
|
|
||||||
pub fun turn/order2(this : turn, other : turn) : e order2<turn>
|
|
||||||
match (this, other)
|
|
||||||
(Turn(year, month, half), Turn(year', month', half')) ->
|
|
||||||
match year.order2(year')
|
|
||||||
Eq2(year_eq) ->
|
|
||||||
match month.order2(month')
|
|
||||||
Eq2(month_eq) ->
|
|
||||||
match half.order2(half')
|
|
||||||
Eq2(half_eq) -> Eq2(Turn(year_eq, month_eq, half_eq))
|
|
||||||
Lt2(half_lt, half_gt) -> Lt2(Turn(year_eq, month_eq, half_lt), Turn(year_eq, month_eq, half_gt))
|
|
||||||
Gt2(half_lt, half_gt) -> Gt2(Turn(year_eq, month_eq, half_lt), Turn(year_eq, month_eq, half_gt))
|
|
||||||
Lt2(month_lt, month_gt) -> Lt2(Turn(year_eq, month_lt, half), Turn(year_eq, month_gt, half'))
|
|
||||||
Gt2(month_lt, month_gt) -> Gt2(Turn(year_eq, month_lt, half'), Turn(year_eq, month_gt, half))
|
|
||||||
Lt2(year_lt, year_gt) -> Lt2(Turn(year_lt, month, half), Turn(year_gt, month', half'))
|
|
||||||
Gt2(year_lt, year_gt) -> Gt2(Turn(year_lt, month', half'), Turn(year_gt, month, half))
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Shows a string representation of the `turn` type.
|
|
||||||
pub fun turn/show(this : turn) : e string
|
|
||||||
this.year.show ++ " " ++ this.half.show ++ " " ++ this.month.show
|
|
||||||
|
|
||||||
pub type turn-year
|
|
||||||
Junior
|
|
||||||
Classic
|
|
||||||
Senior
|
|
||||||
Finale
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Equality comparison of the `turn-year` type.
|
|
||||||
pub fun turn-year/(==)(this : turn-year, other : turn-year) : e bool
|
|
||||||
match (this, other)
|
|
||||||
(Junior, Junior) -> True
|
|
||||||
(Classic, Classic) -> True
|
|
||||||
(Senior, Senior) -> True
|
|
||||||
(Finale, Finale) -> True
|
|
||||||
(_, _) -> False
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Fip comparison of the `turn-year` type.
|
|
||||||
pub fun turn-year/order2(this : turn-year, other : turn-year) : e order2<turn-year>
|
|
||||||
match (this, other)
|
|
||||||
(Junior, Junior) -> Eq2(Junior)
|
|
||||||
(Junior, other') -> Lt2(Junior, other')
|
|
||||||
(this', Junior) -> Gt2(Junior, this')
|
|
||||||
(Classic, Classic) -> Eq2(Classic)
|
|
||||||
(Classic, other') -> Lt2(Classic, other')
|
|
||||||
(this', Classic) -> Gt2(Classic, this')
|
|
||||||
(Senior, Senior) -> Eq2(Senior)
|
|
||||||
(Senior, other') -> Lt2(Senior, other')
|
|
||||||
(this', Senior) -> Gt2(Senior, this')
|
|
||||||
(Finale, Finale) -> Eq2(Finale)
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Shows a string representation of the `turn-year` type.
|
|
||||||
pub fun turn-year/show(this : turn-year) : e string
|
|
||||||
match this
|
|
||||||
Junior -> "Junior Year"
|
|
||||||
Classic -> "Classic Year"
|
|
||||||
Senior -> "Senior Year"
|
|
||||||
Finale -> "Finale 1" // the 1 is in the game
|
|
||||||
|
|
||||||
pub type turn-month
|
|
||||||
January
|
|
||||||
February
|
|
||||||
March
|
|
||||||
April
|
|
||||||
May
|
|
||||||
June
|
|
||||||
July
|
|
||||||
August
|
|
||||||
September
|
|
||||||
November
|
|
||||||
December
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Equality comparison of the `turn-month` type.
|
|
||||||
pub fun turn-month/(==)(this : turn-month, other : turn-month) : e bool
|
|
||||||
match (this, other)
|
|
||||||
(January, January) -> True
|
|
||||||
(February, February) -> True
|
|
||||||
(March, March) -> True
|
|
||||||
(April, April) -> True
|
|
||||||
(May, May) -> True
|
|
||||||
(June, June) -> True
|
|
||||||
(July, July) -> True
|
|
||||||
(August, August) -> True
|
|
||||||
(September, September) -> True
|
|
||||||
(November, November) -> True
|
|
||||||
(December, December) -> True
|
|
||||||
(_, _) -> False
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Fip comparison of the `turn-month` type.
|
|
||||||
pub fun turn-month/order2(this : turn-month, other : turn-month) : e order2<turn-month>
|
|
||||||
match (this, other)
|
|
||||||
(January, January) -> Eq2(January)
|
|
||||||
(January, other') -> Lt2(January, other')
|
|
||||||
(this', January) -> Gt2(January, this')
|
|
||||||
(February, February) -> Eq2(February)
|
|
||||||
(February, other') -> Lt2(February, other')
|
|
||||||
(this', February) -> Gt2(February, this')
|
|
||||||
(March, March) -> Eq2(March)
|
|
||||||
(March, other') -> Lt2(March, other')
|
|
||||||
(this', March) -> Gt2(March, this')
|
|
||||||
(April, April) -> Eq2(April)
|
|
||||||
(April, other') -> Lt2(April, other')
|
|
||||||
(this', April) -> Gt2(April, this')
|
|
||||||
(May, May) -> Eq2(May)
|
|
||||||
(May, other') -> Lt2(May, other')
|
|
||||||
(this', May) -> Gt2(May, this')
|
|
||||||
(June, June) -> Eq2(June)
|
|
||||||
(June, other') -> Lt2(June, other')
|
|
||||||
(this', June) -> Gt2(June, this')
|
|
||||||
(July, July) -> Eq2(July)
|
|
||||||
(July, other') -> Lt2(July, other')
|
|
||||||
(this', July) -> Gt2(July, this')
|
|
||||||
(August, August) -> Eq2(August)
|
|
||||||
(August, other') -> Lt2(August, other')
|
|
||||||
(this', August) -> Gt2(August, this')
|
|
||||||
(September, September) -> Eq2(September)
|
|
||||||
(September, other') -> Lt2(September, other')
|
|
||||||
(this', September) -> Gt2(September, this')
|
|
||||||
(November, November) -> Eq2(November)
|
|
||||||
(November, other') -> Lt2(November, other')
|
|
||||||
(this', November) -> Gt2(November, this')
|
|
||||||
(December, December) -> Eq2(December)
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Shows a string representation of the `turn-month` type.
|
|
||||||
pub fun turn-month/show(this : turn-month) : e string
|
|
||||||
match this
|
|
||||||
January -> "January"
|
|
||||||
February -> "February"
|
|
||||||
March -> "March"
|
|
||||||
April -> "April"
|
|
||||||
May -> "May"
|
|
||||||
June -> "June"
|
|
||||||
July -> "July"
|
|
||||||
August -> "August"
|
|
||||||
September -> "September"
|
|
||||||
November -> "November"
|
|
||||||
December -> "December"
|
|
||||||
|
|
||||||
pub type turn-half
|
|
||||||
Early
|
|
||||||
Late
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Equality comparison of the `turn-half` type.
|
|
||||||
pub fun turn-half/(==)(this : turn-half, other : turn-half) : e bool
|
|
||||||
match (this, other)
|
|
||||||
(Early, Early) -> True
|
|
||||||
(Late, Late) -> True
|
|
||||||
(_, _) -> False
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Fip comparison of the `turn-half` type.
|
|
||||||
pub fun turn-half/order2(this : turn-half, other : turn-half) : e order2<turn-half>
|
|
||||||
match (this, other)
|
|
||||||
(Early, Early) -> Eq2(Early)
|
|
||||||
(Early, other') -> Lt2(Early, other')
|
|
||||||
(this', Early) -> Gt2(Early, this')
|
|
||||||
(Late, Late) -> Eq2(Late)
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Shows a string representation of the `turn-half` type.
|
|
||||||
pub fun turn-half/show(this : turn-half) : e string
|
|
||||||
match this
|
|
||||||
Early -> "Early"
|
|
||||||
Late -> "Late"
|
|
||||||
-226
@@ -1,226 +0,0 @@
|
|||||||
module horse/skill
|
|
||||||
|
|
||||||
// This module contains skill-related definitions
|
|
||||||
// common to all versions of the game.
|
|
||||||
|
|
||||||
import std/num/decimal
|
|
||||||
import horse/game-id
|
|
||||||
import horse/movement
|
|
||||||
|
|
||||||
// Full details about a skill.
|
|
||||||
pub struct skill-detail
|
|
||||||
skill-id: skill-id
|
|
||||||
name: string
|
|
||||||
description: string
|
|
||||||
group-id: skill-group-id
|
|
||||||
rarity: rarity
|
|
||||||
group-rate: int
|
|
||||||
grade-value: int
|
|
||||||
wit-check: bool
|
|
||||||
activations: list<activation>
|
|
||||||
owner: maybe<trainee-id>
|
|
||||||
sp-cost: int
|
|
||||||
icon-id: skill-icon-id
|
|
||||||
|
|
||||||
pub fun detail(
|
|
||||||
s: skill-id,
|
|
||||||
?skill/show: (skill-id) -> string,
|
|
||||||
?skill/description: (skill-id) -> string,
|
|
||||||
?skill/group: (skill-id) -> skill-group-id,
|
|
||||||
?skill/rarity: (skill-id) -> rarity,
|
|
||||||
?skill/group-rate: (skill-id) -> int,
|
|
||||||
?skill/grade-value: (skill-id) -> int,
|
|
||||||
?skill/wit-check: (skill-id) -> bool,
|
|
||||||
?skill/activations: (skill-id) -> list<activation>,
|
|
||||||
?skill/unique-owner: (skill-id) -> maybe<trainee-id>,
|
|
||||||
?skill/sp-cost: (skill-id) -> int,
|
|
||||||
?skill/icon-id: (skill-id) -> skill-icon-id
|
|
||||||
): skill-detail
|
|
||||||
Skill-detail(
|
|
||||||
s,
|
|
||||||
s.show,
|
|
||||||
s.description,
|
|
||||||
s.group,
|
|
||||||
s.rarity,
|
|
||||||
s.group-rate,
|
|
||||||
s.grade-value,
|
|
||||||
s.wit-check,
|
|
||||||
s.activations,
|
|
||||||
s.unique-owner,
|
|
||||||
s.sp-cost,
|
|
||||||
s.icon-id
|
|
||||||
)
|
|
||||||
|
|
||||||
pub fun skill-detail/show(d: skill-detail, ?character/show: (character-id) -> string, ?trainee/show: (trainee-id) -> string): string
|
|
||||||
val Skill-detail(Skill-id(id), name, desc, _, rarity, _, grade-value, wit-check, activations, owner, sp-cost, _) = d
|
|
||||||
val r = name ++ " (ID " ++ id.show ++ "): " ++ desc ++ " " ++ activations.map(activation/show).join(". ") ++ (if wit-check then ". Wit check. " else ". No wit check. ") ++ rarity.show ++ " costing " ++ sp-cost.show ++ " SP, worth " ++ grade-value.show ++ " grade value."
|
|
||||||
match owner
|
|
||||||
Nothing -> r
|
|
||||||
Just(owner-id) -> match owner-id.show
|
|
||||||
"" -> r ++ " Unique skill of trainee with ID " ++ owner-id.show ++ "."
|
|
||||||
owner-name -> r ++ " Unique skill of " ++ owner-name ++ "."
|
|
||||||
|
|
||||||
// Skill rarity levels.
|
|
||||||
pub type rarity
|
|
||||||
Common // white
|
|
||||||
Rare // gold
|
|
||||||
Unique-Low // 1*/2* unique
|
|
||||||
Unique-Upgraded // 3*+ unique on a trainee upgraded from 1*/2*
|
|
||||||
Unique // base 3* unique
|
|
||||||
|
|
||||||
pub fun rarity/show(r: rarity): string
|
|
||||||
match r
|
|
||||||
Common -> "Common"
|
|
||||||
Rare -> "Rare"
|
|
||||||
Unique-Low -> "Unique (1\u2606/2\u2606)"
|
|
||||||
Unique-Upgraded -> "Unique (3\u2606+ from 1\u2606/2\u2606 upgraded)"
|
|
||||||
Unique -> "Unique (3\u2606+)"
|
|
||||||
|
|
||||||
// Condition and precondition logic.
|
|
||||||
pub alias condition = string
|
|
||||||
|
|
||||||
// Activation conditions and effects.
|
|
||||||
// A skill has one or two activations.
|
|
||||||
pub struct activation
|
|
||||||
precondition: condition
|
|
||||||
condition: condition
|
|
||||||
duration: decimal // seconds
|
|
||||||
cooldown: decimal // seconds
|
|
||||||
abilities: list<ability> // one to three elements
|
|
||||||
|
|
||||||
pub fun activation/show(a: activation, ?character/show: (character-id) -> string): string
|
|
||||||
match a
|
|
||||||
Activation("", condition, duration, _, abilities) | !duration.is-pos -> condition ++ " -> " ++ abilities.show
|
|
||||||
Activation("", condition, duration, cooldown, abilities) | cooldown >= 500.decimal -> condition ++ " -> for " ++ duration.show ++ "s, " ++ abilities.show
|
|
||||||
Activation("", condition, duration, cooldown, abilities) -> condition ++ " -> for " ++ duration.show ++ "s on " ++ cooldown.show ++ "s cooldown, " ++ abilities.show
|
|
||||||
Activation(precondition, condition, duration, _, abilities) | !duration.is-pos -> precondition ++ " -> " ++ condition ++ " -> " ++ abilities.show
|
|
||||||
Activation(precondition, condition, duration, cooldown, abilities) | cooldown >= 500.decimal -> precondition ++ " -> " ++ condition ++ " -> for " ++ duration.show ++ "s, " ++ abilities.show
|
|
||||||
Activation(precondition, condition, duration, cooldown, abilities) -> precondition ++ " -> " ++ condition ++ " -> for " ++ duration.show ++ "s on " ++ cooldown.show ++ "s cooldown, " ++ abilities.show
|
|
||||||
|
|
||||||
// Effects of activating a skill.
|
|
||||||
pub struct ability
|
|
||||||
ability-type: ability-type
|
|
||||||
value-usage: value-usage
|
|
||||||
target: target
|
|
||||||
|
|
||||||
pub fun ability/show(a: ability, ?character/show: (character-id) -> string): string
|
|
||||||
match a
|
|
||||||
Ability(t, Direct, Self) -> t.show
|
|
||||||
Ability(t, Direct, target) -> t.show ++ " " ++ target.show
|
|
||||||
Ability(t, v, Self) -> t.show ++ " " ++ v.show
|
|
||||||
Ability(t, v, target) -> t.show ++ " " ++ target.show ++ " " ++ v.show
|
|
||||||
|
|
||||||
// Skill ability effects.
|
|
||||||
pub type ability-type
|
|
||||||
Passive-Speed(bonus: decimal)
|
|
||||||
Passive-Stamina(bonus: decimal)
|
|
||||||
Passive-Power(bonus: decimal)
|
|
||||||
Passive-Guts(bonus: decimal)
|
|
||||||
Passive-Wit(bonus: decimal)
|
|
||||||
Great-Escape
|
|
||||||
Vision(bonus: decimal)
|
|
||||||
HP(rate: decimal)
|
|
||||||
Gate-Delay(rate: decimal)
|
|
||||||
Frenzy(add: decimal)
|
|
||||||
Current-Speed(add: decimal)
|
|
||||||
Target-Speed(add: decimal)
|
|
||||||
Lane-Speed(add: decimal)
|
|
||||||
Accel(add: decimal)
|
|
||||||
Lane-Change(add: decimal)
|
|
||||||
|
|
||||||
pub fun ability-type/show(a: ability-type): string
|
|
||||||
match a
|
|
||||||
Passive-Speed(bonus) -> bonus.show ++ " Speed"
|
|
||||||
Passive-Stamina(bonus) -> bonus.show ++ " Stamina"
|
|
||||||
Passive-Power(bonus) -> bonus.show ++ " Power"
|
|
||||||
Passive-Guts(bonus) -> bonus.show ++ " Guts"
|
|
||||||
Passive-Wit(bonus) -> bonus.show ++ " Wit"
|
|
||||||
Great-Escape -> "enable Great Escape style"
|
|
||||||
Vision(bonus) -> bonus.show ++ " vision"
|
|
||||||
HP(rate) | rate.is-pos -> show(rate * 100.decimal) ++ "% HP recovery"
|
|
||||||
HP(rate) -> show(rate * 100.decimal) ++ "% HP loss"
|
|
||||||
Gate-Delay(rate) -> rate.show ++ "× gate delay"
|
|
||||||
Frenzy(add) -> add.show ++ "s longer Rushed"
|
|
||||||
Current-Speed(rate) -> rate.show ++ "m/s current speed"
|
|
||||||
Target-Speed(rate) -> rate.show ++ "m/s target speed"
|
|
||||||
Lane-Speed(rate) -> rate.show ++ "m/s lane change speed"
|
|
||||||
Accel(rate) -> rate.show ++ "m/s² acceleration"
|
|
||||||
Lane-Change(rate) -> rate.show ++ " course width movement"
|
|
||||||
|
|
||||||
// Special scaling types for skill abilities.
|
|
||||||
pub type value-usage
|
|
||||||
Direct
|
|
||||||
Team-Speed
|
|
||||||
Team-Stamina
|
|
||||||
Team-Power
|
|
||||||
Team-Guts
|
|
||||||
Team-Wit
|
|
||||||
Multiply-Random
|
|
||||||
Multiply-Random2
|
|
||||||
Climax
|
|
||||||
Max-Stat
|
|
||||||
Passive-Count
|
|
||||||
Front-Distance-Add
|
|
||||||
Midrace-Side-Block-Time
|
|
||||||
Speed-Scaling
|
|
||||||
Speed-Scaling2
|
|
||||||
Arc-Global-Potential
|
|
||||||
Max-Lead-Distance
|
|
||||||
|
|
||||||
pub fun value-usage/show(v: value-usage): string
|
|
||||||
match v
|
|
||||||
Direct -> "with no scaling"
|
|
||||||
Team-Speed -> "scaling with team Speed"
|
|
||||||
Team-Stamina -> "scaling with team Stamina"
|
|
||||||
Team-Power -> "scaling with team Power"
|
|
||||||
Team-Guts -> "scaling with team Guts"
|
|
||||||
Team-Wit -> "scaling with team Wit"
|
|
||||||
Multiply-Random -> "scaling with a random multiplier (0×, 0.02×, or 0.04×)"
|
|
||||||
Multiply-Random2 -> "scaling with a random multiplier (0×, 0.02×, or 0.04×)"
|
|
||||||
Climax -> "scaling with the number of races won during training"
|
|
||||||
Max-Stat -> "scaling with the value of the user's highest stat"
|
|
||||||
Passive-Count -> "scaling with the number of Passive skills activated"
|
|
||||||
Front-Distance-Add -> "scaling with distance from the leader"
|
|
||||||
Midrace-Side-Block-Time -> "scaling with mid-race phase blocked side time"
|
|
||||||
Speed-Scaling -> "scaling with overall speed"
|
|
||||||
Speed-Scaling2 -> "scaling with overall speed"
|
|
||||||
Arc-Global-Potential -> "scaling with L'Arc global potential"
|
|
||||||
Max-Lead-Distance -> "scaling with the distance of the longest lead obtained in the first two thirds of the race"
|
|
||||||
|
|
||||||
// Who a skill ability targets.
|
|
||||||
pub type target
|
|
||||||
Self
|
|
||||||
Sympathizers
|
|
||||||
In-View
|
|
||||||
Frontmost(limit: int)
|
|
||||||
Ahead(limit: int)
|
|
||||||
Behind(limit: int)
|
|
||||||
All-Teammates
|
|
||||||
Style(style: style)
|
|
||||||
Rushing-Ahead(limit: int)
|
|
||||||
Rushing-Behind(limit: int)
|
|
||||||
Rushing-Style(style: style)
|
|
||||||
Specific-Character(who: character-id)
|
|
||||||
Triggering
|
|
||||||
|
|
||||||
pub fun target/show(t: target, ?character/show: (character-id) -> string): string
|
|
||||||
match t
|
|
||||||
Self -> "self"
|
|
||||||
Sympathizers -> "others with Sympathy"
|
|
||||||
In-View -> "others in field of view"
|
|
||||||
Frontmost(limit) -> "frontmost " ++ limit.show
|
|
||||||
Ahead(limit) | limit >= 18 -> "others ahead"
|
|
||||||
Ahead(limit) -> "next " ++ limit.show ++ " others ahead"
|
|
||||||
Behind(limit) | limit >= 18 -> "others behind"
|
|
||||||
Behind(limit) -> "next " ++ limit.show ++ " others behind"
|
|
||||||
All-Teammates -> "all teammates"
|
|
||||||
Style(s) -> "other " ++ s.show ++ "s"
|
|
||||||
Rushing-Ahead(limit) | limit >= 18 -> "others rushing ahead"
|
|
||||||
Rushing-Ahead(limit) -> "next " ++ limit.show ++ " others rushing ahead"
|
|
||||||
Rushing-Behind(limit) | limit >= 18 -> "others rushing behind"
|
|
||||||
Rushing-Behind(limit) -> "next " ++ limit.show ++ " others rushing behind"
|
|
||||||
Rushing-Style(s) -> "rushing " ++ s.show ++ "s"
|
|
||||||
Specific-Character(who) -> match who.show
|
|
||||||
"" -> "character with ID " ++ who.show
|
|
||||||
name -> name
|
|
||||||
Triggering -> "whosoever triggered this skill"
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
package horse_test
|
|
||||||
|
|
||||||
import (
|
|
||||||
"cmp"
|
|
||||||
"slices"
|
|
||||||
"strings"
|
|
||||||
"sync"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"git.sunturtle.xyz/zephyr/horse/horse"
|
|
||||||
"git.sunturtle.xyz/zephyr/horse/horse/global"
|
|
||||||
)
|
|
||||||
|
|
||||||
var SortedSkills = sync.OnceValue(func() []horse.Skill {
|
|
||||||
skills := make([]horse.Skill, 0, len(global.AllSkills))
|
|
||||||
for _, v := range global.AllSkills {
|
|
||||||
skills = append(skills, v)
|
|
||||||
}
|
|
||||||
slices.SortFunc(skills, func(a, b horse.Skill) int { return cmp.Compare(a.ID, b.ID) })
|
|
||||||
return skills
|
|
||||||
})
|
|
||||||
|
|
||||||
func TestSkillStrings(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
for _, s := range SortedSkills() {
|
|
||||||
for _, a := range s.Activations {
|
|
||||||
for _, abil := range a.Abilities {
|
|
||||||
if n := abil.Type.String(); strings.HasPrefix(n, "AbilityType(") {
|
|
||||||
t.Errorf("%v %s: %s", s.ID, s.Name, n)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestTenThousandthsString(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
cases := []struct {
|
|
||||||
val horse.TenThousandths
|
|
||||||
want string
|
|
||||||
}{
|
|
||||||
{0, "0"},
|
|
||||||
{500, "0.05"},
|
|
||||||
{-500, "-0.05"},
|
|
||||||
{10000, "1"},
|
|
||||||
{-10000, "-1"},
|
|
||||||
{15000, "1.5"},
|
|
||||||
{-15000, "-1.5"},
|
|
||||||
{10001, "1.0001"},
|
|
||||||
{5000000, "500"},
|
|
||||||
}
|
|
||||||
for _, c := range cases {
|
|
||||||
got := c.val.String()
|
|
||||||
if got != c.want {
|
|
||||||
t.Errorf("%d: want %q, got %q", c.val, c.want, got)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-186
@@ -1,186 +0,0 @@
|
|||||||
module horse/spark
|
|
||||||
|
|
||||||
// A single spark.
|
|
||||||
// Parameterized by the spark type: stat, aptitude, unique, race, or skill.
|
|
||||||
pub struct spark<a>
|
|
||||||
kind: a
|
|
||||||
level: level
|
|
||||||
|
|
||||||
pub fun spark/show(spark: spark<a>, level-fancy: string = "*", ?kind: (a) -> string): string
|
|
||||||
kind(spark.kind) ++ " " ++ spark.level.show ++ level-fancy
|
|
||||||
|
|
||||||
pub type level
|
|
||||||
One
|
|
||||||
Two
|
|
||||||
Three
|
|
||||||
|
|
||||||
pub fun level/show(this: level): string
|
|
||||||
match this
|
|
||||||
One -> "1"
|
|
||||||
Two -> "2"
|
|
||||||
Three -> "3"
|
|
||||||
|
|
||||||
// Stat (blue) spark.
|
|
||||||
pub type stat
|
|
||||||
Speed
|
|
||||||
Stamina
|
|
||||||
Power
|
|
||||||
Guts
|
|
||||||
Wit
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Shows a string representation of the `stat` type.
|
|
||||||
pub fun stat/show(this : stat) : e string
|
|
||||||
match this
|
|
||||||
Speed -> "Speed"
|
|
||||||
Stamina -> "Stamina"
|
|
||||||
Power -> "Power"
|
|
||||||
Guts -> "Guts"
|
|
||||||
Wit -> "Wit"
|
|
||||||
|
|
||||||
// Aptitude (red/pink) spark.
|
|
||||||
pub type aptitude
|
|
||||||
Turf
|
|
||||||
Dirt
|
|
||||||
Sprint
|
|
||||||
Mile
|
|
||||||
Medium
|
|
||||||
Long
|
|
||||||
Front-Runner
|
|
||||||
Pace-Chaser
|
|
||||||
Late-Surger
|
|
||||||
End-Closer
|
|
||||||
|
|
||||||
// Shows a string representation of the `aptitude` type.
|
|
||||||
pub fun aptitude/show(this : aptitude): string
|
|
||||||
match this
|
|
||||||
Turf -> "Turf"
|
|
||||||
Dirt -> "Dirt"
|
|
||||||
Sprint -> "Sprint"
|
|
||||||
Mile -> "Mile"
|
|
||||||
Medium -> "Medium"
|
|
||||||
Long -> "Long"
|
|
||||||
Front-Runner -> "Front Runner"
|
|
||||||
Pace-Chaser -> "Pace Chaser"
|
|
||||||
Late-Surger -> "Late Surger"
|
|
||||||
End-Closer -> "End Closer"
|
|
||||||
|
|
||||||
// Unique (green) spark.
|
|
||||||
// TODO: decide this representation; strings? umas? probably depends on skills generally
|
|
||||||
pub type unique
|
|
||||||
|
|
||||||
pub fun unique/show(this: unique): string
|
|
||||||
"TODO(zeph): unique skills"
|
|
||||||
|
|
||||||
// Race, skill, and scenario (white) sparks.
|
|
||||||
pub type generic
|
|
||||||
February-Stakes
|
|
||||||
Takamatsunomiya-Kinen
|
|
||||||
Osaka-Hai
|
|
||||||
Oka-Sho
|
|
||||||
Satsuki-Sho
|
|
||||||
Tenno-Sho-Spring
|
|
||||||
NHK-Mile-Cup
|
|
||||||
Victoria-Mile
|
|
||||||
Japanese-Oaks
|
|
||||||
Japanese-Derby
|
|
||||||
Yasuda-Kinen
|
|
||||||
Takarazuka-Kinen
|
|
||||||
Sprinters-Stakes
|
|
||||||
Shuka-Sho
|
|
||||||
Kikuka-Sho
|
|
||||||
Tenno-Sho-Autumn
|
|
||||||
Queen-Elizabeth-II-Cup
|
|
||||||
Mile-Championship
|
|
||||||
Japan-Cup
|
|
||||||
Champions-Cup
|
|
||||||
Hanshin-Juvenile-Fillies
|
|
||||||
Asahi-Hai-Futurity-Stakes
|
|
||||||
Arima-Kinen
|
|
||||||
Hopeful-Stakes
|
|
||||||
Tokyo-Daishoten
|
|
||||||
JBC-Classic
|
|
||||||
JBC-Sprint
|
|
||||||
JBC-Ladies-Classic
|
|
||||||
Japan-Dirt-Derby
|
|
||||||
Teio-Sho
|
|
||||||
Skill(skill: string)
|
|
||||||
URA-Finale
|
|
||||||
Unity-Cup
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Equality comparison of the `generic` type.
|
|
||||||
pub fun generic/(==)(this : generic, other : generic) : e bool
|
|
||||||
match (this, other)
|
|
||||||
(February-Stakes, February-Stakes) -> True
|
|
||||||
(Takamatsunomiya-Kinen, Takamatsunomiya-Kinen) -> True
|
|
||||||
(Osaka-Hai, Osaka-Hai) -> True
|
|
||||||
(Oka-Sho, Oka-Sho) -> True
|
|
||||||
(Satsuki-Sho, Satsuki-Sho) -> True
|
|
||||||
(Tenno-Sho-Spring, Tenno-Sho-Spring) -> True
|
|
||||||
(NHK-Mile-Cup, NHK-Mile-Cup) -> True
|
|
||||||
(Victoria-Mile, Victoria-Mile) -> True
|
|
||||||
(Japanese-Oaks, Japanese-Oaks) -> True
|
|
||||||
(Japanese-Derby, Japanese-Derby) -> True
|
|
||||||
(Yasuda-Kinen, Yasuda-Kinen) -> True
|
|
||||||
(Takarazuka-Kinen, Takarazuka-Kinen) -> True
|
|
||||||
(Sprinters-Stakes, Sprinters-Stakes) -> True
|
|
||||||
(Shuka-Sho, Shuka-Sho) -> True
|
|
||||||
(Kikuka-Sho, Kikuka-Sho) -> True
|
|
||||||
(Tenno-Sho-Autumn, Tenno-Sho-Autumn) -> True
|
|
||||||
(Queen-Elizabeth-II-Cup, Queen-Elizabeth-II-Cup) -> True
|
|
||||||
(Mile-Championship, Mile-Championship) -> True
|
|
||||||
(Japan-Cup, Japan-Cup) -> True
|
|
||||||
(Champions-Cup, Champions-Cup) -> True
|
|
||||||
(Hanshin-Juvenile-Fillies, Hanshin-Juvenile-Fillies) -> True
|
|
||||||
(Asahi-Hai-Futurity-Stakes, Asahi-Hai-Futurity-Stakes) -> True
|
|
||||||
(Arima-Kinen, Arima-Kinen) -> True
|
|
||||||
(Hopeful-Stakes, Hopeful-Stakes) -> True
|
|
||||||
(Tokyo-Daishoten, Tokyo-Daishoten) -> True
|
|
||||||
(JBC-Classic, JBC-Classic) -> True
|
|
||||||
(JBC-Sprint, JBC-Sprint) -> True
|
|
||||||
(JBC-Ladies-Classic, JBC-Ladies-Classic) -> True
|
|
||||||
(Japan-Dirt-Derby, Japan-Dirt-Derby) -> True
|
|
||||||
(Teio-Sho, Teio-Sho) -> True
|
|
||||||
(Skill(skill), Skill(skill')) -> skill == skill'
|
|
||||||
(URA-Finale, URA-Finale) -> True
|
|
||||||
(Unity-Cup, Unity-Cup) -> True
|
|
||||||
(_, _) -> False
|
|
||||||
|
|
||||||
// Automatically generated.
|
|
||||||
// Shows a string representation of the `generic` type.
|
|
||||||
pub fun generic/show(this : generic) : e string
|
|
||||||
match this
|
|
||||||
February-Stakes -> "February Stakes"
|
|
||||||
Takamatsunomiya-Kinen -> "Takamatsunomiya Kinen"
|
|
||||||
Osaka-Hai -> "Osaka Hai"
|
|
||||||
Oka-Sho -> "Oka Sho"
|
|
||||||
Satsuki-Sho -> "Satsuki Sho"
|
|
||||||
Tenno-Sho-Spring -> "Tenno Sho Spring"
|
|
||||||
NHK-Mile-Cup -> "NHK Mile Cup"
|
|
||||||
Victoria-Mile -> "Victoria Mile"
|
|
||||||
Japanese-Oaks -> "Japanese Oaks"
|
|
||||||
Japanese-Derby -> "Japanese Derby"
|
|
||||||
Yasuda-Kinen -> "Yasuda Kinen"
|
|
||||||
Takarazuka-Kinen -> "Takarazuka Kinen"
|
|
||||||
Sprinters-Stakes -> "Sprinters Stakes"
|
|
||||||
Shuka-Sho -> "Shuka Sho"
|
|
||||||
Kikuka-Sho -> "Kikuka Sho"
|
|
||||||
Tenno-Sho-Autumn -> "Tenno Sho Autumn"
|
|
||||||
Queen-Elizabeth-II-Cup -> "Queen Elizabeth II Cup"
|
|
||||||
Mile-Championship -> "Mile Championship"
|
|
||||||
Japan-Cup -> "Japan Cup"
|
|
||||||
Champions-Cup -> "Champions Cup"
|
|
||||||
Hanshin-Juvenile-Fillies -> "Hanshin Juvenile Fillies"
|
|
||||||
Asahi-Hai-Futurity-Stakes -> "Asahi Hai Futurity Stakes"
|
|
||||||
Arima-Kinen -> "Arima Kinen"
|
|
||||||
Hopeful-Stakes -> "Hopeful Stakes"
|
|
||||||
Tokyo-Daishoten -> "Tokyo Daishoten"
|
|
||||||
JBC-Classic -> "JBC Classic"
|
|
||||||
JBC-Sprint -> "JBC Sprint"
|
|
||||||
JBC-Ladies-Classic -> "JBC Ladies Classic"
|
|
||||||
Japan-Dirt-Derby -> "Japan Dirt Derby"
|
|
||||||
Teio-Sho -> "Teio Sho"
|
|
||||||
Skill(skill) -> skill.show
|
|
||||||
URA-Finale -> "URA Finale"
|
|
||||||
Unity-Cup -> "Unity Cup"
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
module horse/trainee
|
|
||||||
|
|
||||||
import horse/movement
|
|
||||||
|
|
||||||
// Details of a trainee.
|
|
||||||
pub struct trainee-detail
|
|
||||||
turf: level
|
|
||||||
dirt: level
|
|
||||||
sprint: level
|
|
||||||
mile: level
|
|
||||||
medium: level
|
|
||||||
long: level
|
|
||||||
front-runner: level
|
|
||||||
pace-chaser: level
|
|
||||||
late-surger: level
|
|
||||||
end-closer: level
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# gen
|
|
||||||
|
|
||||||
Go tool to generate the Koka source code from the game's SQLite database.
|
|
||||||
|
|
||||||
Code is generated using Go templates.
|
|
||||||
Templates use a `kkenum` function which converts a name `Mr. C.B.` to a Koka enumerant name `Mr-CB`.
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
WITH uma_names AS (
|
|
||||||
SELECT
|
|
||||||
"index" AS "id",
|
|
||||||
"text" AS "name"
|
|
||||||
FROM text_data
|
|
||||||
WHERE category = 6 AND "index" BETWEEN 1000 AND 1999
|
|
||||||
-- Exclude characters who have no succession relations defined.
|
|
||||||
AND "index" IN (SELECT chara_id FROM succession_relation_member)
|
|
||||||
), pairs AS (
|
|
||||||
SELECT
|
|
||||||
a.id AS id_a,
|
|
||||||
a.name AS name_a,
|
|
||||||
b.id AS id_b,
|
|
||||||
b.name AS name_b
|
|
||||||
FROM uma_names a
|
|
||||||
JOIN uma_names b ON a.id != b.id -- exclude reflexive cases
|
|
||||||
), relation_pairs AS (
|
|
||||||
SELECT
|
|
||||||
ra.relation_type,
|
|
||||||
ra.chara_id AS id_a,
|
|
||||||
rb.chara_id AS id_b
|
|
||||||
FROM succession_relation_member ra
|
|
||||||
JOIN succession_relation_member rb ON ra.relation_type = rb.relation_type
|
|
||||||
), affinity AS (
|
|
||||||
SELECT
|
|
||||||
pairs.*,
|
|
||||||
SUM(IFNULL(relation_point, 0)) AS base_affinity
|
|
||||||
FROM pairs
|
|
||||||
LEFT JOIN relation_pairs rp ON pairs.id_a = rp.id_a AND pairs.id_b = rp.id_b
|
|
||||||
LEFT JOIN succession_relation sr ON rp.relation_type = sr.relation_type
|
|
||||||
GROUP BY pairs.id_a, pairs.id_b
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
-- Reflexive cases.
|
|
||||||
SELECT
|
|
||||||
uma_names.id AS id_a,
|
|
||||||
uma_names.name AS name_a,
|
|
||||||
uma_names.id AS id_b,
|
|
||||||
uma_names.name AS name_b,
|
|
||||||
0 AS base_affinity
|
|
||||||
FROM uma_names
|
|
||||||
)
|
|
||||||
SELECT * FROM affinity
|
|
||||||
ORDER BY id_a, id_b
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
WITH uma_names AS (
|
|
||||||
SELECT
|
|
||||||
"index" AS "id",
|
|
||||||
"text" AS "name"
|
|
||||||
FROM text_data
|
|
||||||
WHERE category = 6 AND "index" BETWEEN 1000 AND 1999
|
|
||||||
-- Exclude characters who have no succession relations defined.
|
|
||||||
AND "index" IN (SELECT chara_id FROM succession_relation_member)
|
|
||||||
), trios AS (
|
|
||||||
SELECT
|
|
||||||
a.id AS id_a,
|
|
||||||
a.name AS name_a,
|
|
||||||
b.id AS id_b,
|
|
||||||
b.name AS name_b,
|
|
||||||
c.id AS id_c,
|
|
||||||
c.name AS name_c
|
|
||||||
FROM uma_names a
|
|
||||||
JOIN uma_names b ON a.id != b.id -- exclude pairwise reflexive cases
|
|
||||||
JOIN uma_names c ON a.id != c.id AND b.id != c.id
|
|
||||||
), relation_trios AS (
|
|
||||||
SELECT
|
|
||||||
ra.relation_type,
|
|
||||||
ra.chara_id AS id_a,
|
|
||||||
rb.chara_id AS id_b,
|
|
||||||
rc.chara_id AS id_c
|
|
||||||
FROM succession_relation_member ra
|
|
||||||
JOIN succession_relation_member rb ON ra.relation_type = rb.relation_type
|
|
||||||
JOIN succession_relation_member rc ON ra.relation_type = rc.relation_type
|
|
||||||
), affinity AS (
|
|
||||||
SELECT
|
|
||||||
trios.*,
|
|
||||||
SUM(IFNULL(relation_point, 0)) AS base_affinity
|
|
||||||
FROM trios
|
|
||||||
LEFT JOIN relation_trios rt ON trios.id_a = rt.id_a AND trios.id_b = rt.id_b AND trios.id_c = rt.id_c
|
|
||||||
LEFT JOIN succession_relation sr ON rt.relation_type = sr.relation_type
|
|
||||||
GROUP BY trios.id_a, trios.id_b, trios.id_c
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
-- A = B = C
|
|
||||||
SELECT
|
|
||||||
n.id AS id_a,
|
|
||||||
n.name AS name_a,
|
|
||||||
n.id AS id_b,
|
|
||||||
n.name AS name_b,
|
|
||||||
n.id AS id_c,
|
|
||||||
n.name AS name_c,
|
|
||||||
0 AS base_affinity
|
|
||||||
FROM uma_names n
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
-- A = B
|
|
||||||
SELECT
|
|
||||||
n.id AS id_a,
|
|
||||||
n.name AS name_a,
|
|
||||||
n.id AS id_a,
|
|
||||||
n.name AS id_b,
|
|
||||||
m.id AS id_c,
|
|
||||||
m.name AS name_c,
|
|
||||||
0 AS base_affinity
|
|
||||||
FROM uma_names n JOIN uma_names m ON n.id != m.id
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
-- A = C
|
|
||||||
SELECT
|
|
||||||
n.id AS id_a,
|
|
||||||
n.name AS name_a,
|
|
||||||
m.id AS id_a,
|
|
||||||
m.name AS id_b,
|
|
||||||
n.id AS id_c,
|
|
||||||
n.name AS name_c,
|
|
||||||
0 AS base_affinity
|
|
||||||
FROM uma_names n JOIN uma_names m ON n.id != m.id
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
-- B = C
|
|
||||||
SELECT
|
|
||||||
m.id AS id_a,
|
|
||||||
m.name AS name_a,
|
|
||||||
n.id AS id_a,
|
|
||||||
n.name AS id_b,
|
|
||||||
n.id AS id_c,
|
|
||||||
n.name AS name_c,
|
|
||||||
0 AS base_affinity
|
|
||||||
FROM uma_names n JOIN uma_names m ON n.id != m.id
|
|
||||||
)
|
|
||||||
SELECT * FROM affinity
|
|
||||||
ORDER BY id_a, id_b, id_c
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
{{ define "go-character" -}}
|
|
||||||
package {{ $.Region }}
|
|
||||||
|
|
||||||
// Automatically generated with horsegen; DO NOT EDIT
|
|
||||||
|
|
||||||
import . "git.sunturtle.xyz/zephyr/horse/horse"
|
|
||||||
|
|
||||||
const (
|
|
||||||
{{- range $c := $.Characters }}
|
|
||||||
Character{{ goenum $c.Name }} CharacterID = {{ $c.ID }} // {{ $c.Name }}
|
|
||||||
{{- end }}
|
|
||||||
)
|
|
||||||
|
|
||||||
var OrderedCharacters = [...]CharacterID{
|
|
||||||
{{- range $c := $.Characters }}
|
|
||||||
Character{{ goenum $c.Name }},
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
|
|
||||||
var Characters = map[CharacterID]Character{
|
|
||||||
{{- range $c := $.Characters }}
|
|
||||||
Character{{ goenum $c.Name }}: {ID: {{ $c.ID }}, Name: {{ printf "%q" $c.Name -}} },
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
|
|
||||||
var CharacterNameToID = map[string]CharacterID{
|
|
||||||
{{- range $c := $.Characters }}
|
|
||||||
{{ printf "%q" $c.Name }}: {{ $c.ID }},
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
|
|
||||||
var pairAffinity = []int8{
|
|
||||||
{{- range $a := $.Characters -}}
|
|
||||||
{{- range $b := $.Characters -}}
|
|
||||||
{{- index $.PairMaps $a.ID $b.ID -}},
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
}
|
|
||||||
|
|
||||||
var trioAffinity = []int8{
|
|
||||||
{{- range $a := $.Characters -}}
|
|
||||||
{{- range $b := $.Characters -}}
|
|
||||||
{{- range $c := $.Characters -}}
|
|
||||||
{{- index $.TrioMaps $a.ID $b.ID $c.ID -}},
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
}
|
|
||||||
|
|
||||||
func PairAffinity(a, b CharacterID) int {
|
|
||||||
if _, ok := Characters[a]; !ok {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
if _, ok := Characters[b]; !ok {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
return int(pairAffinity[a*{{ $.Count }} + b])
|
|
||||||
}
|
|
||||||
|
|
||||||
func TrioAffinity(a, b, c CharacterID) int {
|
|
||||||
if _, ok := Characters[a]; !ok {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
if _, ok := Characters[b]; !ok {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
if _, ok := Characters[c]; !ok {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
return int(trioAffinity[a*{{ $.Count }}*{{ $.Count }} + b*{{ $.Count }} + c])
|
|
||||||
}
|
|
||||||
{{ end }}
|
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
{{ define "koka-character" -}}
|
|
||||||
module horse/{{ $.Region }}/character
|
|
||||||
|
|
||||||
// Automatically generated with horsegen; DO NOT EDIT
|
|
||||||
|
|
||||||
import std/core/vector
|
|
||||||
import std/core-extras
|
|
||||||
import std/data/rb-map
|
|
||||||
import horse/game-id
|
|
||||||
pub import horse/character
|
|
||||||
|
|
||||||
// Enumeration of all characters for type-safe programming.
|
|
||||||
pub type character
|
|
||||||
{{- range $uma := $.Characters }}
|
|
||||||
{{ kkenum $uma.Name }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
// Get the character ID for a character.
|
|
||||||
pub fun character-id(c: character): character-id
|
|
||||||
match c
|
|
||||||
{{- range $uma := $.Characters }}
|
|
||||||
{{ kkenum $uma.Name }} -> Character-id({{ $uma.ID }})
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
// List of all characters in ID order for easy iterating.
|
|
||||||
pub val all = [
|
|
||||||
{{- range $uma := $.Characters }}
|
|
||||||
{{ kkenum $uma.Name }},
|
|
||||||
{{- end }}
|
|
||||||
]
|
|
||||||
|
|
||||||
val name2id: rbmap<string, character-id> = rb-map/empty()
|
|
||||||
{{- range $uma := $.Characters }}
|
|
||||||
.set({{ printf "%q" $uma.Name }}, Character-id({{ $uma.ID}}))
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
// Get the character ID that has the given exact name.
|
|
||||||
// If no character matches the name, the result is an invalid ID.
|
|
||||||
pub fun from-name(name: string): character-id
|
|
||||||
name2id.lookup(name).default(Character-id(0))
|
|
||||||
|
|
||||||
// Get the name for a character.
|
|
||||||
// If no character matches the ID, the result is the numeric ID.
|
|
||||||
pub fun show(c: character-id): string
|
|
||||||
match c.game-id
|
|
||||||
{{- range $uma := $.Characters }}
|
|
||||||
{{ $uma.ID }} -> {{ printf "%q" $uma.Name }}
|
|
||||||
{{- end }}
|
|
||||||
x -> "character " ++ x.show
|
|
||||||
|
|
||||||
fun character/index(c: character-id): int
|
|
||||||
match c.game-id
|
|
||||||
{{- range $uma := $.Characters }}
|
|
||||||
{{ $uma.ID }} -> {{ $uma.Index }}
|
|
||||||
{{- end }}
|
|
||||||
_ -> -99999999
|
|
||||||
|
|
||||||
// Create the table of all pair affinities.
|
|
||||||
// The affinity is the value at a.index*count + b.index.
|
|
||||||
extern global/create-pair-table(): vector<int>
|
|
||||||
c inline "kk_intx_t arr[] = {
|
|
||||||
{{- range $a := $.Characters }}
|
|
||||||
{{- range $b := $.Characters }}
|
|
||||||
{{- index $.PairMaps $a.ID $b.ID }},
|
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
|
||||||
};\nkk_vector_from_cintarray(arr, (kk_ssize_t){{ $.Count }} * (kk_ssize_t){{ $.Count }}, kk_context())"
|
|
||||||
js inline "[
|
|
||||||
{{- range $a := $.Characters }}
|
|
||||||
{{- range $b := $.Characters }}
|
|
||||||
{{- index $.PairMaps $a.ID $b.ID }},
|
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
|
||||||
]"
|
|
||||||
val global/pair-table = global/create-pair-table()
|
|
||||||
|
|
||||||
// Base affinity between a pair using the global ruleset.
|
|
||||||
pub fun global/pair-affinity(a: character-id, b: character-id): int
|
|
||||||
global/pair-table.at(a.index * {{ $.Count }} + b.index).default(0)
|
|
||||||
|
|
||||||
// Create the table of all trio affinities.
|
|
||||||
// The affinity is the value at a.index*count*count + b.index*count + c.index.
|
|
||||||
extern global/create-trio-table(): vector<int>
|
|
||||||
c inline "kk_intx_t arr[] = {
|
|
||||||
{{- range $a := $.Characters }}
|
|
||||||
{{- range $b := $.Characters }}
|
|
||||||
{{- range $c := $.Characters }}
|
|
||||||
{{- index $.TrioMaps $a.ID $b.ID $c.ID }},
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
|
||||||
};\nkk_vector_from_cintarray(arr, (kk_ssize_t){{ $.Count }} * (kk_ssize_t){{ $.Count }} * (kk_ssize_t){{ $.Count }}, kk_context())"
|
|
||||||
js inline "[
|
|
||||||
{{- range $a := $.Characters }}
|
|
||||||
{{- range $b := $.Characters }}
|
|
||||||
{{- range $c := $.Characters }}
|
|
||||||
{{- index $.TrioMaps $a.ID $b.ID $c.ID }},
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
|
||||||
]"
|
|
||||||
val global/trio-table = global/create-trio-table()
|
|
||||||
|
|
||||||
// Base affinity for a trio using the global ruleset.
|
|
||||||
pub fun global/trio-affinity(a: character-id, b: character-id, c: character-id): int
|
|
||||||
global/trio-table.at(a.index * {{ $.Count }} * {{ $.Count }} + b.index * {{ $.Count }} + c.index).default(0)
|
|
||||||
|
|
||||||
{{- end }}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
SELECT
|
|
||||||
"index" AS "id",
|
|
||||||
"text" AS "name",
|
|
||||||
ROW_NUMBER() OVER (ORDER BY "index") - 1 AS "index"
|
|
||||||
FROM text_data
|
|
||||||
WHERE category = 6 AND "index" BETWEEN 1000 AND 1999
|
|
||||||
-- Exclude characters who have no succession relations defined.
|
|
||||||
AND "index" IN (SELECT chara_id FROM succession_relation_member)
|
|
||||||
ORDER BY "id"
|
|
||||||
-196
@@ -1,196 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"embed"
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
"regexp"
|
|
||||||
"strings"
|
|
||||||
"text/template"
|
|
||||||
"unicode"
|
|
||||||
)
|
|
||||||
|
|
||||||
//go:embed character.kk.template skill.kk.template character.go.template skill.go.template race.kk.template race.go.template
|
|
||||||
var templates embed.FS
|
|
||||||
|
|
||||||
// LoadTemplates sets up templates to render game data to source code.
|
|
||||||
func LoadTemplates() (*template.Template, error) {
|
|
||||||
t := template.New("root")
|
|
||||||
t.Funcs(template.FuncMap{
|
|
||||||
"kkenum": kkenum,
|
|
||||||
"goenum": goenum,
|
|
||||||
})
|
|
||||||
return t.ParseFS(templates, "*")
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExecCharacter renders the Koka character module to kk and the Go character file to g.
|
|
||||||
// If either is nil, it is skipped.
|
|
||||||
func ExecCharacter(t *template.Template, region string, kk, g io.Writer, c []NamedID[Character], pairs, trios []AffinityRelation) error {
|
|
||||||
if len(pairs) != len(c)*len(c) {
|
|
||||||
return fmt.Errorf("there are %d pairs but there must be %d for %d characters", len(pairs), len(c)*len(c), len(c))
|
|
||||||
}
|
|
||||||
if len(trios) != len(c)*len(c)*len(c) {
|
|
||||||
return fmt.Errorf("there are %d trios but there must be %d for %d characters", len(trios), len(c)*len(c)*len(c), len(c))
|
|
||||||
}
|
|
||||||
|
|
||||||
maxid := 0
|
|
||||||
pm := make(map[int]map[int]int, len(c))
|
|
||||||
tm := make(map[int]map[int]map[int]int, len(c))
|
|
||||||
for _, u := range c {
|
|
||||||
maxid = max(maxid, u.ID)
|
|
||||||
pm[u.ID] = make(map[int]int, len(c))
|
|
||||||
tm[u.ID] = make(map[int]map[int]int, len(c))
|
|
||||||
for _, v := range c {
|
|
||||||
tm[u.ID][v.ID] = make(map[int]int, len(c))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for _, p := range pairs {
|
|
||||||
pm[p.IDA][p.IDB] = p.Affinity
|
|
||||||
}
|
|
||||||
for _, t := range trios {
|
|
||||||
tm[t.IDA][t.IDB][t.IDC] = t.Affinity
|
|
||||||
}
|
|
||||||
|
|
||||||
data := struct {
|
|
||||||
Region string
|
|
||||||
Characters []NamedID[Character]
|
|
||||||
Pairs []AffinityRelation
|
|
||||||
Trios []AffinityRelation
|
|
||||||
PairMaps map[int]map[int]int
|
|
||||||
TrioMaps map[int]map[int]map[int]int
|
|
||||||
Count int
|
|
||||||
MaxID int
|
|
||||||
}{region, c, pairs, trios, pm, tm, len(c), maxid}
|
|
||||||
var err error
|
|
||||||
if kk != nil {
|
|
||||||
err = errors.Join(err, t.ExecuteTemplate(kk, "koka-character", &data))
|
|
||||||
}
|
|
||||||
if g != nil {
|
|
||||||
err = errors.Join(err, t.ExecuteTemplate(g, "go-character", &data))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func ExecSkill(t *template.Template, region string, kk, g io.Writer, groups []NamedID[SkillGroup], skills []Skill) error {
|
|
||||||
m := make(map[int][]Skill, len(groups))
|
|
||||||
for _, t := range skills {
|
|
||||||
m[t.GroupID] = append(m[t.GroupID], t)
|
|
||||||
}
|
|
||||||
data := struct {
|
|
||||||
Region string
|
|
||||||
Groups []NamedID[SkillGroup]
|
|
||||||
Skills []Skill
|
|
||||||
Related map[int][]Skill
|
|
||||||
}{region, groups, skills, m}
|
|
||||||
var err error
|
|
||||||
if kk != nil {
|
|
||||||
err = errors.Join(err, t.ExecuteTemplate(kk, "koka-skill", &data))
|
|
||||||
}
|
|
||||||
if g != nil {
|
|
||||||
err = errors.Join(err, t.ExecuteTemplate(g, "go-skill-data", &data))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func ExecRace(t *template.Template, region string, kk, g io.Writer, races []Race) error {
|
|
||||||
data := struct {
|
|
||||||
Region string
|
|
||||||
Races []Race
|
|
||||||
}{region, races}
|
|
||||||
var err error
|
|
||||||
if kk != nil {
|
|
||||||
err = errors.Join(err, t.ExecuteTemplate(kk, "koka-race", &data))
|
|
||||||
}
|
|
||||||
if g != nil {
|
|
||||||
err = errors.Join(err, t.ExecuteTemplate(g, "go-race", &data))
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
const wordSeps = " ,!?/-+();#○☆♡'=♪∀゚∴"
|
|
||||||
|
|
||||||
var (
|
|
||||||
kkReplace = func() *strings.Replacer {
|
|
||||||
r := []string{
|
|
||||||
"Triple 7s", "Triple-Sevens", // hard to replace with the right thing automatically
|
|
||||||
"1,500,000 CC", "One-Million-CC",
|
|
||||||
"15,000,000 CC", "Fifteen-Million-CC",
|
|
||||||
"1st", "First",
|
|
||||||
"114th", "Hundred-Fourteenth",
|
|
||||||
"♡ 3D Nail Art", "Nail-Art",
|
|
||||||
".", "",
|
|
||||||
"\u2019", "",
|
|
||||||
"&", "-and-",
|
|
||||||
"'s", "s",
|
|
||||||
"ó", "o",
|
|
||||||
"∞", "Infinity",
|
|
||||||
"\u00d7", "x",
|
|
||||||
"◎", "Lv2",
|
|
||||||
}
|
|
||||||
for _, c := range wordSeps {
|
|
||||||
r = append(r, string(c), "-")
|
|
||||||
}
|
|
||||||
return strings.NewReplacer(r...)
|
|
||||||
}()
|
|
||||||
kkMultidash = regexp.MustCompile(`-+`)
|
|
||||||
kkDashNonletter = regexp.MustCompile(`-[^A-Za-z]`)
|
|
||||||
|
|
||||||
goReplace = func() *strings.Replacer {
|
|
||||||
r := []string{
|
|
||||||
"Triple 7s", "TripleSevens",
|
|
||||||
"1,500,000 CC", "OneMillionCC",
|
|
||||||
"15,000,000 CC", "FifteenMillionCC",
|
|
||||||
"1st", "First",
|
|
||||||
"♡ 3D Nail Art", "NailArt",
|
|
||||||
".", "",
|
|
||||||
"\u2019", "",
|
|
||||||
"&", "And",
|
|
||||||
"'s", "s",
|
|
||||||
"∞", "Infinity",
|
|
||||||
"\u00d7", "X",
|
|
||||||
"◎", "Lv2",
|
|
||||||
}
|
|
||||||
for _, c := range wordSeps {
|
|
||||||
r = append(r, string(c), "")
|
|
||||||
}
|
|
||||||
return strings.NewReplacer(r...)
|
|
||||||
}()
|
|
||||||
)
|
|
||||||
|
|
||||||
func kkenum(name string) string {
|
|
||||||
orig := name
|
|
||||||
name = kkReplace.Replace(name)
|
|
||||||
name = kkMultidash.ReplaceAllLiteralString(name, "-")
|
|
||||||
name = strings.Trim(name, "-")
|
|
||||||
if len(name) == 0 {
|
|
||||||
panic(fmt.Errorf("%q became empty as Koka enum variant", orig))
|
|
||||||
}
|
|
||||||
name = strings.ToUpper(name[:1]) + name[1:]
|
|
||||||
if !unicode.IsLetter(rune(name[0])) {
|
|
||||||
//lint:ignore ST1005 proper name
|
|
||||||
panic(fmt.Errorf("Koka enum variant %q (from %q) starts with a non-letter", name, orig))
|
|
||||||
}
|
|
||||||
for _, c := range name {
|
|
||||||
if c > 127 {
|
|
||||||
// Koka does not allow non-ASCII characters in source code.
|
|
||||||
// Don't proceed if we've missed one.
|
|
||||||
panic(fmt.Errorf("non-ASCII character %q (%[1]U) in Koka enum variant %q (from %q)", c, name, orig))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if kkDashNonletter.MatchString(name) {
|
|
||||||
panic(fmt.Errorf("non-letter character after a dash in Koka enum variant %q (from %q)", name, orig))
|
|
||||||
}
|
|
||||||
return name
|
|
||||||
}
|
|
||||||
|
|
||||||
func goenum(name string) string {
|
|
||||||
// go names are a bit more lax, so we need fewer checks
|
|
||||||
orig := name
|
|
||||||
name = goReplace.Replace(name)
|
|
||||||
if len(name) == 0 {
|
|
||||||
panic(fmt.Errorf("%q became empty as Go enum variant", orig))
|
|
||||||
}
|
|
||||||
name = strings.ToUpper(name[:1]) + name[1:]
|
|
||||||
return name
|
|
||||||
}
|
|
||||||
@@ -1,361 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
_ "embed"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"zombiezen.com/go/sqlite/sqlitex"
|
|
||||||
)
|
|
||||||
|
|
||||||
//go:embed character.sql
|
|
||||||
var characterSQL string
|
|
||||||
|
|
||||||
//go:embed character.affinity2.sql
|
|
||||||
var characterAffinity2SQL string
|
|
||||||
|
|
||||||
//go:embed character.affinity3.sql
|
|
||||||
var characterAffinity3SQL string
|
|
||||||
|
|
||||||
//go:embed skill-group.sql
|
|
||||||
var skillGroupSQL string
|
|
||||||
|
|
||||||
//go:embed skill.sql
|
|
||||||
var skillSQL string
|
|
||||||
|
|
||||||
//go:embed race.sql
|
|
||||||
var raceSQL string
|
|
||||||
|
|
||||||
type (
|
|
||||||
Character struct{}
|
|
||||||
SkillGroup struct{}
|
|
||||||
)
|
|
||||||
|
|
||||||
type NamedID[T any] struct {
|
|
||||||
// Disallow conversions between NamedID types.
|
|
||||||
_ [0]*T
|
|
||||||
|
|
||||||
ID int
|
|
||||||
Name string
|
|
||||||
// For internal use, the index of the identity, when it's needed.
|
|
||||||
// We don't show this in public API, but it lets us use vectors for lookups.
|
|
||||||
Index int
|
|
||||||
}
|
|
||||||
|
|
||||||
func Characters(ctx context.Context, db *sqlitex.Pool) ([]NamedID[Character], error) {
|
|
||||||
conn, err := db.Take(ctx)
|
|
||||||
defer db.Put(conn)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't get connection for characters: %w", err)
|
|
||||||
}
|
|
||||||
stmt, _, err := conn.PrepareTransient(characterSQL)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't prepare statement for characters: %w", err)
|
|
||||||
}
|
|
||||||
defer stmt.Finalize()
|
|
||||||
|
|
||||||
var r []NamedID[Character]
|
|
||||||
for {
|
|
||||||
ok, err := stmt.Step()
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("error stepping characters: %w", err)
|
|
||||||
}
|
|
||||||
if !ok {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
c := NamedID[Character]{
|
|
||||||
ID: stmt.ColumnInt(0),
|
|
||||||
Name: stmt.ColumnText(1),
|
|
||||||
Index: stmt.ColumnInt(2),
|
|
||||||
}
|
|
||||||
r = append(r, c)
|
|
||||||
}
|
|
||||||
return r, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type AffinityRelation struct {
|
|
||||||
IDA int
|
|
||||||
NameA string
|
|
||||||
IDB int
|
|
||||||
NameB string
|
|
||||||
IDC int
|
|
||||||
NameC string
|
|
||||||
Affinity int
|
|
||||||
}
|
|
||||||
|
|
||||||
func CharacterPairs(ctx context.Context, db *sqlitex.Pool) ([]AffinityRelation, error) {
|
|
||||||
conn, err := db.Take(ctx)
|
|
||||||
defer db.Put(conn)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't get connection for character pairs: %w", err)
|
|
||||||
}
|
|
||||||
stmt, _, err := conn.PrepareTransient(characterAffinity2SQL)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't prepare statement for character pairs: %w", err)
|
|
||||||
}
|
|
||||||
defer stmt.Finalize()
|
|
||||||
|
|
||||||
var r []AffinityRelation
|
|
||||||
for {
|
|
||||||
ok, err := stmt.Step()
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("error stepping character pairs: %w", err)
|
|
||||||
}
|
|
||||||
if !ok {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
p := AffinityRelation{
|
|
||||||
IDA: stmt.ColumnInt(0),
|
|
||||||
NameA: stmt.ColumnText(1),
|
|
||||||
IDB: stmt.ColumnInt(2),
|
|
||||||
NameB: stmt.ColumnText(3),
|
|
||||||
Affinity: stmt.ColumnInt(4),
|
|
||||||
}
|
|
||||||
r = append(r, p)
|
|
||||||
}
|
|
||||||
return r, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func CharacterTrios(ctx context.Context, db *sqlitex.Pool) ([]AffinityRelation, error) {
|
|
||||||
conn, err := db.Take(ctx)
|
|
||||||
defer db.Put(conn)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't get connection for character trios: %w", err)
|
|
||||||
}
|
|
||||||
stmt, _, err := conn.PrepareTransient(characterAffinity3SQL)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't prepare statement for character trios: %w", err)
|
|
||||||
}
|
|
||||||
defer stmt.Finalize()
|
|
||||||
|
|
||||||
var r []AffinityRelation
|
|
||||||
for {
|
|
||||||
ok, err := stmt.Step()
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("error stepping character trios: %w", err)
|
|
||||||
}
|
|
||||||
if !ok {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
p := AffinityRelation{
|
|
||||||
IDA: stmt.ColumnInt(0),
|
|
||||||
NameA: stmt.ColumnText(1),
|
|
||||||
IDB: stmt.ColumnInt(2),
|
|
||||||
NameB: stmt.ColumnText(3),
|
|
||||||
IDC: stmt.ColumnInt(4),
|
|
||||||
NameC: stmt.ColumnText(5),
|
|
||||||
Affinity: stmt.ColumnInt(6),
|
|
||||||
}
|
|
||||||
r = append(r, p)
|
|
||||||
}
|
|
||||||
return r, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func SkillGroups(ctx context.Context, db *sqlitex.Pool) ([]NamedID[SkillGroup], error) {
|
|
||||||
conn, err := db.Take(ctx)
|
|
||||||
defer db.Put(conn)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't get connection for skill groups: %w", err)
|
|
||||||
}
|
|
||||||
stmt, _, err := conn.PrepareTransient(skillGroupSQL)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't prepare statement for skill groups: %w", err)
|
|
||||||
}
|
|
||||||
defer stmt.Finalize()
|
|
||||||
|
|
||||||
var r []NamedID[SkillGroup]
|
|
||||||
for {
|
|
||||||
ok, err := stmt.Step()
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("error stepping skill groups: %w", err)
|
|
||||||
}
|
|
||||||
if !ok {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
g := NamedID[SkillGroup]{
|
|
||||||
ID: stmt.ColumnInt(0),
|
|
||||||
Name: stmt.ColumnText(1),
|
|
||||||
}
|
|
||||||
r = append(r, g)
|
|
||||||
}
|
|
||||||
return r, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type Skill struct {
|
|
||||||
ID int
|
|
||||||
Name string
|
|
||||||
Description string
|
|
||||||
GroupID int
|
|
||||||
GroupName string
|
|
||||||
Rarity int
|
|
||||||
GroupRate int
|
|
||||||
GradeValue int
|
|
||||||
WitCheck bool
|
|
||||||
Activations [2]SkillActivation
|
|
||||||
SPCost int
|
|
||||||
InheritID int
|
|
||||||
UniqueOwnerID int
|
|
||||||
UniqueOwner string
|
|
||||||
IconID int
|
|
||||||
Index int
|
|
||||||
}
|
|
||||||
|
|
||||||
type SkillActivation struct {
|
|
||||||
Precondition string
|
|
||||||
Condition string
|
|
||||||
Duration int
|
|
||||||
Cooldown int
|
|
||||||
Abilities [3]SkillAbility
|
|
||||||
}
|
|
||||||
|
|
||||||
type SkillAbility struct {
|
|
||||||
Type int
|
|
||||||
ValueUsage int
|
|
||||||
Value int
|
|
||||||
Target int
|
|
||||||
TargetValue int
|
|
||||||
}
|
|
||||||
|
|
||||||
func Skills(ctx context.Context, db *sqlitex.Pool) ([]Skill, error) {
|
|
||||||
conn, err := db.Take(ctx)
|
|
||||||
defer db.Put(conn)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't get connection for skills: %w", err)
|
|
||||||
}
|
|
||||||
stmt, _, err := conn.PrepareTransient(skillSQL)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't prepare statement for skills: %w", err)
|
|
||||||
}
|
|
||||||
defer stmt.Finalize()
|
|
||||||
|
|
||||||
var r []Skill
|
|
||||||
for {
|
|
||||||
ok, err := stmt.Step()
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("error stepping skills: %w", err)
|
|
||||||
}
|
|
||||||
if !ok {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
s := Skill{
|
|
||||||
ID: stmt.ColumnInt(0),
|
|
||||||
Name: stmt.ColumnText(1),
|
|
||||||
Description: stmt.ColumnText(2),
|
|
||||||
GroupID: stmt.ColumnInt(3),
|
|
||||||
GroupName: stmt.ColumnText(4),
|
|
||||||
Rarity: stmt.ColumnInt(5),
|
|
||||||
GroupRate: stmt.ColumnInt(6),
|
|
||||||
GradeValue: stmt.ColumnInt(7),
|
|
||||||
WitCheck: stmt.ColumnInt(8) != 0,
|
|
||||||
Activations: [2]SkillActivation{
|
|
||||||
{
|
|
||||||
Precondition: stmt.ColumnText(9),
|
|
||||||
Condition: stmt.ColumnText(10),
|
|
||||||
Duration: stmt.ColumnInt(11),
|
|
||||||
Cooldown: stmt.ColumnInt(12),
|
|
||||||
Abilities: [3]SkillAbility{
|
|
||||||
{
|
|
||||||
Type: stmt.ColumnInt(13),
|
|
||||||
ValueUsage: stmt.ColumnInt(14),
|
|
||||||
Value: stmt.ColumnInt(15),
|
|
||||||
Target: stmt.ColumnInt(16),
|
|
||||||
TargetValue: stmt.ColumnInt(17),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Type: stmt.ColumnInt(18),
|
|
||||||
ValueUsage: stmt.ColumnInt(19),
|
|
||||||
Value: stmt.ColumnInt(20),
|
|
||||||
Target: stmt.ColumnInt(21),
|
|
||||||
TargetValue: stmt.ColumnInt(22),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Type: stmt.ColumnInt(23),
|
|
||||||
ValueUsage: stmt.ColumnInt(24),
|
|
||||||
Value: stmt.ColumnInt(25),
|
|
||||||
Target: stmt.ColumnInt(26),
|
|
||||||
TargetValue: stmt.ColumnInt(27),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Precondition: stmt.ColumnText(28),
|
|
||||||
Condition: stmt.ColumnText(29),
|
|
||||||
Duration: stmt.ColumnInt(30),
|
|
||||||
Cooldown: stmt.ColumnInt(31),
|
|
||||||
Abilities: [3]SkillAbility{
|
|
||||||
{
|
|
||||||
Type: stmt.ColumnInt(32),
|
|
||||||
ValueUsage: stmt.ColumnInt(33),
|
|
||||||
Value: stmt.ColumnInt(34),
|
|
||||||
Target: stmt.ColumnInt(35),
|
|
||||||
TargetValue: stmt.ColumnInt(36),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Type: stmt.ColumnInt(37),
|
|
||||||
ValueUsage: stmt.ColumnInt(38),
|
|
||||||
Value: stmt.ColumnInt(39),
|
|
||||||
Target: stmt.ColumnInt(40),
|
|
||||||
TargetValue: stmt.ColumnInt(41),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Type: stmt.ColumnInt(42),
|
|
||||||
ValueUsage: stmt.ColumnInt(43),
|
|
||||||
Value: stmt.ColumnInt(44),
|
|
||||||
Target: stmt.ColumnInt(45),
|
|
||||||
TargetValue: stmt.ColumnInt(46),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
SPCost: stmt.ColumnInt(47),
|
|
||||||
InheritID: stmt.ColumnInt(48),
|
|
||||||
UniqueOwnerID: stmt.ColumnInt(49),
|
|
||||||
UniqueOwner: stmt.ColumnText(50),
|
|
||||||
IconID: stmt.ColumnInt(51),
|
|
||||||
Index: stmt.ColumnInt(52),
|
|
||||||
}
|
|
||||||
r = append(r, s)
|
|
||||||
}
|
|
||||||
return r, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type Race struct {
|
|
||||||
ID int
|
|
||||||
Name string
|
|
||||||
Grade int
|
|
||||||
ThumbnailID int
|
|
||||||
Primary int
|
|
||||||
}
|
|
||||||
|
|
||||||
func Races(ctx context.Context, db *sqlitex.Pool) ([]Race, error) {
|
|
||||||
conn, err := db.Take(ctx)
|
|
||||||
defer db.Put(conn)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't get connection for races: %w", err)
|
|
||||||
}
|
|
||||||
stmt, _, err := conn.PrepareTransient(raceSQL)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("couldn't prepare statement for races: %w", err)
|
|
||||||
}
|
|
||||||
defer stmt.Finalize()
|
|
||||||
|
|
||||||
var r []Race
|
|
||||||
for {
|
|
||||||
ok, err := stmt.Step()
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("error stepping races: %w", err)
|
|
||||||
}
|
|
||||||
if !ok {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
race := Race{
|
|
||||||
ID: stmt.ColumnInt(0),
|
|
||||||
Name: stmt.ColumnText(1),
|
|
||||||
Grade: stmt.ColumnInt(2),
|
|
||||||
ThumbnailID: stmt.ColumnInt(3),
|
|
||||||
Primary: stmt.ColumnInt(4),
|
|
||||||
}
|
|
||||||
r = append(r, race)
|
|
||||||
}
|
|
||||||
return r, nil
|
|
||||||
}
|
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"flag"
|
|
||||||
"log/slog"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"path/filepath"
|
|
||||||
|
|
||||||
"golang.org/x/sync/errgroup"
|
|
||||||
"zombiezen.com/go/sqlite"
|
|
||||||
"zombiezen.com/go/sqlite/sqlitex"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
var (
|
|
||||||
mdb string
|
|
||||||
out string
|
|
||||||
region string
|
|
||||||
)
|
|
||||||
flag.StringVar(&mdb, "mdb", os.ExpandEnv(`$USERPROFILE\AppData\LocalLow\Cygames\Umamusume\master\master.mdb`), "`path` to Umamusume master.mdb")
|
|
||||||
flag.StringVar(&out, "o", `horse`, "`dir`ectory for output files")
|
|
||||||
flag.StringVar(®ion, "region", "global", "region the database is for (global, jp)")
|
|
||||||
flag.Parse()
|
|
||||||
|
|
||||||
pctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
|
|
||||||
go func() {
|
|
||||||
<-pctx.Done()
|
|
||||||
stop()
|
|
||||||
}()
|
|
||||||
|
|
||||||
t, err := LoadTemplates()
|
|
||||||
if err != nil {
|
|
||||||
slog.Error("loading templates", slog.Any("err", err))
|
|
||||||
os.Exit(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
slog.Info("open", slog.String("mdb", mdb))
|
|
||||||
db, err := sqlitex.NewPool(mdb, sqlitex.PoolOptions{Flags: sqlite.OpenReadOnly})
|
|
||||||
if err != nil {
|
|
||||||
slog.Error("opening mdb", slog.String("mdb", mdb), slog.Any("err", err))
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
eg, ctx := errgroup.WithContext(pctx)
|
|
||||||
var (
|
|
||||||
charas []NamedID[Character]
|
|
||||||
pairs []AffinityRelation
|
|
||||||
trios []AffinityRelation
|
|
||||||
sg []NamedID[SkillGroup]
|
|
||||||
skills []Skill
|
|
||||||
races []Race
|
|
||||||
)
|
|
||||||
eg.Go(func() error {
|
|
||||||
slog.Info("get characters")
|
|
||||||
r, err := Characters(ctx, db)
|
|
||||||
charas = r
|
|
||||||
return err
|
|
||||||
})
|
|
||||||
eg.Go(func() error {
|
|
||||||
slog.Info("get pairs")
|
|
||||||
r, err := CharacterPairs(ctx, db)
|
|
||||||
pairs = r
|
|
||||||
return err
|
|
||||||
})
|
|
||||||
eg.Go(func() error {
|
|
||||||
slog.Info("get trios")
|
|
||||||
r, err := CharacterTrios(ctx, db)
|
|
||||||
trios = r
|
|
||||||
return err
|
|
||||||
})
|
|
||||||
eg.Go(func() error {
|
|
||||||
slog.Info("get skill groups")
|
|
||||||
r, err := SkillGroups(ctx, db)
|
|
||||||
sg = r
|
|
||||||
return err
|
|
||||||
})
|
|
||||||
eg.Go(func() error {
|
|
||||||
slog.Info("get skills")
|
|
||||||
r, err := Skills(ctx, db)
|
|
||||||
skills = r
|
|
||||||
return err
|
|
||||||
})
|
|
||||||
eg.Go(func() error {
|
|
||||||
slog.Info("get races")
|
|
||||||
r, err := Races(ctx, db)
|
|
||||||
races = r
|
|
||||||
return err
|
|
||||||
})
|
|
||||||
if err := eg.Wait(); err != nil {
|
|
||||||
slog.Error("load", slog.Any("err", err))
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := os.MkdirAll(filepath.Join(out, region), 0775); err != nil {
|
|
||||||
slog.Error("create output dir", slog.Any("err", err))
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
eg, ctx = errgroup.WithContext(pctx)
|
|
||||||
eg.Go(func() error {
|
|
||||||
cf, err := os.Create(filepath.Join(out, region, "character.kk"))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
gf, err := os.Create(filepath.Join(out, region, "character.go"))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
slog.Info("write characters")
|
|
||||||
return ExecCharacter(t, region, cf, gf, charas, pairs, trios)
|
|
||||||
})
|
|
||||||
eg.Go(func() error {
|
|
||||||
sf, err := os.Create(filepath.Join(out, region, "skill.kk"))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
gf, err := os.Create(filepath.Join(out, region, "skill.go"))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
slog.Info("write skills")
|
|
||||||
return ExecSkill(t, region, sf, gf, sg, skills)
|
|
||||||
})
|
|
||||||
eg.Go(func() error {
|
|
||||||
kf, err := os.Create(filepath.Join(out, region, "race.kk"))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
gf, err := os.Create(filepath.Join(out, region, "race.go"))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
slog.Info("write races")
|
|
||||||
return ExecRace(t, region, kf, gf, races)
|
|
||||||
})
|
|
||||||
if err := eg.Wait(); err != nil {
|
|
||||||
slog.Error("generate", slog.Any("err", err))
|
|
||||||
os.Exit(1)
|
|
||||||
} else {
|
|
||||||
slog.Info("done")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
{{- define "go-race" -}}
|
|
||||||
package {{ $.Region }}
|
|
||||||
|
|
||||||
// Automatically generated with horsegen; DO NOT EDIT
|
|
||||||
|
|
||||||
import . "git.sunturtle.xyz/zephyr/horse/horse"
|
|
||||||
|
|
||||||
const (
|
|
||||||
{{- range $r := $.Races }}
|
|
||||||
Race{{ goenum $r.Name }}{{ if ne $r.Primary $r.ID }}Alternate{{ end }} RaceID = {{ $r.ID }} // {{ $r.Name }}
|
|
||||||
{{- end }}
|
|
||||||
)
|
|
||||||
|
|
||||||
var AllRaces = map[RaceID]Race{
|
|
||||||
{{- range $r := $.Races }}
|
|
||||||
Race{{ goenum $r.Name }}{{ if ne $r.Primary $r.ID }}Alternate{{ end }}: {
|
|
||||||
ID: {{ $r.ID }},
|
|
||||||
Name: {{ printf "%q" $r.Name }}{{ if ne $r.Primary $r.ID }} + " (Alternate)"{{ end }},
|
|
||||||
Thumbnail: {{ $r.ThumbnailID }},
|
|
||||||
{{- if ne $r.Primary $r.ID }}
|
|
||||||
Primary: {{ $r.Primary }},
|
|
||||||
{{- end }}
|
|
||||||
},
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
|
|
||||||
var RaceNameToID = map[string]RaceID{
|
|
||||||
{{- range $r := $.Races }}
|
|
||||||
{{ printf "%q" $r.Name }}{{ if ne $r.Primary $r.ID }} + " (Alternate)"{{ end }}: {{ $r.ID }},
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
{{ end }}
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
{{- define "koka-race" -}}
|
|
||||||
module horse/{{ $.Region }}/race
|
|
||||||
|
|
||||||
// Automatically generated with horsegen; DO NOT EDIT
|
|
||||||
|
|
||||||
import std/data/rb-map
|
|
||||||
import horse/game-id
|
|
||||||
pub import horse/race
|
|
||||||
|
|
||||||
// Enumeration of all races for type-safe programming.
|
|
||||||
pub type race
|
|
||||||
{{- range $r := $.Races }}
|
|
||||||
{{ kkenum $r.Name }}{{ if ne $r.Primary $r.ID }}-Alternate{{ end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
// Get the race ID for a race.
|
|
||||||
pub fun race-id(r: race): race-id
|
|
||||||
match r
|
|
||||||
{{- range $r := $.Races }}
|
|
||||||
{{ kkenum $r.Name }}{{ if ne $r.Primary $r.ID }}-Alternate{{ end }} -> Race-id({{ $r.ID }})
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
// List of all races in ID order for easy iterating.
|
|
||||||
pub val all = [
|
|
||||||
{{- range $r := $.Races }}
|
|
||||||
{{ kkenum $r.Name }}{{ if ne $r.Primary $r.ID }}-Alternate{{ end }},
|
|
||||||
{{- end }}
|
|
||||||
]
|
|
||||||
|
|
||||||
val name2id: rbmap<string, race-id> = rb-map/empty()
|
|
||||||
{{- range $r := $.Races }}
|
|
||||||
.set({{ printf "%q" $r.Name }}{{ if ne $r.Primary $r.ID }} ++ " (Alternate)"{{ end }}, Race-id({{ $r.ID }}))
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
// Get the race ID that has the given exact name.
|
|
||||||
// Alternate versions of races have " (Alternate)" in their names.
|
|
||||||
// If no race matches the name, the result is an invalid ID.
|
|
||||||
pub fun from-name(name: string): race-id
|
|
||||||
name2id.lookup(name).default(Race-id(0))
|
|
||||||
|
|
||||||
// Get the name for a race.
|
|
||||||
// Alternate versions of races have " (Alternate)" in their names.
|
|
||||||
// If no race matches the ID, the result is the numeric ID.
|
|
||||||
pub fun show(r: race-id): string
|
|
||||||
match r.game-id
|
|
||||||
{{- range $r := $.Races }}
|
|
||||||
{{ $r.ID }} -> {{ printf "%q" $r.Name }}{{ if ne $r.Primary $r.ID }} ++ " (Alternate)"{{ end }}
|
|
||||||
{{- end }}
|
|
||||||
x -> "race " ++ x.show
|
|
||||||
|
|
||||||
// Get the grade for a race.
|
|
||||||
// If no race matches the ID, the result is Pre-OP.
|
|
||||||
pub fun grade(r: race-id): grade
|
|
||||||
match r.game-id
|
|
||||||
{{- range $r := $.Races }}
|
|
||||||
{{ $r.ID }} -> {{ if eq $r.Grade 100 }}G1{{ else if eq $r.Grade 200 }}G2{{ else if eq $r.Grade 300 }}G3{{ else if eq $r.Grade 400 }}OP{{ else if eq $r.Grade 700 }}Pre-OP{{ else }}??? $r.Grade={{ $r.Grade }}{{ end }}
|
|
||||||
{{- end }}
|
|
||||||
_ -> Pre-OP
|
|
||||||
|
|
||||||
// Get the thumbnail ID for a race.
|
|
||||||
// If no race matches the ID, the result is an invalid ID.
|
|
||||||
pub fun thumbnail(r: race-id): race-thumbnail-id
|
|
||||||
match r.game-id
|
|
||||||
{{- range $r := $.Races }}
|
|
||||||
{{ $r.ID }} -> Race-thumbnail-id({{ $r.ThumbnailID }})
|
|
||||||
{{- end }}
|
|
||||||
_ -> Race-thumbnail-id(0)
|
|
||||||
|
|
||||||
// Get the primary ID for a race.
|
|
||||||
// For races which are the primary version, or if no race matches the given ID,
|
|
||||||
// the result is the input.
|
|
||||||
pub fun primary(r: race-id): race-id
|
|
||||||
match r.game-id
|
|
||||||
{{- range $r := $.Races }}
|
|
||||||
{{- if ne $r.ID $r.Primary }}
|
|
||||||
{{ $r.ID }} -> Race-id({{ $r.Primary }})
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
_ -> r
|
|
||||||
{{ end }}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
WITH skill_names AS (
|
|
||||||
SELECT
|
|
||||||
"index" AS "id",
|
|
||||||
"text" AS "name"
|
|
||||||
FROM text_data
|
|
||||||
WHERE category = 47
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
group_id,
|
|
||||||
name
|
|
||||||
FROM skill_data d
|
|
||||||
JOIN skill_names n ON d.id = n.id
|
|
||||||
WHERE d.group_rate = 1
|
|
||||||
ORDER BY group_id
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
{{- define "go-skill-data" -}}
|
|
||||||
package {{ $.Region }}
|
|
||||||
|
|
||||||
// Automatically generated with horsegen; DO NOT EDIT
|
|
||||||
|
|
||||||
import . "git.sunturtle.xyz/zephyr/horse/horse"
|
|
||||||
|
|
||||||
const (
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
Skill{{ goenum $s.Name }}{{ if ne $s.InheritID 0 }}Inherit{{ end }} SkillID = {{ $s.ID }} // {{ $s.Name }}
|
|
||||||
{{- end }}
|
|
||||||
)
|
|
||||||
|
|
||||||
var OrderedSkills = [...]SkillID{
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
Skill{{ goenum $s.Name }}{{ if ne $s.InheritID 0 }}Inherit{{ end }},
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
|
|
||||||
var AllSkills = map[SkillID]Skill{
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
Skill{{ goenum $s.Name }}{{ if ne $s.InheritID 0 }}Inherit{{ end }}: {
|
|
||||||
ID: {{ $s.ID }},
|
|
||||||
Name: {{ printf "%q" $s.Name }}{{ if ne $s.InheritID 0 }} + " (Inherited)"{{ end }},
|
|
||||||
Description: {{ printf "%q" $s.Description }},
|
|
||||||
Group: {{ $s.GroupID }},
|
|
||||||
Rarity: {{ $s.Rarity }},
|
|
||||||
GroupRate: {{ $s.GroupRate }},
|
|
||||||
GradeValue: {{ $s.GradeValue }},
|
|
||||||
{{- if $s.WitCheck }}
|
|
||||||
WitCheck: {{ $s.WitCheck }},
|
|
||||||
{{- end }}
|
|
||||||
Activations: []Activation{
|
|
||||||
{{- range $a := $s.Activations }}
|
|
||||||
{{- if ne $a.Condition "" }}
|
|
||||||
{
|
|
||||||
{{- if $a.Precondition }}
|
|
||||||
Precondition: {{ printf "%q" $a.Precondition }},
|
|
||||||
{{- end }}
|
|
||||||
Condition: {{ printf "%q" $a.Condition }},
|
|
||||||
Duration: {{ $a.Duration }},
|
|
||||||
{{- if $a.Cooldown }}
|
|
||||||
Cooldown: {{ $a.Cooldown }},
|
|
||||||
{{- end }}
|
|
||||||
Abilities: []Ability{
|
|
||||||
{{- range $abil := $a.Abilities }}
|
|
||||||
{{- if ne $abil.Type 0 }}
|
|
||||||
{Type: {{ $abil.Type }}, ValueUsage: {{ $abil.ValueUsage }}, Value: {{ $abil.Value }}, Target: {{ $abil.Target }}, TargetValue: {{ $abil.TargetValue -}} },
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
},
|
|
||||||
{{- if $s.UniqueOwner }}
|
|
||||||
UniqueOwner: {{ printf "%q" $s.UniqueOwner }},
|
|
||||||
{{- end }}
|
|
||||||
{{- if $s.SPCost }}
|
|
||||||
SPCost: {{ $s.SPCost }},
|
|
||||||
{{- end }}
|
|
||||||
IconID: {{ $s.IconID }},
|
|
||||||
},
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
|
|
||||||
var SkillNameToID = map[string]SkillID{
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ printf "%q" $s.Name }}{{ if ne $s.InheritID 0 }} + " (Inherited)"{{ end }}: {{ $s.ID }},
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
|
|
||||||
var SkillGroups = map[int32][4]SkillID{
|
|
||||||
{{- range $g := $.Groups }}
|
|
||||||
{{ $g.ID }}: { {{- range $s := index $.Related $g.ID }}Skill{{ goenum $s.Name }}{{ if ne $s.InheritID 0 }}Inherit{{ end }}, {{ end -}} },
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
{{ end }}
|
|
||||||
@@ -1,233 +0,0 @@
|
|||||||
{{- define "koka-skill" -}}
|
|
||||||
module horse/{{ $.Region }}/skill
|
|
||||||
|
|
||||||
// Automatically generated with horsegen; DO NOT EDIT
|
|
||||||
|
|
||||||
import std/data/rb-map
|
|
||||||
import std/num/decimal
|
|
||||||
import horse/game-id
|
|
||||||
import horse/movement
|
|
||||||
pub import horse/skill
|
|
||||||
|
|
||||||
// Enumeration of all skills for type-safe programming.
|
|
||||||
pub type skill
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ kkenum $s.Name }}{{ if $s.InheritID }}-Inherit{{ end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
// Get the skill ID for a skill.
|
|
||||||
pub fun skill-id(s: skill): skill-id
|
|
||||||
match s
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ kkenum $s.Name }}{{ if $s.InheritID }}-Inherit{{ end }} -> Skill-id({{ $s.ID }})
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
// List of all skills in ID order for easy iterating.
|
|
||||||
pub val all = [
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ kkenum $s.Name }}{{ if $s.InheritID }}-Inherit{{ end }},
|
|
||||||
{{- end }}
|
|
||||||
]
|
|
||||||
|
|
||||||
val name2id: rbmap<string, skill-id> = rb-map/empty()
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
.set({{ printf "%q" $s.Name }}{{ if $s.InheritID }} ++ " (Inherited)"{{ end }}, Skill-id({{ $s.ID }}))
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
// Get the skill ID that has the given exact name.
|
|
||||||
// Inherited skills have `" (Inherited)"` appended to their names.
|
|
||||||
// If no skill matches the name, the result is an invalid ID.
|
|
||||||
pub fun from-name(name: string): skill-id
|
|
||||||
name2id.lookup(name).default(Skill-id(0))
|
|
||||||
|
|
||||||
// Get the name for a skill.
|
|
||||||
// Inherited skills have `" (Inherited)"` appended to their names.
|
|
||||||
// If no skill matches the ID, the result is the numeric ID.
|
|
||||||
pub fun show(s: skill-id): string
|
|
||||||
match s.game-id
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ $s.ID }} -> {{ printf "%q" $s.Name }}{{ if $s.InheritID }} ++ " (Inherited)"{{ end }}
|
|
||||||
{{- end }}
|
|
||||||
x -> "skill " ++ x.show
|
|
||||||
|
|
||||||
// Get the description for a skill.
|
|
||||||
// If no skill matches the ID, the result is the empty string.
|
|
||||||
pub fun description(s: skill-id): string
|
|
||||||
match s.game-id
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ $s.ID }} -> {{ printf "%q" $s.Description }}
|
|
||||||
{{- end }}
|
|
||||||
_ -> ""
|
|
||||||
|
|
||||||
// Get the skill group ID for a skill.
|
|
||||||
// If no skill matches the ID, the result is an invalid ID.
|
|
||||||
pub fun group(s: skill-id): skill-group-id
|
|
||||||
match s.game-id
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ $s.ID }} -> Skill-group-id( {{- $s.GroupID -}} )
|
|
||||||
{{- end }}
|
|
||||||
_ -> Skill-group-id(0)
|
|
||||||
|
|
||||||
// Get the rarity of a skill.
|
|
||||||
// If no skill matches the ID, the result is Common.
|
|
||||||
pub fun rarity(s: skill-id): rarity
|
|
||||||
match s.game-id
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ $s.ID }} -> {{ if eq $s.Rarity 1 }}Common{{ else if eq $s.Rarity 2 }}Rare{{ else if eq $s.Rarity 3 }}Unique-Low{{ else if eq $s.Rarity 4 }}Unique-Upgraded{{ else if eq $s.Rarity 5 }}Unique{{ else }}??? $s.Rarity={{ $s.Rarity }}{{ end }}
|
|
||||||
{{- end }}
|
|
||||||
_ -> Common
|
|
||||||
|
|
||||||
// Get the group rate of a skill.
|
|
||||||
// If no skill matches the ID, the result is 0.
|
|
||||||
pub fun group-rate(s: skill-id): int
|
|
||||||
match s.game-id
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ $s.ID }} -> {{ $s.GroupRate }}
|
|
||||||
{{- end }}
|
|
||||||
_ -> 0
|
|
||||||
|
|
||||||
// Get the grade value of a skill.
|
|
||||||
// If no skill matches the ID, the result is 0.
|
|
||||||
pub fun grade-value(s: skill-id): int
|
|
||||||
match s.game-id
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ $s.ID }} -> {{ $s.GradeValue }}
|
|
||||||
{{- end }}
|
|
||||||
_ -> 0
|
|
||||||
|
|
||||||
// Get whether a skill is a wit check.
|
|
||||||
// If no skill matches the ID, the result is False.
|
|
||||||
pub fun wit-check(s: skill-id): bool
|
|
||||||
match s.game-id
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ $s.ID }} -> {{ if $s.WitCheck }}True{{ else }}False{{ end }}
|
|
||||||
{{- end }}
|
|
||||||
_ -> False
|
|
||||||
|
|
||||||
// Get the activations of a skill.
|
|
||||||
// If no skill matches the ID, the result is an empty list.
|
|
||||||
pub fun activations(s: skill-id): list<activation>
|
|
||||||
match s.game-id
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ $s.ID }} -> [
|
|
||||||
{{- range $a := $s.Activations }}
|
|
||||||
{{- if $a.Condition }}
|
|
||||||
Activation(
|
|
||||||
precondition = {{ printf "%q" $a.Precondition }},
|
|
||||||
condition = {{ printf "%q" $a.Condition }},
|
|
||||||
duration = {{ $a.Duration }}.decimal{{ if gt $a.Duration 0 }}(-4){{ end }},
|
|
||||||
cooldown = {{ $a.Cooldown }}.decimal{{ if gt $a.Cooldown 0 }}(-4){{ end }},
|
|
||||||
abilities = [
|
|
||||||
{{- range $abil := $a.Abilities }}
|
|
||||||
{{- if $abil.Type }}
|
|
||||||
Ability(
|
|
||||||
ability-type = {{ if eq $abil.Type 1 }}Passive-Speed({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 2 }}Passive-Stamina({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 3 }}Passive-Power({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 4 }}Passive-Guts({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 5 }}Passive-Wit({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 6 }}Great-Escape
|
|
||||||
{{- else if eq $abil.Type 8 }}Vision({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 9 }}HP({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 10 }}Gate-Delay({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 13 }}Frenzy({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 21 }}Current-Speed({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 27 }}Target-Speed({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 28 }}Lane-Speed({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 31 }}Accel({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else if eq $abil.Type 35 }}Lane-Change({{ $abil.Value }}.decimal(-4))
|
|
||||||
{{- else }}??? $abil.Type={{$abil.Type}}
|
|
||||||
{{- end }},
|
|
||||||
value-usage = {{ if eq $abil.ValueUsage 1 }}Direct
|
|
||||||
{{- else if eq $abil.ValueUsage 3 }}Team-Speed
|
|
||||||
{{- else if eq $abil.ValueUsage 4 }}Team-Stamina
|
|
||||||
{{- else if eq $abil.ValueUsage 5 }}Team-Power
|
|
||||||
{{- else if eq $abil.ValueUsage 6 }}Team-Guts
|
|
||||||
{{- else if eq $abil.ValueUsage 7 }}Team-Wit
|
|
||||||
{{- else if eq $abil.ValueUsage 8 }}Multiply-Random
|
|
||||||
{{- else if eq $abil.ValueUsage 9 }}Multiply-Random2
|
|
||||||
{{- else if eq $abil.ValueUsage 10 }}Climax
|
|
||||||
{{- else if eq $abil.ValueUsage 13 }}Max-Stat
|
|
||||||
{{- else if eq $abil.ValueUsage 14 }}Passive-Count
|
|
||||||
{{- else if eq $abil.ValueUsage 19 }}Front-Distance-Add
|
|
||||||
{{- else if eq $abil.ValueUsage 20 }}Midrace-Side-Block-Time
|
|
||||||
{{- else if eq $abil.ValueUsage 22 }}Speed-Scaling
|
|
||||||
{{- else if eq $abil.ValueUsage 23 }}Speed-Scaling2
|
|
||||||
{{- else if eq $abil.ValueUsage 24 }}Arc-Global-Potential
|
|
||||||
{{- else if eq $abil.ValueUsage 25 }}Max-Lead-Distance
|
|
||||||
{{- else }}??? $abil.ValueUsage={{ $abil.ValueUsage }}
|
|
||||||
{{- end }},
|
|
||||||
target = {{ if eq $abil.Target 1}}Self
|
|
||||||
{{- else if eq $abil.Target 4 }}Sympathizers
|
|
||||||
{{- else if eq $abil.Target 4 }}In-View
|
|
||||||
{{- else if eq $abil.Target 4 }}Frontmost
|
|
||||||
{{- else if eq $abil.Target 9 }}Ahead({{ $abil.TargetValue }})
|
|
||||||
{{- else if eq $abil.Target 10 }}Behind({{ $abil.TargetValue }})
|
|
||||||
{{- else if eq $abil.Target 4 }}All-Teammates
|
|
||||||
{{- else if eq $abil.Target 18 }}Style({{ if eq $abil.TargetValue 1 }}Front-Runner{{ else if eq $abil.TargetValue 2 }}Pace-Chaser{{ else if eq $abil.TargetValue 3 }}Late-Surger{{ else if eq $abil.TargetValue 4 }}End-Closer{{ else }}??? $abil.TargetValue={{ $abil.TargetValue }}{{ end }})
|
|
||||||
{{- else if eq $abil.Target 19 }}Rushing-Ahead({{ $abil.TargetValue }})
|
|
||||||
{{- else if eq $abil.Target 20 }}Rushing-Behind({{ $abil.TargetValue }})
|
|
||||||
{{- else if eq $abil.Target 21 }}Rushing-Style({{ if eq $abil.TargetValue 1 }}Front-Runner{{ else if eq $abil.TargetValue 2 }}Pace-Chaser{{ else if eq $abil.TargetValue 3 }}Late-Surger{{ else if eq $abil.TargetValue 4 }}End-Closer{{ else }}??? $abil.TargetValue={{ $abil.TargetValue }}{{ end }})
|
|
||||||
{{- else if eq $abil.Target 22 }}Specific-Character(Character-id({{ $abil.TargetValue }}))
|
|
||||||
{{- else if eq $abil.Target 23 }}Triggering
|
|
||||||
{{- end }}
|
|
||||||
),
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
]
|
|
||||||
),
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
]
|
|
||||||
{{- end }}
|
|
||||||
_ -> Nil
|
|
||||||
|
|
||||||
// Get the owner of a unique skill.
|
|
||||||
// If the skill is not unique, or if there is no skill with the given ID,
|
|
||||||
// the result is Nothing.
|
|
||||||
pub fun unique-owner(s: skill-id): maybe<trainee-id>
|
|
||||||
match s.game-id
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{- if $s.UniqueOwnerID }}
|
|
||||||
{{ $s.ID }} -> Just(Trainee-id({{ $s.UniqueOwnerID }}))
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
_ -> Nothing
|
|
||||||
|
|
||||||
// Get the SP cost of a skill.
|
|
||||||
// If there is no skill with the given ID, the result is 0.
|
|
||||||
pub fun sp-cost(s: skill-id): int
|
|
||||||
match s.game-id
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ $s.ID }} -> {{ $s.SPCost }}
|
|
||||||
{{- end }}
|
|
||||||
_ -> 0
|
|
||||||
|
|
||||||
// Get the icon ID of a skill.
|
|
||||||
// If there is no skill with the given ID, the result is an invalid ID.
|
|
||||||
pub fun icon-id(s: skill-id): skill-icon-id
|
|
||||||
match s.game-id
|
|
||||||
{{- range $s := $.Skills }}
|
|
||||||
{{ $s.ID }} -> Skill-icon-id({{ $s.IconID }})
|
|
||||||
{{- end }}
|
|
||||||
_ -> Skill-icon-id(0)
|
|
||||||
|
|
||||||
// Get the name for a skill group.
|
|
||||||
// Skill group names are the name of the base skill in the group.
|
|
||||||
// If there is no skill group with the given ID, the result is the numeric ID.
|
|
||||||
pub fun skill-group/show(sg: skill-group-id): string
|
|
||||||
match sg.game-id
|
|
||||||
{{- range $g := $.Groups }}
|
|
||||||
{{ $g.ID }} -> {{- printf "%q" $g.Name -}}
|
|
||||||
{{- end }}
|
|
||||||
x -> "skill group " ++ x.show
|
|
||||||
|
|
||||||
// Get the list of skills in a skill group.
|
|
||||||
pub fun skill-group/skills(sg: skill-group-id): list<skill-id>
|
|
||||||
match sg.game-id
|
|
||||||
{{- range $g := $.Groups }}
|
|
||||||
{{ $g.ID }} -> [ {{- range $s := index $.Related $g.ID }}Skill-id({{ $s.ID }}), {{ end -}} ]
|
|
||||||
{{- end }}
|
|
||||||
_ -> Nil
|
|
||||||
|
|
||||||
{{- end }}
|
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
// Code generated by "stringer -type LobbyConversationLocationID -trimprefix Lobby -linecomment"; DO NOT EDIT.
|
||||||
|
|
||||||
|
package horse
|
||||||
|
|
||||||
|
import "strconv"
|
||||||
|
|
||||||
|
func _() {
|
||||||
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||||
|
// Re-run the stringer command to generate them again.
|
||||||
|
var x [1]struct{}
|
||||||
|
_ = x[LobbyRightFront1-110]
|
||||||
|
_ = x[LobbyRightFront2-120]
|
||||||
|
_ = x[LobbyRightFront3-130]
|
||||||
|
_ = x[LobbyLeftTable1-210]
|
||||||
|
_ = x[LobbyLeftTable2-220]
|
||||||
|
_ = x[LobbyBackSeat-310]
|
||||||
|
_ = x[LobbyPosters1-410]
|
||||||
|
_ = x[LobbyPosters2-420]
|
||||||
|
_ = x[LobbyPosters3-430]
|
||||||
|
_ = x[LobbySchoolMap1-510]
|
||||||
|
_ = x[LobbySchoolMap2-520]
|
||||||
|
_ = x[LobbySchoolMap3-530]
|
||||||
|
}
|
||||||
|
|
||||||
|
const _LobbyConversationLocationID_name = "right side frontright side frontright side frontleft side tableleft side tablecenter back seatcenter posterscenter posterscenter postersleft side school mapleft side school mapleft side school map"
|
||||||
|
|
||||||
|
var _LobbyConversationLocationID_map = map[LobbyConversationLocationID]string{
|
||||||
|
110: _LobbyConversationLocationID_name[0:16],
|
||||||
|
120: _LobbyConversationLocationID_name[16:32],
|
||||||
|
130: _LobbyConversationLocationID_name[32:48],
|
||||||
|
210: _LobbyConversationLocationID_name[48:63],
|
||||||
|
220: _LobbyConversationLocationID_name[63:78],
|
||||||
|
310: _LobbyConversationLocationID_name[78:94],
|
||||||
|
410: _LobbyConversationLocationID_name[94:108],
|
||||||
|
420: _LobbyConversationLocationID_name[108:122],
|
||||||
|
430: _LobbyConversationLocationID_name[122:136],
|
||||||
|
510: _LobbyConversationLocationID_name[136:156],
|
||||||
|
520: _LobbyConversationLocationID_name[156:176],
|
||||||
|
530: _LobbyConversationLocationID_name[176:196],
|
||||||
|
}
|
||||||
|
|
||||||
|
func (i LobbyConversationLocationID) String() string {
|
||||||
|
if str, ok := _LobbyConversationLocationID_map[i]; ok {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
return "LobbyConversationLocationID(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||||
|
}
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
package mdb
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
_ "embed"
|
||||||
|
|
||||||
|
"zombiezen.com/go/sqlite"
|
||||||
|
"zombiezen.com/go/sqlite/sqlitex"
|
||||||
|
|
||||||
|
"git.sunturtle.xyz/zephyr/horse"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
//go:embed sql/character.sql
|
||||||
|
characterSQL string
|
||||||
|
//go:embed sql/affinity.sql
|
||||||
|
affinitySQL string
|
||||||
|
//go:embed sql/affinity-detail.sql
|
||||||
|
affinityDetailSQL string
|
||||||
|
//go:embed sql/uma.sql
|
||||||
|
umaSQL string
|
||||||
|
//go:embed sql/conversation.sql
|
||||||
|
conversationSQL string
|
||||||
|
)
|
||||||
|
|
||||||
|
// Characters retrieves all named characters.
|
||||||
|
func Characters(ctx context.Context, db *sqlitex.Pool) ([]horse.Character, error) {
|
||||||
|
return load(ctx, db, make([]horse.Character, 0, 128), characterSQL, func(s *sqlite.Stmt) horse.Character {
|
||||||
|
return horse.Character{
|
||||||
|
ID: horse.CharacterID(s.ColumnInt(0)),
|
||||||
|
Name: s.ColumnText(1),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// AffinitySummary gets precomputed base affinity for all pairs and trios of characters.
|
||||||
|
func AffinitySummary(ctx context.Context, db *sqlitex.Pool) ([]horse.AffinityRelation, error) {
|
||||||
|
return load(ctx, db, nil, affinitySQL, func(s *sqlite.Stmt) horse.AffinityRelation {
|
||||||
|
return horse.AffinityRelation{
|
||||||
|
IDA: horse.CharacterID(s.ColumnInt(0)),
|
||||||
|
IDB: horse.CharacterID(s.ColumnInt(1)),
|
||||||
|
IDC: horse.CharacterID(s.ColumnInt(2)),
|
||||||
|
Affinity: s.ColumnInt(3),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// AffinityDetail gets all individual affinity group entries.
|
||||||
|
func AffinityDetail(ctx context.Context, db *sqlitex.Pool) ([]horse.AffinityDetail, error) {
|
||||||
|
return load(ctx, db, nil, affinityDetailSQL, func(s *sqlite.Stmt) horse.AffinityDetail {
|
||||||
|
return horse.AffinityDetail{
|
||||||
|
CharaID: horse.CharacterID(s.ColumnInt(0)),
|
||||||
|
Relation: uint16(s.ColumnInt(1)),
|
||||||
|
Affinity: uint16(s.ColumnInt(2)),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Umas retrieves all trainable Uma variants.
|
||||||
|
func Umas(ctx context.Context, db *sqlitex.Pool) ([]horse.Uma, error) {
|
||||||
|
return load(ctx, db, make([]horse.Uma, 0, 128), umaSQL, func(s *sqlite.Stmt) horse.Uma {
|
||||||
|
return horse.Uma{
|
||||||
|
ID: horse.UmaID(s.ColumnInt(0)),
|
||||||
|
CharacterID: horse.CharacterID(s.ColumnInt(1)),
|
||||||
|
Name: s.ColumnText(2),
|
||||||
|
Variant: s.ColumnText(3),
|
||||||
|
Sprint: horse.AptitudeLevel(s.ColumnInt(5)),
|
||||||
|
Mile: horse.AptitudeLevel(s.ColumnInt(6)),
|
||||||
|
Medium: horse.AptitudeLevel(s.ColumnInt(7)),
|
||||||
|
Long: horse.AptitudeLevel(s.ColumnInt(8)),
|
||||||
|
Front: horse.AptitudeLevel(s.ColumnInt(9)),
|
||||||
|
Pace: horse.AptitudeLevel(s.ColumnInt(10)),
|
||||||
|
Late: horse.AptitudeLevel(s.ColumnInt(11)),
|
||||||
|
End: horse.AptitudeLevel(s.ColumnInt(12)),
|
||||||
|
Turf: horse.AptitudeLevel(s.ColumnInt(13)),
|
||||||
|
Dirt: horse.AptitudeLevel(s.ColumnInt(14)),
|
||||||
|
Unique: horse.SkillID(s.ColumnInt(15)),
|
||||||
|
Skill1: horse.SkillID(s.ColumnInt(16)),
|
||||||
|
Skill2: horse.SkillID(s.ColumnInt(17)),
|
||||||
|
Skill3: horse.SkillID(s.ColumnInt(18)),
|
||||||
|
SkillPL2: horse.SkillID(s.ColumnInt(19)),
|
||||||
|
SkillPL3: horse.SkillID(s.ColumnInt(20)),
|
||||||
|
SkillPL4: horse.SkillID(s.ColumnInt(21)),
|
||||||
|
SkillPL5: horse.SkillID(s.ColumnInt(22)),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func Conversations(ctx context.Context, db *sqlitex.Pool) ([]horse.Conversation, error) {
|
||||||
|
return load(ctx, db, make([]horse.Conversation, 0, 1024), conversationSQL, func(s *sqlite.Stmt) horse.Conversation {
|
||||||
|
return horse.Conversation{
|
||||||
|
ID: s.ColumnInt32(0),
|
||||||
|
CharacterID: horse.CharacterID(s.ColumnInt(1)),
|
||||||
|
Number: s.ColumnInt(2),
|
||||||
|
Location: horse.LobbyConversationLocationID(s.ColumnInt(3)),
|
||||||
|
Chara1: horse.CharacterID(s.ColumnInt(4)),
|
||||||
|
Chara2: horse.CharacterID(s.ColumnInt(5)),
|
||||||
|
Chara3: horse.CharacterID(s.ColumnInt(6)),
|
||||||
|
ConditionType: s.ColumnInt(7),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,336 @@
|
|||||||
|
package mdb_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "embed"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"git.sunturtle.xyz/zephyr/horse"
|
||||||
|
"git.sunturtle.xyz/zephyr/horse/mdb"
|
||||||
|
"github.com/google/go-cmp/cmp"
|
||||||
|
)
|
||||||
|
|
||||||
|
//go:embed testdata/character.sql
|
||||||
|
var characterSQL string
|
||||||
|
|
||||||
|
func TestCharacters(t *testing.T) {
|
||||||
|
db := testdb(t.Context(), "file:TestCharacters?mode=memory&cache=shared", characterSQL)
|
||||||
|
got, err := mdb.Characters(t.Context(), db)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
want := []horse.Character{
|
||||||
|
{ID: 1001, Name: "Special Week"},
|
||||||
|
{ID: 1002, Name: "Silence Suzuka"},
|
||||||
|
{ID: 1078, Name: "Yamanin Zephyr"},
|
||||||
|
{ID: 2001, Name: "Happy Meek"},
|
||||||
|
{ID: 9001, Name: "Tazuna Hayakawa"},
|
||||||
|
}
|
||||||
|
if diff := cmp.Diff(want, got); diff != "" {
|
||||||
|
t.Errorf("wrong characters (+got/-want):\n%s", diff)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestAffinitySummary(t *testing.T) {
|
||||||
|
db := testdb(t.Context(), "file:TestAffinitySummary?mode=memory&cache=shared", characterSQL)
|
||||||
|
got, err := mdb.AffinitySummary(t.Context(), db)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
want := []horse.AffinityRelation{
|
||||||
|
{IDA: 1001, IDB: 1002, Affinity: 23},
|
||||||
|
}
|
||||||
|
if diff := cmp.Diff(want, got); diff != "" {
|
||||||
|
t.Errorf("wrong affinity (+got/-want):\n%s", diff)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestAffinityDetail(t *testing.T) {
|
||||||
|
db := testdb(t.Context(), "file:TestAffinityDetail?mode=memory&cache=shared", characterSQL)
|
||||||
|
got, err := mdb.AffinityDetail(t.Context(), db)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
want := []horse.AffinityDetail{
|
||||||
|
{CharaID: 1001, Relation: 103, Affinity: 2},
|
||||||
|
{CharaID: 1001, Relation: 202, Affinity: 2},
|
||||||
|
{CharaID: 1001, Relation: 301, Affinity: 2},
|
||||||
|
{CharaID: 1001, Relation: 401, Affinity: 2},
|
||||||
|
{CharaID: 1001, Relation: 502, Affinity: 2},
|
||||||
|
{CharaID: 1001, Relation: 510, Affinity: 2},
|
||||||
|
{CharaID: 1001, Relation: 2001, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 2102, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 2301, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 2406, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 2506, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 2510, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 2516, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 2519, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 2601, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 2603, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 2811, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 2903, Affinity: 7},
|
||||||
|
{CharaID: 1001, Relation: 3003, Affinity: 7},
|
||||||
|
{CharaID: 1001, Relation: 3004, Affinity: 7},
|
||||||
|
{CharaID: 1001, Relation: 3101, Affinity: 7},
|
||||||
|
{CharaID: 1001, Relation: 3205, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 7003, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 7004, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 7005, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 7006, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 7007, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8001, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8002, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8003, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8004, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8005, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8006, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8007, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8008, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8009, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8010, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8011, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8012, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8013, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8014, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8015, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8016, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8443, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8479, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8511, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8536, Affinity: 1},
|
||||||
|
{CharaID: 1001, Relation: 8640, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 104, Affinity: 2},
|
||||||
|
{CharaID: 1002, Relation: 202, Affinity: 2},
|
||||||
|
{CharaID: 1002, Relation: 301, Affinity: 2},
|
||||||
|
{CharaID: 1002, Relation: 402, Affinity: 2},
|
||||||
|
{CharaID: 1002, Relation: 2001, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 2406, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 2512, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 2601, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 2603, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 2810, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 2901, Affinity: 7},
|
||||||
|
{CharaID: 1002, Relation: 3003, Affinity: 7},
|
||||||
|
{CharaID: 1002, Relation: 3101, Affinity: 7},
|
||||||
|
{CharaID: 1002, Relation: 3205, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 7000, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 7001, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 7002, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 7013, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 7015, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8017, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8018, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8019, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8020, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8021, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8022, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8023, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8024, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8025, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8026, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8027, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8028, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8029, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8030, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8031, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8032, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8444, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8480, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8512, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8537, Affinity: 1},
|
||||||
|
{CharaID: 1002, Relation: 8641, Affinity: 1},
|
||||||
|
}
|
||||||
|
if diff := cmp.Diff(want, got); diff != "" {
|
||||||
|
t.Errorf("wrong affinity details (+got/-want):\n%s", diff)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestUmas(t *testing.T) {
|
||||||
|
db := testdb(t.Context(), "file:TestUmas?mode=memory&cache=shared", characterSQL)
|
||||||
|
got, err := mdb.Umas(t.Context(), db)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
want := []horse.Uma{
|
||||||
|
{
|
||||||
|
ID: 100101,
|
||||||
|
CharacterID: 1001,
|
||||||
|
Name: `[Special Dreamer] Special Week`,
|
||||||
|
Variant: `[Special Dreamer]`,
|
||||||
|
Sprint: 2,
|
||||||
|
Mile: 5,
|
||||||
|
Medium: 7,
|
||||||
|
Long: 7,
|
||||||
|
Front: 1,
|
||||||
|
Pace: 7,
|
||||||
|
Late: 7,
|
||||||
|
End: 5,
|
||||||
|
Turf: 7,
|
||||||
|
Dirt: 1,
|
||||||
|
Unique: 100011,
|
||||||
|
Skill1: 200512,
|
||||||
|
Skill2: 201352,
|
||||||
|
Skill3: 200732,
|
||||||
|
SkillPL2: 200162,
|
||||||
|
SkillPL3: 201351,
|
||||||
|
SkillPL4: 200612,
|
||||||
|
SkillPL5: 200511,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 100102,
|
||||||
|
CharacterID: 1001,
|
||||||
|
Name: `[Hopp'n♪Happy Heart] Special Week`,
|
||||||
|
Variant: `[Hopp'n♪Happy Heart]`,
|
||||||
|
Sprint: 2,
|
||||||
|
Mile: 5,
|
||||||
|
Medium: 7,
|
||||||
|
Long: 7,
|
||||||
|
Front: 1,
|
||||||
|
Pace: 7,
|
||||||
|
Late: 7,
|
||||||
|
End: 5,
|
||||||
|
Turf: 7,
|
||||||
|
Dirt: 1,
|
||||||
|
Unique: 110011,
|
||||||
|
Skill1: 200462,
|
||||||
|
Skill2: 200592,
|
||||||
|
Skill3: 201132,
|
||||||
|
SkillPL2: 200212,
|
||||||
|
SkillPL3: 200591,
|
||||||
|
SkillPL4: 201611,
|
||||||
|
SkillPL5: 200461,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 100201,
|
||||||
|
CharacterID: 1002,
|
||||||
|
Name: `[Innocent Silence] Silence Suzuka`,
|
||||||
|
Variant: `[Innocent Silence]`,
|
||||||
|
Sprint: 4,
|
||||||
|
Mile: 7,
|
||||||
|
Medium: 7,
|
||||||
|
Long: 3,
|
||||||
|
Front: 7,
|
||||||
|
Pace: 5,
|
||||||
|
Late: 3,
|
||||||
|
End: 1,
|
||||||
|
Turf: 7,
|
||||||
|
Dirt: 1,
|
||||||
|
Unique: 100021,
|
||||||
|
Skill1: 200432,
|
||||||
|
Skill2: 200552,
|
||||||
|
Skill3: 200712,
|
||||||
|
SkillPL2: 200022,
|
||||||
|
SkillPL3: 200431,
|
||||||
|
SkillPL4: 200542,
|
||||||
|
SkillPL5: 200551,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
if diff := cmp.Diff(want, got); diff != "" {
|
||||||
|
t.Errorf("wrong umas (+got/-want):\n%s", diff)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestConversations(t *testing.T) {
|
||||||
|
db := testdb(t.Context(), "file:TestConversations?mode=memory&cache=shared", characterSQL)
|
||||||
|
got, err := mdb.Conversations(t.Context(), db)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
want := []horse.Conversation{
|
||||||
|
{
|
||||||
|
ID: 1,
|
||||||
|
CharacterID: 1001,
|
||||||
|
Number: 1,
|
||||||
|
Location: 410,
|
||||||
|
Chara1: 1001,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 2,
|
||||||
|
CharacterID: 1001,
|
||||||
|
Number: 2,
|
||||||
|
Location: 510,
|
||||||
|
Chara1: 1001,
|
||||||
|
ConditionType: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 3,
|
||||||
|
CharacterID: 1001,
|
||||||
|
Number: 3,
|
||||||
|
Location: 310,
|
||||||
|
Chara1: 1001,
|
||||||
|
ConditionType: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 76,
|
||||||
|
CharacterID: 1001,
|
||||||
|
Number: 4,
|
||||||
|
Location: 120,
|
||||||
|
Chara1: 1001,
|
||||||
|
Chara2: 1002,
|
||||||
|
ConditionType: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 77,
|
||||||
|
CharacterID: 1001,
|
||||||
|
Number: 5,
|
||||||
|
Location: 520,
|
||||||
|
Chara1: 1003,
|
||||||
|
Chara2: 1001,
|
||||||
|
ConditionType: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 126,
|
||||||
|
CharacterID: 1001,
|
||||||
|
Number: 6,
|
||||||
|
Location: 430,
|
||||||
|
Chara1: 1001,
|
||||||
|
Chara2: 1014,
|
||||||
|
Chara3: 1011,
|
||||||
|
ConditionType: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 4,
|
||||||
|
CharacterID: 1002,
|
||||||
|
Number: 1,
|
||||||
|
Location: 310,
|
||||||
|
Chara1: 1002,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 5,
|
||||||
|
CharacterID: 1002,
|
||||||
|
Number: 2,
|
||||||
|
Location: 210,
|
||||||
|
Chara1: 1002,
|
||||||
|
ConditionType: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 6,
|
||||||
|
CharacterID: 1002,
|
||||||
|
Number: 3,
|
||||||
|
Location: 110,
|
||||||
|
Chara1: 1002,
|
||||||
|
ConditionType: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 78,
|
||||||
|
CharacterID: 1002,
|
||||||
|
Number: 4,
|
||||||
|
Location: 520,
|
||||||
|
Chara1: 1010,
|
||||||
|
Chara2: 1002,
|
||||||
|
ConditionType: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: 79,
|
||||||
|
CharacterID: 1002,
|
||||||
|
Number: 5,
|
||||||
|
Location: 220,
|
||||||
|
Chara1: 1002,
|
||||||
|
Chara2: 1018,
|
||||||
|
ConditionType: 2,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
if diff := cmp.Diff(want, got); diff != "" {
|
||||||
|
t.Errorf("wrong conversations (+got/-want):\n%s", diff)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
259
|
||||||
|
],
|
||||||
|
"_distance": 675.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 934.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 725.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 735.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 725.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 735.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 150.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
259
|
||||||
|
],
|
||||||
|
"_distance": 975.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 425.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1234.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1500.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1025.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1035.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1025.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1035.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 175.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 450.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 1000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
259
|
||||||
|
],
|
||||||
|
"_distance": 1275.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 175.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 725.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1534.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1325.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1335.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1325.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1335.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 375.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 650.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
259
|
||||||
|
],
|
||||||
|
"_distance": 1475.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 375.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 925.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1734.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1525.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1535.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1525.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1535.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 175.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 450.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 975.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 1250.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
275
|
||||||
|
],
|
||||||
|
"_distance": 1800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
259
|
||||||
|
],
|
||||||
|
"_distance": 2075.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 175.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 725.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 975.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1525.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2334.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2600.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2125.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2135.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2125.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2135.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
"_distance": 280.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
226
|
||||||
|
],
|
||||||
|
"_distance": 510.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 280.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 736.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 550.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 560.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 550.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 560.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
"_distance": 240.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
"_distance": 470.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
"_distance": 980.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
226
|
||||||
|
],
|
||||||
|
"_distance": 1210.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 240.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 980.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1436.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1250.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1260.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1250.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1260.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
"_distance": 200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
"_distance": 430.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
"_distance": 940.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
"_distance": 1170.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
"_distance": 1680.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
226
|
||||||
|
],
|
||||||
|
"_distance": 1910.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 660.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 940.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1408.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1680.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2136.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1950.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1960.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1950.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1960.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
220
|
||||||
|
],
|
||||||
|
"_distance": 310.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
208
|
||||||
|
],
|
||||||
|
"_distance": 530.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 310.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 738.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 600.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 610.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 600.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 610.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
10000,
|
||||||
|
555
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
220
|
||||||
|
],
|
||||||
|
"_distance": 510.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
208
|
||||||
|
],
|
||||||
|
"_distance": 730.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 510.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 938.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 810.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 810.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
10000,
|
||||||
|
755
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
220
|
||||||
|
],
|
||||||
|
"_distance": 320.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
220
|
||||||
|
],
|
||||||
|
"_distance": 540.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
220
|
||||||
|
],
|
||||||
|
"_distance": 1110.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
208
|
||||||
|
],
|
||||||
|
"_distance": 1330.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 320.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 760.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1110.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1538.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1410.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1410.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-10000,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 220.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
10000,
|
||||||
|
720
|
||||||
|
],
|
||||||
|
"_distance": 665.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
220
|
||||||
|
],
|
||||||
|
"_distance": 520.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
220
|
||||||
|
],
|
||||||
|
"_distance": 740.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
220
|
||||||
|
],
|
||||||
|
"_distance": 1310.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
208
|
||||||
|
],
|
||||||
|
"_distance": 1530.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 520.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 960.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1310.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1738.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1600.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1610.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1600.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1610.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-10000,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 420.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
10000,
|
||||||
|
720
|
||||||
|
],
|
||||||
|
"_distance": 865.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,160 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
240
|
||||||
|
],
|
||||||
|
"_distance": 260.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
230
|
||||||
|
],
|
||||||
|
"_distance": 500.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
220
|
||||||
|
],
|
||||||
|
"_distance": 1120.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
220
|
||||||
|
],
|
||||||
|
"_distance": 1340.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
220
|
||||||
|
],
|
||||||
|
"_distance": 1910.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
208
|
||||||
|
],
|
||||||
|
"_distance": 2130.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 260.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 730.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1120.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1560.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1910.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2338.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2600.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2210.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2210.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
10000,
|
||||||
|
495
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-10000,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 970.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
10000,
|
||||||
|
720
|
||||||
|
],
|
||||||
|
"_distance": 1425.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
190
|
||||||
|
],
|
||||||
|
"_distance": 370.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
180
|
||||||
|
],
|
||||||
|
"_distance": 560.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 370.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 740.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 600.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 610.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 600.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 610.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
190
|
||||||
|
],
|
||||||
|
"_distance": 350.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
190
|
||||||
|
],
|
||||||
|
"_distance": 540.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
190
|
||||||
|
],
|
||||||
|
"_distance": 1070.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
180
|
||||||
|
],
|
||||||
|
"_distance": 1260.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 350.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 730.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1070.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1440.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1300.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1310.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1300.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1310.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-10000,
|
||||||
|
340
|
||||||
|
],
|
||||||
|
"_distance": 275.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
10000,
|
||||||
|
670
|
||||||
|
],
|
||||||
|
"_distance": 615.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
190
|
||||||
|
],
|
||||||
|
"_distance": 292.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
190
|
||||||
|
],
|
||||||
|
"_distance": 482.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
190
|
||||||
|
],
|
||||||
|
"_distance": 1040.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
190
|
||||||
|
],
|
||||||
|
"_distance": 1230.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
190
|
||||||
|
],
|
||||||
|
"_distance": 1770.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
180
|
||||||
|
],
|
||||||
|
"_distance": 1960.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 292.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 672.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1040.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1420.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1770.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2140.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2010.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2010.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 649.9000244140625
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 650.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 690.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 7,
|
||||||
|
"_values": [
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 30.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 696.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 706.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 450.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
192
|
||||||
|
],
|
||||||
|
"_distance": 650.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 450.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 842.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 725.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 735.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 750.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 760.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 650.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
192
|
||||||
|
],
|
||||||
|
"_distance": 850.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 650.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1042.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 925.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 935.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 950.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 960.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 550.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
192
|
||||||
|
],
|
||||||
|
"_distance": 750.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 550.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 942.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1600.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 810.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 810.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
10000,
|
||||||
|
350
|
||||||
|
],
|
||||||
|
"_distance": 250.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-15000,
|
||||||
|
300
|
||||||
|
],
|
||||||
|
"_distance": 600.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 750.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
192
|
||||||
|
],
|
||||||
|
"_distance": 950.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 750.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1142.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1010.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1010.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
10000,
|
||||||
|
350
|
||||||
|
],
|
||||||
|
"_distance": 450.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-15000,
|
||||||
|
300
|
||||||
|
],
|
||||||
|
"_distance": 800.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 420.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 620.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 1250.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
192
|
||||||
|
],
|
||||||
|
"_distance": 1450.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 420.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 820.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1250.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1642.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1525.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1535.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1525.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1535.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 950.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
192
|
||||||
|
],
|
||||||
|
"_distance": 1150.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 950.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1342.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1210.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1210.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-15000,
|
||||||
|
300
|
||||||
|
],
|
||||||
|
"_distance": 1000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
10000,
|
||||||
|
350
|
||||||
|
],
|
||||||
|
"_distance": 650.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 650.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 850.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 1450.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
192
|
||||||
|
],
|
||||||
|
"_distance": 1650.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 650.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1050.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1450.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1842.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1725.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1735.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1725.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1735.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 810.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 1010.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 1650.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
192
|
||||||
|
],
|
||||||
|
"_distance": 1850.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 810.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1210.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1650.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2042.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1925.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1935.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1925.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1935.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"_distance": 540.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
147
|
||||||
|
],
|
||||||
|
"_distance": 700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 1,
|
||||||
|
"_values": [
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 1,
|
||||||
|
"_values": [
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 80.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 540.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 847.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 750.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 760.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 815.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 825.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"_distance": 400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"_distance": 560.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"_distance": 1140.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
147
|
||||||
|
],
|
||||||
|
"_distance": 1300.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 720.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1140.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1447.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1350.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1360.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1350.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1360.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"_distance": 380.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"_distance": 540.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"_distance": 1120.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"_distance": 1280.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"_distance": 1850.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"_distance": 2010.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 380.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1120.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1440.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1850.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2170.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2500.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2050.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2060.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2050.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2060.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
300
|
||||||
|
],
|
||||||
|
"_distance": 420.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
188
|
||||||
|
],
|
||||||
|
"_distance": 720.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 420.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 908.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 750.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 760.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 748.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 758.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
15000,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"_distance": 180.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 330.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 530.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
300
|
||||||
|
],
|
||||||
|
"_distance": 1020.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
188
|
||||||
|
],
|
||||||
|
"_distance": 1320.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 330.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 730.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1020.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1508.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1350.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1360.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1350.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1360.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
15000,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"_distance": 780.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 530.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 730.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
300
|
||||||
|
],
|
||||||
|
"_distance": 1220.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
188
|
||||||
|
],
|
||||||
|
"_distance": 1520.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 530.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 930.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1220.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1708.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1550.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1560.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1550.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1560.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
15000,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"_distance": 980.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
300
|
||||||
|
],
|
||||||
|
"_distance": 220.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 520.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 1130.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 1330.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
300
|
||||||
|
],
|
||||||
|
"_distance": 1820.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
188
|
||||||
|
],
|
||||||
|
"_distance": 2120.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 220.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 720.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1130.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1530.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1820.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2308.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2600.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2150.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2160.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2150.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2160.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
15000,
|
||||||
|
80
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
15000,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"_distance": 1580.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
210
|
||||||
|
],
|
||||||
|
"_distance": 500.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
145
|
||||||
|
],
|
||||||
|
"_distance": 710.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 1,
|
||||||
|
"_values": [
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 1,
|
||||||
|
"_values": [
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 110.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 500.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 855.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1150.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 751.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 761.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 751.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 761.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
170
|
||||||
|
],
|
||||||
|
"_distance": 360.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
170
|
||||||
|
],
|
||||||
|
"_distance": 530.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
210
|
||||||
|
],
|
||||||
|
"_distance": 1050.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
145
|
||||||
|
],
|
||||||
|
"_distance": 1260.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 360.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1050.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1405.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1301.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1311.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1301.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1311.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1301.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1311.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1301.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1311.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-10000,
|
||||||
|
320
|
||||||
|
],
|
||||||
|
"_distance": 285.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
210
|
||||||
|
],
|
||||||
|
"_distance": 310.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"_distance": 520.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
170
|
||||||
|
],
|
||||||
|
"_distance": 1060.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
170
|
||||||
|
],
|
||||||
|
"_distance": 1230.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
210
|
||||||
|
],
|
||||||
|
"_distance": 1750.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
145
|
||||||
|
],
|
||||||
|
"_distance": 1960.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 310.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 680.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1060.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1750.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2105.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2400.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2001.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2011.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2001.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 2011.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
350
|
||||||
|
],
|
||||||
|
"_distance": 300.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
240
|
||||||
|
],
|
||||||
|
"_distance": 650.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 890.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 710.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 710.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-15000,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
20000,
|
||||||
|
110
|
||||||
|
],
|
||||||
|
"_distance": 1025.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
450
|
||||||
|
],
|
||||||
|
"_distance": 50.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
350
|
||||||
|
],
|
||||||
|
"_distance": 700.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
240
|
||||||
|
],
|
||||||
|
"_distance": 1050.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1290.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1600.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1100.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1110.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1100.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1110.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-15000,
|
||||||
|
300
|
||||||
|
],
|
||||||
|
"_distance": 300.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
20000,
|
||||||
|
110
|
||||||
|
],
|
||||||
|
"_distance": 1425.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
250
|
||||||
|
],
|
||||||
|
"_distance": 175.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
250
|
||||||
|
],
|
||||||
|
"_distance": 425.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
250
|
||||||
|
],
|
||||||
|
"_distance": 1000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
240
|
||||||
|
],
|
||||||
|
"_distance": 1250.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 175.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 675.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1490.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1800.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1300.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1310.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1300.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1310.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
20000,
|
||||||
|
35
|
||||||
|
],
|
||||||
|
"_distance": 1.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
15000,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 125.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-15000,
|
||||||
|
400
|
||||||
|
],
|
||||||
|
"_distance": 425.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
20000,
|
||||||
|
110
|
||||||
|
],
|
||||||
|
"_distance": 1625.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
{
|
||||||
|
"courseParams": [
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
250
|
||||||
|
],
|
||||||
|
"_distance": 375.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
250
|
||||||
|
],
|
||||||
|
"_distance": 625.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
3,
|
||||||
|
250
|
||||||
|
],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 0,
|
||||||
|
"_values": [
|
||||||
|
4,
|
||||||
|
240
|
||||||
|
],
|
||||||
|
"_distance": 1450.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 0.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 375.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 875.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"_distance": 1200.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 1690.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 2,
|
||||||
|
"_values": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"_distance": 2000.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 3,
|
||||||
|
"_values": [
|
||||||
|
7000
|
||||||
|
],
|
||||||
|
"_distance": 875.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 3,
|
||||||
|
"_values": [
|
||||||
|
10000
|
||||||
|
],
|
||||||
|
"_distance": 1450.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 4,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1500.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 5,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1510.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 8,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1500.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 9,
|
||||||
|
"_values": [],
|
||||||
|
"_distance": 1510.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
15000,
|
||||||
|
200
|
||||||
|
],
|
||||||
|
"_distance": 325.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
20000,
|
||||||
|
110
|
||||||
|
],
|
||||||
|
"_distance": 125.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
-15000,
|
||||||
|
400
|
||||||
|
],
|
||||||
|
"_distance": 625.0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_paramType": 11,
|
||||||
|
"_values": [
|
||||||
|
20000,
|
||||||
|
110
|
||||||
|
],
|
||||||
|
"_distance": 1825.0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user