This commit is contained in:
Sirz Benjie 2025-07-26 20:43:38 -06:00
parent 4df9a60743
commit 09bb498c7a
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -1,4 +1,5 @@
import { Z$OptionalNonNegativeIntCatchToUndef } from "#schemas/common"; import { Z$OptionalNonNegativeIntCatchToUndef, Z$PositiveInt } from "#schemas/common";
import { Z$PokemonType } from "#system/schemas/v1.10/pokemon-type";
import { z } from "zod"; import { z } from "zod";
/** /**
@ -11,7 +12,9 @@ import { z } from "zod";
export const Z$CustomPokemonData = z.object({ export const Z$CustomPokemonData = z.object({
// sprite scale of -1 is allowed, but it's the default meaning there is no override for it // sprite scale of -1 is allowed, but it's the default meaning there is no override for it
spriteScale: z.number().nonnegative().optional().catch(undefined), spriteScale: z.number().nonnegative().optional().catch(undefined),
ability: Z$OptionalNonNegativeIntCatchToUndef.catch(undefined), ability: Z$OptionalNonNegativeIntCatchToUndef,
passive: Z$OptionalNonNegativeIntCatchToUndef.catch(undefined), passive: Z$OptionalNonNegativeIntCatchToUndef,
nature: Z$OptionalNonNegativeIntCatchToUndef.catch(undefined), nature: Z$OptionalNonNegativeIntCatchToUndef,
}); types: z.array(Z$PokemonType).optional().catch(undefined),
hitsRecCount: Z$PositiveInt.optional().catch(undefined),
});