UNPKG

@battle-racing/br-common-lib

Version:

Common library for all Battle Racing Repositorios

29 lines (28 loc) 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.powerUpSchema = exports.powerUpLevelSchema = exports.powerUpShieldSchema = exports.powerUpCommandSchema = void 0; const zod_1 = require("zod"); const command_1 = require("../command"); const damage_1 = require("../damage"); const PowerUpAttributes_schema_1 = require("./PowerUpAttributes.schema"); exports.powerUpCommandSchema = command_1.allCommandsConfigSchema; exports.powerUpShieldSchema = zod_1.z.object({ duration: zod_1.z.number(), }); exports.powerUpLevelSchema = zod_1.z.union([zod_1.z.literal(1), zod_1.z.literal(2), zod_1.z.literal(3), zod_1.z.literal(4), zod_1.z.literal(5)]); exports.powerUpSchema = zod_1.z.object({ id: zod_1.z.string(), name: PowerUpAttributes_schema_1.powerUpNameSchema, imageName: zod_1.z.string(), description: zod_1.z.string(), level: exports.powerUpLevelSchema, assignationCommands: zod_1.z.array(exports.powerUpCommandSchema), activationCommands: zod_1.z.array(exports.powerUpCommandSchema), shield: exports.powerUpShieldSchema.optional(), networkDamage: zod_1.z .object({ name: damage_1.damageEffectNameSchema, target: damage_1.damageTargetSchema, }) .optional(), });