UPDATE: New data 4.1.5
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 45s
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 45s
This commit is contained in:
Binary file not shown.
@@ -22,7 +22,7 @@ export default function CharacterCard({ data }: CharacterCardProps) {
|
||||
className="z-10 flex flex-col items-center rounded-xl shadow-xl
|
||||
bg-linear-to-br from-base-300 via-base-100 to-warning/70
|
||||
transform transition-transform duration-300 ease-in-out
|
||||
hover:scale-105 cursor-pointer min-h-45 sm:min-h-45 md:min-h-52.5 lg:min-h-55 xl:min-h-60 2xl:min-h-85"
|
||||
hover:scale-105 cursor-pointer min-h-45 sm:min-h-45 md:min-h-52.5 lg:min-h-55 xl:min-h-60 2xl:min-h-65"
|
||||
>
|
||||
<div
|
||||
className={`w-full rounded-md bg-linear-to-br ${data.Rarity === "CombatPowerAvatarRarityType5"
|
||||
|
||||
@@ -65,6 +65,28 @@ export default function EidolonsInfo() {
|
||||
</div>
|
||||
<div className="text-sm font-normal">
|
||||
<div dangerouslySetInnerHTML={{ __html: replaceByParam(getLocaleName(locale, rank.Desc), rank.Param) }} />
|
||||
{Object.values(rank?.Extra || {}).map((extra) => (
|
||||
<div
|
||||
key={extra.ID}
|
||||
className="mt-3 pl-3 border-l-2 border-primary/30 bg-primary/5 py-2 rounded-r-sm"
|
||||
>
|
||||
<div className="flex items-center gap-2 mb-1">
|
||||
<span className="text-[10px] uppercase font-bold bg-primary/50 px-1.5 py-0.5 rounded">
|
||||
Extra Effect
|
||||
</span>
|
||||
<span className="text-sm font-semibold text-primary/80">
|
||||
{getLocaleName(locale, extra.Name)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="text-sm leading-relaxed opacity-90"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: replaceByParam(getLocaleName(locale, extra.Desc), extra.Param)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -404,7 +404,7 @@ export default function QuickView() {
|
||||
<div key={index} className="flex flex-row items-center justify-between">
|
||||
<div className="flex flex-row items-center">
|
||||
<NextImage
|
||||
src={stat?.icon || ""}
|
||||
src={`${process.env.CDN_URL}/${stat?.icon}`}
|
||||
unoptimized
|
||||
crossOrigin="anonymous"
|
||||
alt="Stat Icon"
|
||||
|
||||
@@ -245,7 +245,7 @@ export default function RelicMaker() {
|
||||
{transI18n("relicMaker")}
|
||||
</h3>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8 max-w-7xl mx-auto">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8 max-w-7xl">
|
||||
|
||||
{/* Left Panel */}
|
||||
<div className="space-y-6">
|
||||
|
||||
@@ -173,7 +173,7 @@ export default function RelicsInfo() {
|
||||
|
||||
return (
|
||||
<div className="max-h-[77vh] min-h-[50vh] overflow-y-scroll overflow-x-hidden">
|
||||
<div className="max-w-7xl mx-auto">
|
||||
<div className="max-w-7xl">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
|
||||
{/* Left Section - Items Grid */}
|
||||
@@ -184,7 +184,7 @@ export default function RelicsInfo() {
|
||||
{transI18n("relics")}
|
||||
</h2>
|
||||
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 gap-6 max-w-2xl mx-auto">
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 gap-6 max-w-2xl">
|
||||
{["1", "2", "3", "4", "5", "6"].map((item, index) => (
|
||||
<div key={index} className="relative group">
|
||||
<div
|
||||
|
||||
@@ -660,7 +660,7 @@ export default function ShowCaseInfo() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="relative flex h-56.25 w-auto flex-row items-center">
|
||||
<div className="relative flex h-56.25 flex-row items-center">
|
||||
{avatarSelected && (
|
||||
<div className="absolute inset-0 flex items-center justify-center">
|
||||
<NextImage
|
||||
|
||||
@@ -11,6 +11,7 @@ import { mappingStats } from "@/constant/constant";
|
||||
import { toast } from "react-toastify";
|
||||
import useCurrentDataStore from "@/stores/currentDataStore";
|
||||
import { StatusAdd } from '@/types/avatarDetail';
|
||||
import { SkillDescription } from "./skillDescription";
|
||||
|
||||
export default function SkillsInfo() {
|
||||
const transI18n = useTranslations("DataPage")
|
||||
@@ -364,17 +365,11 @@ export default function SkillsInfo() {
|
||||
{` (${transI18n(skill?.SkillEffect?.toLowerCase())})`}
|
||||
</div>
|
||||
|
||||
<div className="text-lg font-bold" dangerouslySetInnerHTML={{ __html: replaceByParam(getLocaleName(locale, skill.Name), []) }}>
|
||||
|
||||
</div>
|
||||
|
||||
<div
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: replaceByParam(
|
||||
getLocaleName(locale, skill.Desc),
|
||||
skill.Level[avatarData?.data.skills?.[skillInfo?.PointID]?.toString() || ""]?.Param || []
|
||||
)
|
||||
}}
|
||||
<SkillDescription
|
||||
skill={skill}
|
||||
locale={locale}
|
||||
avatarData={avatarData}
|
||||
skillInfo={skillInfo}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
|
||||
59
src/components/skillsInfo/skillDescription.tsx
Normal file
59
src/components/skillsInfo/skillDescription.tsx
Normal file
@@ -0,0 +1,59 @@
|
||||
import { getLocaleName, replaceByParam } from "@/helper";
|
||||
import { AvatarStore, SkillDetail, SkillTreePoint } from "@/types";
|
||||
|
||||
export const SkillDescription = ({ skill, locale, avatarData, skillInfo }: {
|
||||
skill: SkillDetail,
|
||||
locale: string,
|
||||
avatarData: AvatarStore,
|
||||
skillInfo: SkillTreePoint
|
||||
}) => {
|
||||
const levelKey = avatarData?.data.skills?.[skillInfo?.PointID]?.toString() || "";
|
||||
const params = skill.Level[levelKey]?.Param || [];
|
||||
const descHtml = getLocaleName(locale, skill.Desc) || getLocaleName(locale, skill.SimpleDesc);
|
||||
|
||||
const extraList = Object.values(skill.Extra).length > 0
|
||||
? Object.values(skill.Extra)
|
||||
: Object.values(skill?.SimpleExtra || {});
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="space-y-2 pb-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-1 h-5 bg-primary/80 rounded-sm" />
|
||||
<div
|
||||
className="text-lg font-bold tracking-wide text-foreground uppercase"
|
||||
dangerouslySetInnerHTML={{ __html: replaceByParam(getLocaleName(locale, skill.Name), []) }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="text-[15px] leading-relaxed text-foreground/90 pl-3 border-l border-transparent"
|
||||
dangerouslySetInnerHTML={{ __html: replaceByParam(descHtml, params) }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{extraList.map((extra) => (
|
||||
<div
|
||||
key={extra.ID}
|
||||
className="mt-3 pl-3 border-l-2 border-primary/30 bg-primary/5 py-2 rounded-r-sm"
|
||||
>
|
||||
<div className="flex items-center gap-2 mb-1">
|
||||
<span className="text-[10px] uppercase font-bold bg-primary/50 px-1.5 py-0.5 rounded">
|
||||
Extra Effect
|
||||
</span>
|
||||
<span className="text-sm font-semibold text-primary/80">
|
||||
{getLocaleName(locale, extra.Name)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="text-sm leading-relaxed opacity-90"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: replaceByParam(getLocaleName(locale, extra.Desc), extra.Param)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,52 +1,38 @@
|
||||
export function replaceByParam(desc: string, params: number[]): string {
|
||||
function formatParam(
|
||||
indexStr: string,
|
||||
format: string,
|
||||
floatDigits: string | undefined,
|
||||
percent: string | undefined
|
||||
): string {
|
||||
const i: number = parseInt(indexStr, 10) - 1;
|
||||
const value: number | undefined = params[i];
|
||||
if (value === undefined) return "";
|
||||
|
||||
if (format.startsWith("f")) {
|
||||
const digits: number = parseInt(floatDigits || "1", 10);
|
||||
const num: number = percent ? value * 100 : value;
|
||||
return `${num.toFixed(digits)}${percent ? "%" : ""}`;
|
||||
}
|
||||
|
||||
if (format === "i") {
|
||||
return percent ? `${(value * 100).toFixed(0)}%` : `${Math.round(value)}`;
|
||||
}
|
||||
|
||||
return `${value}`;
|
||||
const formatValue = (value: number, format: string, floatDigits?: string, hasPercent?: boolean): string => {
|
||||
if (format.startsWith('f')) {
|
||||
const digits = parseInt(floatDigits || "1", 10);
|
||||
const num = hasPercent ? value * 100 : value;
|
||||
return `${num.toFixed(digits)}${hasPercent ? "%" : ""}`;
|
||||
}
|
||||
|
||||
const desc1 = desc.replace(/<color=#[0-9a-fA-F]{8}>(.*?)<\/color>/g, (match: string, inner: string): string => {
|
||||
const colorCode: string = match.match(/#[0-9a-fA-F]{8}/)?.[0] ?? "#ffffff";
|
||||
const processed: string = inner
|
||||
.replace(/#(\d+)\[(f(\d+)|i)\](%)?/g, (
|
||||
_: string,
|
||||
index: string,
|
||||
format: string,
|
||||
floatDigits: string | undefined,
|
||||
percent: string | undefined
|
||||
): string => formatParam(index, format, floatDigits, percent))
|
||||
.replace(/<unbreak>(.*?)<\/unbreak>/g, "$1");
|
||||
if (format === 'i') {
|
||||
const num = hasPercent ? value * 100 : value;
|
||||
return `${Math.round(num)}${hasPercent ? "%" : ""}`;
|
||||
}
|
||||
|
||||
return `<span style="color:${colorCode}">${processed}</span>`;
|
||||
return String(value);
|
||||
};
|
||||
|
||||
export function replaceByParam(desc: string, params: number[]): string {
|
||||
|
||||
const PARAM_REGEX = /#(\d+)\[(f(\d+)|i)\](%)?/g;
|
||||
|
||||
const processor = (_match: string, index: string, format: string, digits?: string, percent?: string): string => {
|
||||
const i = parseInt(index, 10) - 1;
|
||||
const val = params[i];
|
||||
return val !== undefined ? formatValue(val, format, digits, !!percent) : "";
|
||||
};
|
||||
|
||||
let result = desc.replace(/<color=(#[0-9a-fA-F]{8})>(.*?)<\/color>/g, (_, color, inner) => {
|
||||
const processedInner = inner.replace(PARAM_REGEX, processor);
|
||||
return `<span style="color: ${color}">${processedInner}</span>`;
|
||||
});
|
||||
|
||||
const desc2 = desc1.replace(/<unbreak>#(\d+)\[(f(\d+)|i)\](%)?<\/unbreak>/g, (
|
||||
_: string,
|
||||
index: string,
|
||||
format: string,
|
||||
floatDigits: string | undefined,
|
||||
percent: string | undefined
|
||||
): string => formatParam(index, format, floatDigits, percent));
|
||||
result = result.replace(/<unbreak>(.*?)<\/unbreak>/g, (_, inner) => {
|
||||
return inner.replace(PARAM_REGEX, processor);
|
||||
});
|
||||
|
||||
const desc3 = desc2.replace(/<unbreak>(\d+)<\/unbreak>/g, (_: string, number: string): string => number);
|
||||
result = result.replace(PARAM_REGEX, processor);
|
||||
|
||||
const desc4 = desc3.replaceAll("\\n", "<br></br>");
|
||||
return desc4;
|
||||
}
|
||||
return result.split("\\n").join("<br/>");
|
||||
}
|
||||
@@ -112,9 +112,11 @@ export interface SkillDetail {
|
||||
Level: Record<string, SkillLevel>;
|
||||
Icon: string;
|
||||
Desc: Record<string, string>;
|
||||
SimpleDesc: Record<string, string>;
|
||||
RatedSkillTreeID: number[];
|
||||
RatedRankID: number[];
|
||||
Extra: Record<string, ExtraEffect>;
|
||||
SimpleExtra: Record<string, ExtraEffect>;
|
||||
SPBase: number | null;
|
||||
StanceDamageDisplay: number;
|
||||
SPMultipleRatio: number | null;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const affixDetailSchema = z.object({
|
||||
property: z.string(),
|
||||
base: z.number(),
|
||||
step: z.number(),
|
||||
step_num: z.number()
|
||||
});
|
||||
@@ -1,78 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const bossDifficultyGuideSchema = z.object({
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
SkillID: z.number().optional().nullable(),
|
||||
ParamFix: z.array(z.number())
|
||||
});
|
||||
|
||||
export const bossPhaseSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Answer: z.string(),
|
||||
Difficulty: z.number(),
|
||||
SkillList: z.array(z.number())
|
||||
});
|
||||
|
||||
export const bossChildTagSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number())
|
||||
});
|
||||
|
||||
const buffDetailSchema = z.any();
|
||||
|
||||
const optionDetailSchema = z.any();
|
||||
|
||||
const challengeDetailSchema = z.any();
|
||||
|
||||
const eventStageDetailSchema = z.any();
|
||||
|
||||
export const bossTagSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
SkillID: z.number().optional().nullable(),
|
||||
ParamFix: z.array(z.number()),
|
||||
Child: z.array(bossChildTagSchema)
|
||||
});
|
||||
|
||||
export const bossMonsterConfigSchema = z.object({
|
||||
Difficulty: z.number(),
|
||||
DifficultyList: z.array(z.number()),
|
||||
TagList: z.array(bossTagSchema),
|
||||
DifficultyGuideList: z.array(bossDifficultyGuideSchema),
|
||||
TextGuideList: z.array(z.string()),
|
||||
PhaseList: z.array(bossPhaseSchema)
|
||||
});
|
||||
|
||||
export const asLevelSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Challenge: z.array(challengeDetailSchema),
|
||||
DamageType1: z.array(z.string()),
|
||||
DamageType2: z.array(z.string()),
|
||||
MazeGroupID1: z.number(),
|
||||
MazeGroupID2: z.number(),
|
||||
BossMonsterID1: z.number(),
|
||||
BossMonsterID2: z.number(),
|
||||
BossMonsterID1SkillList: z.array(z.number()),
|
||||
BossMonsterID2SkillList: z.array(z.number()),
|
||||
BossMonsterConfig1: bossMonsterConfigSchema,
|
||||
BossMonsterConfig2: bossMonsterConfigSchema,
|
||||
EventIDList1: z.array(eventStageDetailSchema),
|
||||
EventIDList2: z.array(eventStageDetailSchema)
|
||||
});
|
||||
|
||||
export const asDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Buff: buffDetailSchema.optional(),
|
||||
BuffList1: z.array(optionDetailSchema),
|
||||
BuffList2: z.array(optionDetailSchema),
|
||||
BeginTime: z.string(),
|
||||
EndTime: z.string(),
|
||||
Level: z.array(asLevelSchema)
|
||||
});
|
||||
@@ -1,15 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const characterBasicRawSchema = z.object({
|
||||
release: z.number(),
|
||||
icon: z.string(),
|
||||
rank: z.string(),
|
||||
baseType: z.string(),
|
||||
damageType: z.string(),
|
||||
en: z.string(),
|
||||
desc: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string()
|
||||
});
|
||||
@@ -1,181 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const rankTypeSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
ParamList: z.array(z.number())
|
||||
});
|
||||
|
||||
export const voiceActorsSchema = z.object({
|
||||
Chinese: z.string().nullable(),
|
||||
Japanese: z.string().nullable(),
|
||||
Korean: z.string().nullable(),
|
||||
English: z.string().nullable()
|
||||
});
|
||||
|
||||
export const levelParamsSchema = z.object({
|
||||
Level: z.number(),
|
||||
ParamList: z.array(z.number())
|
||||
});
|
||||
|
||||
export const statusAddTypeSchema = z.object({
|
||||
$type: z.string(),
|
||||
PropertyType: z.string(),
|
||||
Value: z.number(),
|
||||
Name: z.string()
|
||||
});
|
||||
|
||||
export const itemConfigRowSchema = z.object({
|
||||
$type: z.string(),
|
||||
ItemID: z.number(),
|
||||
ItemNum: z.number(),
|
||||
Rarity: z.string()
|
||||
});
|
||||
|
||||
export const extraSchema = z.object({
|
||||
name: z.string(),
|
||||
desc: z.string(),
|
||||
param: z.array(z.number())
|
||||
});
|
||||
|
||||
export const uniqueAbilitySchema = z.object({
|
||||
Tag: z.string(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
Extra: z.record(z.string(), extraSchema)
|
||||
});
|
||||
|
||||
export const statSchema = z.object({
|
||||
AttackBase: z.number(),
|
||||
AttackAdd: z.number(),
|
||||
DefenceBase: z.number(),
|
||||
DefenceAdd: z.number(),
|
||||
HPBase: z.number(),
|
||||
HPAdd: z.number(),
|
||||
SpeedBase: z.number(),
|
||||
CriticalChance: z.number(),
|
||||
CriticalDamage: z.number(),
|
||||
BaseAggro: z.number(),
|
||||
Cost: z.array(itemConfigRowSchema)
|
||||
});
|
||||
|
||||
export const relicRecommendPropertySchema = z.object({
|
||||
$type: z.string(),
|
||||
RelicType: z.string(),
|
||||
PropertyType: z.string()
|
||||
});
|
||||
|
||||
export const characterInfoSchema = z.object({
|
||||
Camp: z.string().nullable(),
|
||||
VA: voiceActorsSchema,
|
||||
Stories: z.record(z.string(), z.string().nullable()),
|
||||
Voicelines: z.array(z.string())
|
||||
});
|
||||
|
||||
export const skillTypeSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Desc: z.string().nullable(),
|
||||
SimpleDesc: z.string(),
|
||||
Type: z.string(),
|
||||
Tag: z.string(),
|
||||
SPBase: z.number().nullable(),
|
||||
BPNeed: z.number(),
|
||||
BPAdd: z.number(),
|
||||
ShowStanceList: z.array(z.number()),
|
||||
SkillComboValueDelta: z.number().nullable(),
|
||||
Level: z.record(z.string(), levelParamsSchema)
|
||||
});
|
||||
|
||||
export const skillTreePointSchema = z.object({
|
||||
Anchor: z.string(),
|
||||
AvatarPromotionLimit: z.number().nullable(),
|
||||
AvatarLevelLimit: z.number().nullable(),
|
||||
DefaultUnlock: z.boolean(),
|
||||
Icon: z.string(),
|
||||
LevelUpSkillID: z.array(z.number()),
|
||||
MaterialList: z.array(itemConfigRowSchema),
|
||||
MaxLevel: z.number(),
|
||||
ParamList: z.array(z.number()),
|
||||
PointID: z.number(),
|
||||
PointName: z.string().nullable(),
|
||||
PointDesc: z.string().nullable(),
|
||||
PointTriggerKey: z.number(),
|
||||
PointType: z.number(),
|
||||
PrePoint: z.array(z.string()),
|
||||
StatusAddList: z.array(statusAddTypeSchema)
|
||||
});
|
||||
|
||||
export const relicsSchema = z.object({
|
||||
AvatarID: z.number(),
|
||||
Set4IDList: z.array(z.number()),
|
||||
Set2IDList: z.array(z.number()),
|
||||
PropertyList3: z.array(z.string()),
|
||||
PropertyList4: z.array(z.string()),
|
||||
PropertyList5: z.array(z.string()),
|
||||
PropertyList6: z.array(z.string()),
|
||||
PropertyList: z.array(relicRecommendPropertySchema),
|
||||
SubAffixPropertyList: z.array(z.string()),
|
||||
ScoreRankList: z.array(z.number())
|
||||
});
|
||||
|
||||
export const enhancedTypeSchema = z.object({
|
||||
Descs: z.array(z.string()),
|
||||
ChangeRankList: z.unknown(),
|
||||
ChangeSkillTreeList: z.unknown(),
|
||||
Ranks: z.record(z.string(), rankTypeSchema),
|
||||
Skills: z.record(z.string(), skillTypeSchema),
|
||||
SkillTrees: z.record(z.string(), z.record(z.string(), skillTreePointSchema))
|
||||
});
|
||||
|
||||
export const spriteSkillSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string().nullable(),
|
||||
SimpleDesc: z.string(),
|
||||
Type: z.string().nullable(),
|
||||
Tag: z.string(),
|
||||
SPBase: z.number().nullable(),
|
||||
BPNeed: z.number(),
|
||||
BPAdd: z.number().nullable(),
|
||||
ShowStanceList: z.array(z.number()),
|
||||
SkillComboValueDelta: z.number().nullable(),
|
||||
Extra: z.record(z.string(), extraSchema),
|
||||
Level: z.record(z.string(), levelParamsSchema)
|
||||
});
|
||||
|
||||
export const memospriteSchema = z.object({
|
||||
Name: z.string(),
|
||||
Icon: z.string(),
|
||||
HPBase: z.string(),
|
||||
HPInherit: z.string(),
|
||||
HPSkill: z.number().nullable(),
|
||||
SpeedBase: z.string(),
|
||||
SpeedInherit: z.string(),
|
||||
SpeedSkill: z.number(),
|
||||
Aggro: z.number(),
|
||||
Skills: z.record(z.string(), spriteSkillSchema),
|
||||
Talent: z.record(z.string(), z.unknown())
|
||||
});
|
||||
|
||||
export const characterDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
CharaInfo: characterInfoSchema,
|
||||
Rarity: z.string(),
|
||||
AvatarVOTag: z.string(),
|
||||
SPNeed: z.number().nullable(),
|
||||
BaseType: z.string(),
|
||||
DamageType: z.string(),
|
||||
Ranks: z.record(z.string(), rankTypeSchema),
|
||||
Skills: z.record(z.string(), skillTypeSchema),
|
||||
SkillTrees: z.record(z.string(), z.record(z.string(), skillTreePointSchema)),
|
||||
Memosprite: memospriteSchema,
|
||||
Unique: z.record(z.string(), uniqueAbilitySchema),
|
||||
Stats: z.record(z.string(), statSchema),
|
||||
Relics: relicsSchema,
|
||||
Enhanced: z.record(z.string(), enhancedTypeSchema),
|
||||
RankIcon: z.array(z.string())
|
||||
});
|
||||
@@ -1,42 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const asConfigMazeSchema = z.object({
|
||||
buff_1: z.array(z.number()),
|
||||
buff_2: z.array(z.number()),
|
||||
maze_buff: z.number()
|
||||
});
|
||||
|
||||
export const pfConfigMazeSchema = z.object({
|
||||
buff: z.array(z.number()),
|
||||
maze_buff: z.number()
|
||||
});
|
||||
|
||||
export const mocConfigMazeSchema = z.object({
|
||||
maze_buff: z.number()
|
||||
});
|
||||
|
||||
export const avatarConfigMazeSchema = z.object({
|
||||
maze_buff: z.array(z.number())
|
||||
});
|
||||
|
||||
export const stageConfigMazeSchema = z.object({
|
||||
stage_id: z.number(),
|
||||
stage_type: z.string(),
|
||||
level: z.number(),
|
||||
monster_list: z.array(z.record(z.string(), z.number()))
|
||||
});
|
||||
|
||||
export const skillConfigMazeSchema = z.object({
|
||||
max_level: z.number(),
|
||||
index_slot: z.number()
|
||||
});
|
||||
|
||||
export const configMazeSchema = z.object({
|
||||
Avatar: z.record(z.string(), avatarConfigMazeSchema),
|
||||
MOC: z.record(z.string(), mocConfigMazeSchema),
|
||||
AS: z.record(z.string(), asConfigMazeSchema),
|
||||
PF: z.record(z.string(), pfConfigMazeSchema),
|
||||
Stage: z.record(z.string(), stageConfigMazeSchema),
|
||||
Skill: z.record(z.string(), skillConfigMazeSchema)
|
||||
});
|
||||
@@ -1,15 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const eventBasicRawSchema = z.object({
|
||||
param: z.array(z.number()).optional(),
|
||||
en: z.string(),
|
||||
id: z.string(),
|
||||
begin: z.string(),
|
||||
end: z.string(),
|
||||
live_begin: z.string(),
|
||||
live_end: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string()
|
||||
});
|
||||
@@ -1,24 +1,8 @@
|
||||
export * from "./characterBasic.zod"
|
||||
export * from "./characterDetail.zod"
|
||||
export * from "./srtools.zod"
|
||||
export * from "./filter.zod"
|
||||
export * from "./mics.zod"
|
||||
export * from "./config_maze.zod"
|
||||
export * from "./lightconeBasic.zod"
|
||||
export * from "./lightconeDetail.zod"
|
||||
export * from "./relicBasic.zod"
|
||||
export * from "./relicDetail.zod"
|
||||
export * from "./affix.zod"
|
||||
export * from "./enka.zod"
|
||||
export * from "./card.zod"
|
||||
export * from "./eventBasic.zod"
|
||||
export * from "./monsterBasic.zod"
|
||||
export * from "./pfDetail.zod"
|
||||
export * from "./asDetail.zod"
|
||||
export * from "./mocDetail.zod"
|
||||
export * from "./monsterValue.zod"
|
||||
export * from "./peakDetail.zod"
|
||||
export * from "./monsterDetail.zod"
|
||||
export * from "./extraData.zod"
|
||||
export * from "./showcase.zod"
|
||||
export * from "./srtools.zod"
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const lightConeBasicRawSchema = z.object({
|
||||
rank: z.string(),
|
||||
baseType: z.string(),
|
||||
en: z.string(),
|
||||
desc: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string()
|
||||
});
|
||||
@@ -1,45 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
const refinementDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Level: z.record(z.string(), z.object({
|
||||
ParamList: z.array(z.number())
|
||||
}))
|
||||
});
|
||||
|
||||
const promotionCostSchema = z.object({
|
||||
$type: z.string(),
|
||||
ItemID: z.number(),
|
||||
ItemNum: z.number(),
|
||||
Rarity: z.string()
|
||||
});
|
||||
|
||||
const statEntryDetailSchema = z.object({
|
||||
EquipmentID: z.number(),
|
||||
Promotion: z.number().optional(),
|
||||
PromotionCostList: z.array(promotionCostSchema),
|
||||
PlayerLevelRequire: z.number().optional(),
|
||||
WorldLevelRequire: z.number().optional(),
|
||||
MaxLevel: z.number(),
|
||||
BaseHP: z.number(),
|
||||
BaseHPAdd: z.number(),
|
||||
BaseAttack: z.number(),
|
||||
BaseAttackAdd: z.number(),
|
||||
BaseDefence: z.number(),
|
||||
BaseDefenceAdd: z.number()
|
||||
});
|
||||
|
||||
export const lightConeDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Rarity: z.string(),
|
||||
BaseType: z.string(),
|
||||
Refinements: refinementDetailSchema,
|
||||
Stats: z.array(statEntryDetailSchema),
|
||||
Bonus: z.record(z.string(), z.array(z.object({
|
||||
type: z.string(),
|
||||
value: z.number()
|
||||
})))
|
||||
});
|
||||
@@ -1,52 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const challengeDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Param: z.number().optional()
|
||||
});
|
||||
|
||||
export const stageConfigSchema = z.record(z.string(), z.string()).and(z.object({
|
||||
$type: z.string()
|
||||
}));
|
||||
|
||||
export const eventStageDetailSchema = z.object({
|
||||
StageID: z.number(),
|
||||
StageType: z.string(),
|
||||
StageName: z.number(),
|
||||
HardLevelGroup: z.number(),
|
||||
Level: z.number(),
|
||||
EliteGroup: z.number().optional(),
|
||||
LevelGraphPath: z.string(),
|
||||
StageAbilityConfig: z.array(z.any()),
|
||||
BattleScoringGroup: z.number().optional(),
|
||||
SubLevelGraphs: z.array(z.any()),
|
||||
StageConfigData: z.array(stageConfigSchema),
|
||||
MonsterList: z.array(z.record(z.string(), z.number())),
|
||||
LevelLoseCondition: z.array(z.string()),
|
||||
LevelWinCondition: z.array(z.string()),
|
||||
Release: z.boolean(),
|
||||
ForbidExitBattle: z.boolean(),
|
||||
MonsterWarningRatio: z.number().optional(),
|
||||
TrialAvatarList: z.array(z.any())
|
||||
});
|
||||
|
||||
export const mocDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
GroupName: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
Challenge: z.array(challengeDetailSchema),
|
||||
Countdown: z.number(),
|
||||
DamageType1: z.array(z.string()),
|
||||
DamageType2: z.array(z.string()),
|
||||
MazeGroupID1: z.number(),
|
||||
MazeGroupID2: z.number(),
|
||||
NpcMonsterIDList1: z.array(z.number()),
|
||||
NpcMonsterIDList2: z.array(z.number()),
|
||||
EventIDList1: z.array(eventStageDetailSchema),
|
||||
EventIDList2: z.array(eventStageDetailSchema),
|
||||
BeginTime: z.string(),
|
||||
EndTime: z.string()
|
||||
});
|
||||
@@ -1,15 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const monsterBasicRawSchema = z.object({
|
||||
rank: z.string(),
|
||||
camp: z.string().nullable(),
|
||||
icon: z.string(),
|
||||
child: z.array(z.number()),
|
||||
weak: z.array(z.string()),
|
||||
en: z.string(),
|
||||
desc: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string()
|
||||
});
|
||||
@@ -1,64 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const monsterDetailElementResistanceSchema = z.object({
|
||||
$type: z.string(),
|
||||
DamageType: z.string(),
|
||||
Value: z.number()
|
||||
});
|
||||
|
||||
export const monsterDetailSkillSchema = z.object({
|
||||
Id: z.number(),
|
||||
SkillName: z.string().nullable(),
|
||||
SkillDesc: z.string().nullable(),
|
||||
DamageType: z.string(),
|
||||
SPHitBase: z.union([z.number(), z.string()])
|
||||
});
|
||||
|
||||
export const monsterDetailDropItemSchema = z.object({
|
||||
$type: z.string(),
|
||||
ID: z.number()
|
||||
});
|
||||
|
||||
export const monsterDetailChildSchema = z.object({
|
||||
Id: z.number(),
|
||||
AttackModifyRatio: z.number(),
|
||||
DefenceModifyRatio: z.number(),
|
||||
EliteGroup: z.number(),
|
||||
HPModifyRatio: z.number(),
|
||||
SpeedModifyRatio: z.number(),
|
||||
SpeedModifyValue: z.number().nullable(),
|
||||
StanceModifyRatio: z.number(),
|
||||
StanceWeakList: z.array(z.string()),
|
||||
HardLevelGroup: z.number(),
|
||||
DamageTypeResistance: z.array(monsterDetailElementResistanceSchema),
|
||||
SkillList: z.array(monsterDetailSkillSchema)
|
||||
});
|
||||
|
||||
export const monsterDetailDropSchema = z.object({
|
||||
MonsterTemplateID: z.number(),
|
||||
WorldLevel: z.number().optional(),
|
||||
AvatarExpReward: z.number(),
|
||||
DisplayItemList: z.array(monsterDetailDropItemSchema)
|
||||
});
|
||||
|
||||
export const monsterDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
MonsterCampID: z.number().nullable(),
|
||||
AttackBase: z.number(),
|
||||
CriticalDamageBase: z.number(),
|
||||
DefenceBase: z.number(),
|
||||
HPBase: z.number(),
|
||||
InitialDelayRatio: z.number(),
|
||||
ImagePath: z.string(),
|
||||
MinimumFatigueRatio: z.number(),
|
||||
Rank: z.string(),
|
||||
SpeedBase: z.number(),
|
||||
StanceBase: z.number(),
|
||||
StanceCount: z.number(),
|
||||
StatusResistanceBase: z.number(),
|
||||
Child: z.array(monsterDetailChildSchema),
|
||||
Drop: z.array(monsterDetailDropSchema)
|
||||
});
|
||||
@@ -1,26 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const monsterChildSchema = z.object({
|
||||
Id: z.number(),
|
||||
AttackModifyRatio: z.number(),
|
||||
DefenceModifyRatio: z.number(),
|
||||
EliteGroup: z.number(),
|
||||
HPModifyRatio: z.number(),
|
||||
SpeedModifyRatio: z.number(),
|
||||
SpeedModifyValue: z.number().nullable(),
|
||||
StanceModifyRatio: z.number(),
|
||||
HardLevelGroup: z.number(),
|
||||
StanceWeakList: z.array(z.string())
|
||||
});
|
||||
|
||||
export const monsterValueSchema = z.object({
|
||||
Rank: z.string(),
|
||||
AttackBase: z.number(),
|
||||
DefenceBase: z.number(),
|
||||
HPBase: z.number(),
|
||||
SpeedBase: z.number(),
|
||||
StanceBase: z.number(),
|
||||
StatusResistanceBase: z.number(),
|
||||
child: z.array(monsterChildSchema)
|
||||
});
|
||||
@@ -1,40 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const challengeTagSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number())
|
||||
});
|
||||
|
||||
const eventStageDetailSchema = z.any();
|
||||
|
||||
const infiniteWaveSchema = z.any();
|
||||
|
||||
export const peakLevelSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
DamageType: z.array(z.string()),
|
||||
MazeGroupID: z.number(),
|
||||
NpcMonsterIDList: z.array(z.number()),
|
||||
EventIDList: z.array(eventStageDetailSchema),
|
||||
TagList: z.array(challengeTagSchema),
|
||||
InfiniteList: z.record(z.string(), infiniteWaveSchema)
|
||||
});
|
||||
|
||||
export const bossConfigSchema = z.object({
|
||||
HardName: z.string(),
|
||||
BuffList: z.array(challengeTagSchema),
|
||||
EventIDList: z.array(eventStageDetailSchema),
|
||||
TagList: z.array(challengeTagSchema),
|
||||
InfiniteList: z.record(z.string(), infiniteWaveSchema)
|
||||
});
|
||||
|
||||
export const peakDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
PreLevel: z.array(peakLevelSchema),
|
||||
BossLevel: peakLevelSchema,
|
||||
BossConfig: bossConfigSchema
|
||||
});
|
||||
@@ -1,56 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const buffDetailSchema = z.object({
|
||||
Name: z.string().nullable(),
|
||||
Desc: z.string().nullable(),
|
||||
Param: z.array(z.number())
|
||||
});
|
||||
|
||||
export const optionDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number())
|
||||
});
|
||||
|
||||
export const infiniteWaveSchema = z.object({
|
||||
InfiniteWaveID: z.number(),
|
||||
MonsterGroupIDList: z.array(z.number()),
|
||||
MaxMonsterCount: z.number(),
|
||||
MaxTeammateCount: z.number(),
|
||||
Ability: z.string(),
|
||||
ParamList: z.array(z.number()),
|
||||
ClearPreviousAbility: z.boolean(),
|
||||
EliteGroup: z.number()
|
||||
});
|
||||
|
||||
const challengeDetailSchema = z.any();
|
||||
|
||||
const eventStageDetailSchema = z.any();
|
||||
|
||||
export const pfLevelSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Challenge: z.array(challengeDetailSchema),
|
||||
DamageType1: z.array(z.string()),
|
||||
DamageType2: z.array(z.string()),
|
||||
MazeGroupID1: z.number(),
|
||||
MazeGroupID2: z.number(),
|
||||
NpcMonsterIDList1: z.array(z.number()),
|
||||
NpcMonsterIDList2: z.array(z.number()),
|
||||
EventIDList1: z.array(eventStageDetailSchema),
|
||||
EventIDList2: z.array(eventStageDetailSchema),
|
||||
InfiniteList1: z.record(z.string(), infiniteWaveSchema),
|
||||
InfiniteList2: z.record(z.string(), infiniteWaveSchema)
|
||||
});
|
||||
|
||||
export const pfDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Buff: buffDetailSchema,
|
||||
Option: z.array(optionDetailSchema),
|
||||
SubOption: z.array(optionDetailSchema),
|
||||
BeginTime: z.string(),
|
||||
EndTime: z.string(),
|
||||
Level: z.array(pfLevelSchema)
|
||||
});
|
||||
@@ -1,10 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const relicBasicRawEffectSchema = z.object({
|
||||
en: z.string(),
|
||||
ParamList: z.array(z.number()),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string()
|
||||
});
|
||||
@@ -1,24 +0,0 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const partDataSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Story: z.string()
|
||||
});
|
||||
|
||||
export const requireBonusSchema = z.object({
|
||||
Desc: z.string(),
|
||||
ParamList: z.array(z.number())
|
||||
});
|
||||
|
||||
export const relicDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Icon: z.string(),
|
||||
Parts: z.record(z.string(), partDataSchema),
|
||||
RequireNum: z.record(z.string(), requireBonusSchema),
|
||||
Bonus: z.record(z.string(), z.array(z.object({
|
||||
type: z.string(),
|
||||
value: z.number()
|
||||
})))
|
||||
});
|
||||
Reference in New Issue
Block a user