checkpoint: insanity ascends (35)

127 errors to go
This commit is contained in:
zkldi
2023-01-19 16:39:42 +00:00
parent 2b0e65f0c8
commit 5cbb2d5f8a
131 changed files with 2106 additions and 1886 deletions
+4 -3
View File
@@ -2,6 +2,7 @@
* Common stuff for that all games might want to inherit.
*/
import { FmtNum } from "../../utils/util";
import { p } from "prudence";
import type { ConfScoreMetric } from "../../types/metrics";
@@ -20,7 +21,7 @@ import type { ConfScoreMetric } from "../../types/metrics";
* as that necessitates that you either can't miss, or can't hit.
*/
export const FAST_SLOW_MAXCOMBO = {
fast: { type: "INTEGER", validate: p.isPositiveInteger },
slow: { type: "INTEGER", validate: p.isPositiveInteger },
maxCombo: { type: "INTEGER", validate: p.isPositiveInteger },
fast: { type: "INTEGER", validate: p.isPositiveInteger, formatter: FmtNum },
slow: { type: "INTEGER", validate: p.isPositiveInteger, formatter: FmtNum },
maxCombo: { type: "INTEGER", validate: p.isPositiveInteger, formatter: FmtNum },
} as const satisfies Record<string, ConfScoreMetric>;
+16 -15
View File
@@ -1,4 +1,5 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { FmtPercent, FmtScoreNoCommas } from "../../utils/util";
import { ClassValue, zodNonNegativeInt } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -16,7 +17,7 @@ export const BMS_CONF = {
}),
} as const satisfies INTERNAL_GAME_CONFIG;
function FormatSieglindeBMS(sgl: number): string {
export function FormatSieglindeBMS(sgl: number): string {
if (sgl < 13) {
return `☆${sgl.toFixed(2)}`;
}
@@ -135,7 +136,7 @@ const RANDOM_SCHEMA = z.enum(["MIRROR", "NONRAN", "R-RANDOM", "RANDOM", "S-RANDO
export const BMS_7K_CONF = {
providedMetrics: {
score: { type: "INTEGER", chartDependentMax: true },
score: { type: "INTEGER", chartDependentMax: true, formatter: FmtScoreNoCommas },
lamp: {
type: "ENUM",
@@ -163,7 +164,7 @@ export const BMS_7K_CONF = {
// if #RANDOM is to ever be supported, the user's percent would become
// a *mandatory* metric, as a chart's notecount can be completely unknown.
// However, supporting #RANDOM is an awful pain, so I don't really care.
percent: { type: "DECIMAL", validate: p.isBetween(0, 100) },
percent: { type: "DECIMAL", validate: p.isBetween(0, 100), formatter: FmtPercent },
},
defaultMetric: "percent",
@@ -171,19 +172,19 @@ export const BMS_7K_CONF = {
optionalMetrics: {
...FAST_SLOW_MAXCOMBO,
bp: { type: "INTEGER", validate: p.isPositive },
gauge: { type: "DECIMAL", validate: p.isBetween(0, 100) },
bp: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
gauge: { type: "DECIMAL", validate: p.isBetween(0, 100), formatter: FmtPercent },
gaugeHistory: { type: "GRAPH", validate: p.isBetween(0, 100) },
epg: { type: "INTEGER", validate: p.isPositive },
egr: { type: "INTEGER", validate: p.isPositive },
egd: { type: "INTEGER", validate: p.isPositive },
ebd: { type: "INTEGER", validate: p.isPositive },
epr: { type: "INTEGER", validate: p.isPositive },
lpg: { type: "INTEGER", validate: p.isPositive },
lgr: { type: "INTEGER", validate: p.isPositive },
lgd: { type: "INTEGER", validate: p.isPositive },
lbd: { type: "INTEGER", validate: p.isPositive },
lpr: { type: "INTEGER", validate: p.isPositive },
epg: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
egr: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
egd: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
ebd: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
epr: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
lpg: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
lgr: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
lgd: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
lbd: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
lpr: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
},
scoreRatingAlgs: {
+2 -1
View File
@@ -1,4 +1,5 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { FmtNum } from "../../utils/util";
import { ClassValue, zodNonNegativeInt } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -29,7 +30,7 @@ export const CHUNITHMColours = [
export const CHUNITHM_SINGLE_CONF = {
providedMetrics: {
score: { type: "INTEGER", validate: p.isBetween(0, 1_010_000) },
score: { type: "INTEGER", validate: p.isBetween(0, 1_010_000), formatter: FmtNum },
lamp: {
type: "ENUM",
values: ["FAILED", "CLEAR", "FULL COMBO", "ALL JUSTICE", "ALL JUSTICE CRITICAL"],
+2 -1
View File
@@ -1,4 +1,5 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { FmtPercent } from "../../utils/util";
import { ClassValue, zodNonNegativeInt } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -36,7 +37,7 @@ const GitadoraColours = [
export const GITADORA_GITA_CONF = {
providedMetrics: {
percent: { type: "DECIMAL", validate: p.isBetween(0, 100) },
percent: { type: "DECIMAL", validate: p.isBetween(0, 100), formatter: FmtPercent },
lamp: {
type: "ENUM",
values: ["FAILED", "CLEAR", "FULL COMBO", "EXCELLENT"],
+6 -4
View File
@@ -1,4 +1,5 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { FmtNum, FmtPercent, FmtScoreNoCommas } from "../../utils/util";
import { ClassValue, zodNonNegativeInt, zodTierlistData } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -50,7 +51,7 @@ const RANDOM_SCHEMA = z.enum(["NONRAN", "MIRROR", "R-RANDOM", "RANDOM", "S-RANDO
export const IIDX_SP_CONF = {
providedMetrics: {
score: { type: "INTEGER", chartDependentMax: true },
score: { type: "INTEGER", chartDependentMax: true, formatter: FmtScoreNoCommas },
lamp: {
type: "ENUM",
values: [
@@ -71,6 +72,7 @@ export const IIDX_SP_CONF = {
percent: {
type: "DECIMAL",
validate: p.isBetween(0, 100),
formatter: FmtPercent,
},
grade: {
type: "ENUM",
@@ -85,9 +87,9 @@ export const IIDX_SP_CONF = {
optionalMetrics: {
...FAST_SLOW_MAXCOMBO,
bp: { type: "INTEGER", validate: p.isPositive },
gauge: { type: "DECIMAL", validate: p.isBetween(0, 100) },
comboBreak: { type: "INTEGER", validate: p.isPositive },
bp: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
gauge: { type: "DECIMAL", validate: p.isBetween(0, 100), formatter: FmtPercent },
comboBreak: { type: "INTEGER", validate: p.isPositive, formatter: FmtNum },
// The players history for the gauge type they were playing on.
// this may fall into "NULL" if the user fails.
+14 -3
View File
@@ -1,3 +1,4 @@
import { FmtPercent } from "../../utils/util";
import { NoDecimalPlace, zodNonNegativeInt } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -15,13 +16,13 @@ export const ITG_CONF = {
export const ITG_STAMINA_CONF = {
providedMetrics: {
scorePercent: { type: "DECIMAL", validate: p.isBetween(0, 100) },
scorePercent: { type: "DECIMAL", validate: p.isBetween(0, 100), formatter: FmtPercent },
// How far through the chart did they get?
// 100 means they cleared.
// 50 means they got halfway through.
// 0 means they died instantly etc.
survivedPercent: { type: "DECIMAL", validate: p.isBetween(0, 100) },
survivedPercent: { type: "DECIMAL", validate: p.isBetween(0, 100), formatter: FmtPercent },
lamp: {
type: "ENUM",
@@ -50,7 +51,17 @@ export const ITG_STAMINA_CONF = {
//
// NOTE that in our ITG implementation we don't allow for negative percents
// as it breaks this silly metric. Also negative percents are stupid.
finalPercent: { type: "DECIMAL", validate: p.isBetween(0, 200) },
finalPercent: {
type: "DECIMAL",
validate: p.isBetween(0, 200),
formatter: (v) => {
if (v < 100) {
return `Died ${v.toFixed(2)}% in`;
}
return `Cleared with ${(v - 100).toFixed(2)}%`;
},
},
},
optionalMetrics: {
+3 -2
View File
@@ -1,4 +1,5 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { FmtNum, FmtPercent } from "../../utils/util";
import { ClassValue, zodNonNegativeInt } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -28,8 +29,8 @@ const JubeatColours = [
export const JUBEAT_SINGLE_CONF = {
providedMetrics: {
score: { type: "INTEGER", validate: p.isBetween(0, 1_000_000) },
musicRate: { type: "DECIMAL", chartDependentMax: true },
score: { type: "INTEGER", validate: p.isBetween(0, 1_000_000), formatter: FmtNum },
musicRate: { type: "DECIMAL", chartDependentMax: true, formatter: FmtPercent },
lamp: {
type: "ENUM",
values: ["FAILED", "CLEAR", "FULL COMBO", "EXCELLENT"],
+2 -1
View File
@@ -1,4 +1,5 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { FmtPercent } from "../../utils/util";
import { ClassValue, NoDecimalPlace } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -57,7 +58,7 @@ const MaimaiDXColours = [
export const MAIMAI_DX_SINGLE_CONF = {
providedMetrics: {
percent: { type: "DECIMAL", validate: p.isBetween(0, 101) },
percent: { type: "DECIMAL", validate: p.isBetween(0, 101), formatter: FmtPercent },
lamp: {
type: "ENUM",
values: ["FAILED", "CLEAR", "FULL COMBO", "FULL COMBO+", "ALL PERFECT", "ALL PERFECT+"],
+2 -1
View File
@@ -1,4 +1,5 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { FmtNum } from "../../utils/util";
import { NoDecimalPlace, zodNonNegativeInt } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -17,7 +18,7 @@ export const MUSECA_CONF = {
export const MUSECA_SINGLE_CONF = {
providedMetrics: {
score: { type: "INTEGER", validate: p.isBetween(0, 1_000_000) },
score: { type: "INTEGER", validate: p.isBetween(0, 1_000_000), formatter: FmtNum },
lamp: {
type: "ENUM",
values: ["FAILED", "CLEAR", "CONNECT ALL", "PERFECT CONNECT ALL"],
+15 -14
View File
@@ -1,4 +1,5 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { FmtScoreNoCommas, FmtPercent } from "../../utils/util";
import { ClassValue, zodNonNegativeInt } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -42,7 +43,7 @@ function FormatSieglindePMS(sgl: number): string {
export const PMS_CONTROLLER_CONF = {
providedMetrics: {
score: { type: "INTEGER", chartDependentMax: true },
score: { type: "INTEGER", chartDependentMax: true, formatter: FmtScoreNoCommas },
lamp: {
type: "ENUM",
@@ -70,7 +71,7 @@ export const PMS_CONTROLLER_CONF = {
// if #RANDOM is to ever be supported, the user's percent would become
// a *mandatory* metric, as a chart's notecount can be completely unknown.
// However, supporting #RANDOM is an awful pain, so I don't really care.
percent: { type: "DECIMAL", validate: p.isBetween(0, 100) },
percent: { type: "DECIMAL", validate: p.isBetween(0, 100), formatter: FmtPercent },
},
defaultMetric: "percent",
@@ -78,19 +79,19 @@ export const PMS_CONTROLLER_CONF = {
optionalMetrics: {
...FAST_SLOW_MAXCOMBO,
bp: { type: "INTEGER", validate: p.isPositive },
gauge: { type: "DECIMAL", validate: p.isBetween(0, 100) },
bp: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
gauge: { type: "DECIMAL", validate: p.isBetween(0, 100), formatter: FmtPercent },
gaugeHistory: { type: "GRAPH", validate: p.isBetween(0, 100) },
epg: { type: "INTEGER", validate: p.isPositive },
egr: { type: "INTEGER", validate: p.isPositive },
egd: { type: "INTEGER", validate: p.isPositive },
ebd: { type: "INTEGER", validate: p.isPositive },
epr: { type: "INTEGER", validate: p.isPositive },
lpg: { type: "INTEGER", validate: p.isPositive },
lgr: { type: "INTEGER", validate: p.isPositive },
lgd: { type: "INTEGER", validate: p.isPositive },
lbd: { type: "INTEGER", validate: p.isPositive },
lpr: { type: "INTEGER", validate: p.isPositive },
epg: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
egr: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
egd: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
ebd: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
epr: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
lpg: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
lgr: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
lgd: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
lbd: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
lpr: { type: "INTEGER", validate: p.isPositive, formatter: FmtScoreNoCommas },
},
scoreRatingAlgs: {
+3 -2
View File
@@ -1,4 +1,5 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { FmtNum, FmtPercent } from "../../utils/util";
import { ClassValue, zodNonNegativeInt } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -28,7 +29,7 @@ const PopnClasses = [
export const POPN_9B_CONF = {
providedMetrics: {
score: { type: "INTEGER", validate: p.isBetween(0, 100_000) },
score: { type: "INTEGER", validate: p.isBetween(0, 100_000), formatter: FmtNum },
clearMedal: {
type: "ENUM",
values: [
@@ -70,7 +71,7 @@ export const POPN_9B_CONF = {
optionalMetrics: {
...FAST_SLOW_MAXCOMBO,
gauge: { type: "INTEGER", validate: p.isBetween(0, 100) },
gauge: { type: "DECIMAL", validate: p.isBetween(0, 100), formatter: FmtPercent },
},
scoreRatingAlgs: {
+4 -3
View File
@@ -1,4 +1,5 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { FmtNum, FmtPercent } from "../../utils/util";
import { ClassValue, ToDecimalPlaces, zodNonNegativeInt, zodTierlistData } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -73,7 +74,7 @@ export const SDVXVFClasses = [
export const SDVX_SINGLE_CONF = {
providedMetrics: {
score: { type: "INTEGER", validate: p.isBetween(0, 10_000_000) },
score: { type: "INTEGER", validate: p.isBetween(0, 10_000_000), formatter: FmtNum },
lamp: {
type: "ENUM",
values: [
@@ -100,8 +101,8 @@ export const SDVX_SINGLE_CONF = {
optionalMetrics: {
...FAST_SLOW_MAXCOMBO,
exScore: { type: "INTEGER", chartDependentMax: true },
gauge: { type: "DECIMAL", validate: p.isBetween(0, 100) },
exScore: { type: "INTEGER", chartDependentMax: true, formatter: FmtNum },
gauge: { type: "DECIMAL", validate: p.isBetween(0, 100), formatter: FmtPercent },
},
scoreRatingAlgs: {
+3 -2
View File
@@ -1,5 +1,6 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { SDVXVFClasses } from "./sdvx";
import { FmtNum, FmtPercent } from "../../utils/util";
import { ToDecimalPlaces } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -14,7 +15,7 @@ export const USC_CONF = {
export const USC_CONTROLLER_CONF = {
providedMetrics: {
score: { type: "INTEGER", validate: p.isBetween(0, 10_000_000) },
score: { type: "INTEGER", validate: p.isBetween(0, 10_000_000), formatter: FmtNum },
lamp: {
type: "ENUM",
values: [
@@ -41,7 +42,7 @@ export const USC_CONTROLLER_CONF = {
optionalMetrics: {
...FAST_SLOW_MAXCOMBO,
gauge: { type: "DECIMAL", validate: p.isBetween(0, 100) },
gauge: { type: "DECIMAL", validate: p.isBetween(0, 100), formatter: FmtPercent },
},
scoreRatingAlgs: {
+2 -1
View File
@@ -1,4 +1,5 @@
import { FAST_SLOW_MAXCOMBO } from "./_common";
import { FmtNum } from "../../utils/util";
import { ClassValue } from "../config-utils";
import { p } from "prudence";
import { z } from "zod";
@@ -47,7 +48,7 @@ export const WaccaColours = [
export const WACCA_SINGLE_CONF = {
providedMetrics: {
score: { type: "INTEGER", validate: p.isBetween(0, 1_000_000) },
score: { type: "INTEGER", validate: p.isBetween(0, 1_000_000), formatter: FmtNum },
lamp: {
type: "ENUM",
values: ["FAILED", "CLEAR", "MISSLESS", "FULL COMBO", "ALL MARVELOUS"],