update for 3.3.1

This commit is contained in:
2025-05-24 15:55:48 +07:00
parent 7782691604
commit dafd0af23d
28 changed files with 513 additions and 161 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
import { AvatarType } from "./lineup";
import { EntityType } from "./entity";
export interface AttackResultType {
attacker: AvatarType;
export interface DamageType {
attacker: EntityType;
damage: number;
damage_type?: AttackType
}
-3
View File
@@ -10,9 +10,6 @@ export interface BattleEndType {
action_value: number;
stage_id: number;
}
export interface KillType {
attacker: AvatarType;
}
export interface BattleBeginType {
max_waves: number
+12
View File
@@ -0,0 +1,12 @@
import { StatsType } from "./stat";
export interface EnemyType {
id: number;
uid: number;
name: string;
base_stats: StatsType
}
export interface InitializeEnemyType {
enemy: EnemyType
}
+9
View File
@@ -0,0 +1,9 @@
export interface EntityType {
uid: number;
team: "Player" | "Enemy";
}
export interface EntityDefeatedType {
killer: EntityType,
entity_defeated: EntityType
}
+3
View File
@@ -0,0 +1,3 @@
export interface ErrorType {
msg: string
}
+4 -1
View File
@@ -5,4 +5,7 @@ export * from "./lineup"
export * from "./skill"
export * from "./turn"
export * from "./waveAndCycle"
export * from "./srtools"
export * from "./srtools"
export * from "./version"
export * from "./entity"
export * from "./stat"
+9 -1
View File
@@ -1,8 +1,16 @@
import { EntityType } from "./entity";
export interface AvatarType{
id: number;
name: string;
}
export interface LineUpType {
export interface SetBattleLineupType {
avatars: AvatarType[];
}
export interface UpdateTeamFormationType {
entities: EntityType[],
team: "Player" | "Enemy"
}
+34 -3
View File
@@ -1,9 +1,11 @@
import {AttackType, DamageDetailType} from "./attack";
import { AvatarAnalysisJson } from "./srtools";
import { StatType } from "./stat";
export interface AvatarBattleInfo {
avatarId: number;
isDie: boolean;
isDie?: boolean;
}
export interface SkillBattleInfo {
@@ -33,5 +35,34 @@ export interface BattleDataStateJson {
maxWave: number;
cycleIndex: number,
waveIndex: number,
maxCycle: number
}
maxCycle: number,
version?: string,
avatarDetail?: Record<number, AvatarInfo>;
enemyDetail?: Record<number, EnemyInfo>;
}
export interface StatsHistoryType {
stats: StatType
turnBattleId: number;
}
export interface EnemyInfo {
id: number;
name: string;
maxHP: number;
level: number;
isDie: boolean;
positionIndex: number;
waveIndex: number;
killer_uid: number;
stats: Record<string, number>;
statsHistory: StatsHistoryType[];
}
export interface AvatarInfo {
id: number;
isDie: boolean;
killer_uid: number;
stats: Record<string, number>;
statsHistory: StatsHistoryType[];
}
+5 -3
View File
@@ -1,12 +1,14 @@
import { AvatarType } from "./lineup";
import { AttackType } from "@/types/attack";
import { EntityType } from "./entity";
export interface SkillInfo {
name: string;
type: AttackType;
skill_config_id: number;
}
export interface AvatarSkillType {
avatar: AvatarType;
export interface UseSkillType {
avatar: EntityType;
skill: SkillInfo;
}
+13
View File
@@ -0,0 +1,13 @@
import { EntityType } from "./entity";
export type StatType = Record<string, number>
export interface StatsType {
level: number;
hp: number;
}
export interface StatChangeType {
entity: EntityType,
stat: StatType,
}
+2 -4
View File
@@ -1,5 +1,4 @@
import { AvatarType } from "./lineup";
import { EntityType } from "./entity";
export interface TurnInfoType {
avatars_turn_damage: number[];
@@ -11,10 +10,9 @@ export interface TurnInfoType {
export interface TurnBeginType {
action_value: number;
turn_owner?: AvatarType
turn_owner?: EntityType | null
}
export interface TurnEndType {
avatars: AvatarType[];
turn_info: TurnInfoType
}
+3
View File
@@ -0,0 +1,3 @@
export interface VersionType {
version: string
}