update wave, cycle, damage type ...
This commit is contained in:
+50
-3
@@ -1,6 +1,53 @@
|
||||
import { AvatarInfo } from "./lineup";
|
||||
import { AvatarType } from "./lineup";
|
||||
|
||||
export interface AttackResultType {
|
||||
attacker: AvatarInfo;
|
||||
attacker: AvatarType;
|
||||
damage: number;
|
||||
}
|
||||
damage_type?: AttackType
|
||||
}
|
||||
|
||||
export interface DamageDetailType {
|
||||
damage: number;
|
||||
damage_type?: AttackType
|
||||
}
|
||||
|
||||
|
||||
export enum AttackType {
|
||||
Unknown = 0,
|
||||
Normal = 1,
|
||||
BPSkill = 2,
|
||||
Ultra = 3,
|
||||
QTE = 4,
|
||||
DOT = 5,
|
||||
Pursued = 6,
|
||||
Maze = 7,
|
||||
MazeNormal = 8,
|
||||
Insert = 9,
|
||||
ElementDamage = 10,
|
||||
Level = 11,
|
||||
Servant = 12,
|
||||
TrueDamage = 13
|
||||
}
|
||||
|
||||
export function attackTypeToString(type: AttackType | undefined): string {
|
||||
if (type === undefined) {
|
||||
return ""
|
||||
}
|
||||
switch (type) {
|
||||
case AttackType.Unknown: return "Talent";
|
||||
case AttackType.Normal: return "Basic";
|
||||
case AttackType.BPSkill: return "Skill";
|
||||
case AttackType.Ultra: return "Ultimate";
|
||||
case AttackType.QTE: return "QTE";
|
||||
case AttackType.DOT: return "DOT";
|
||||
case AttackType.Pursued: return "Pursued";
|
||||
case AttackType.Maze: return "Technique";
|
||||
case AttackType.MazeNormal: return "MazeNormal";
|
||||
case AttackType.Insert: return "Follow-up";
|
||||
case AttackType.ElementDamage: return "Elemental Damage";
|
||||
case AttackType.Level: return "Level";
|
||||
case AttackType.Servant: return "Servant";
|
||||
case AttackType.TrueDamage: return "True Damage";
|
||||
default: return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
export interface AvatarHakushiType {
|
||||
export interface AvatarHakushiRawType {
|
||||
release: number;
|
||||
icon: string;
|
||||
rank: string;
|
||||
@@ -11,7 +11,7 @@ export interface AvatarHakushiType {
|
||||
jp: string;
|
||||
}
|
||||
|
||||
export interface AvatarType {
|
||||
export interface AvatarHakushiType {
|
||||
id: string;
|
||||
release: number;
|
||||
icon: string;
|
||||
|
||||
+12
-5
@@ -1,14 +1,21 @@
|
||||
import { AvatarInfo } from "./lineup";
|
||||
import { TurnInfo } from "./turn";
|
||||
import { AvatarType } from "./lineup";
|
||||
import { TurnInfoType } from "./turn";
|
||||
|
||||
export interface BattleEndType {
|
||||
avatars: AvatarInfo[];
|
||||
turn_history: TurnInfo[];
|
||||
avatars: AvatarType[];
|
||||
turn_history: TurnInfoType[];
|
||||
av_history: TurnInfoType[];
|
||||
turn_count: number;
|
||||
total_damage: number;
|
||||
action_value: number;
|
||||
stage_id: number;
|
||||
}
|
||||
export interface KillType {
|
||||
attacker: AvatarInfo;
|
||||
attacker: AvatarType;
|
||||
}
|
||||
|
||||
export interface BattleBeginType {
|
||||
max_waves: number
|
||||
max_cycles: number
|
||||
stage_id: number
|
||||
}
|
||||
+3
-1
@@ -3,4 +3,6 @@ export * from "./avatar"
|
||||
export * from "./battle"
|
||||
export * from "./lineup"
|
||||
export * from "./skill"
|
||||
export * from "./turn"
|
||||
export * from "./turn"
|
||||
export * from "./waveAndCycle"
|
||||
export * from "./srtools"
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
export interface AvatarInfo {
|
||||
export interface AvatarType{
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface LineUpType {
|
||||
avatars: AvatarInfo[];
|
||||
avatars: AvatarType[];
|
||||
}
|
||||
+20
-4
@@ -1,21 +1,37 @@
|
||||
import {AttackType, DamageDetailType} from "./attack";
|
||||
import { AvatarAnalysisJson } from "./srtools";
|
||||
|
||||
export interface AvatarBattleInfo {
|
||||
avatarId: number;
|
||||
isDie: boolean;
|
||||
}
|
||||
|
||||
export interface SkillBattleInfo {
|
||||
avatarId: number;
|
||||
damageDetail: DamageDetailType[];
|
||||
totalDamage: number;
|
||||
skillType: AttackType;
|
||||
skillName: string;
|
||||
turnBattleId: number;
|
||||
}
|
||||
|
||||
export interface TurnBattleInfo {
|
||||
avatarId: number;
|
||||
damageDetail: number[];
|
||||
totalDamage: number;
|
||||
actionValue: number;
|
||||
skillType: string;
|
||||
skillName: string;
|
||||
waveIndex: number;
|
||||
cycleIndex: number;
|
||||
}
|
||||
|
||||
export interface BattleDataStateJson {
|
||||
lineup: AvatarBattleInfo[];
|
||||
turnHistory: TurnBattleInfo[]
|
||||
skillHistory: SkillBattleInfo[]
|
||||
dataAvatar: AvatarAnalysisJson[]
|
||||
totalAV: number;
|
||||
totalDamage: number;
|
||||
damagePerAV: number;
|
||||
maxWave: number;
|
||||
cycleIndex: number,
|
||||
waveIndex: number,
|
||||
maxCycle: number
|
||||
}
|
||||
+4
-3
@@ -1,11 +1,12 @@
|
||||
import { AvatarInfo } from "./lineup";
|
||||
import { AvatarType } from "./lineup";
|
||||
import { AttackType } from "@/types/attack";
|
||||
|
||||
export interface SkillInfo {
|
||||
name: string;
|
||||
type: string;
|
||||
type: AttackType;
|
||||
}
|
||||
|
||||
export interface AvatarSkillType {
|
||||
avatar: AvatarInfo;
|
||||
avatar: AvatarType;
|
||||
skill: SkillInfo;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
export interface AvatarAnalysisJson {
|
||||
owner_uid: number;
|
||||
avatar_id: number;
|
||||
data: AvatarData | null;
|
||||
level: number;
|
||||
promotion: number;
|
||||
techniques: number[];
|
||||
relics: RelicJson[];
|
||||
Lightcone: LightconeJson | null;
|
||||
sp_value: number;
|
||||
sp_max: number;
|
||||
}
|
||||
|
||||
export interface AvatarData {
|
||||
rank: number;
|
||||
skills: Record<string, number>;
|
||||
}
|
||||
|
||||
export interface SubAffix {
|
||||
sub_affix_id: number;
|
||||
count: number;
|
||||
step: number;
|
||||
}
|
||||
|
||||
export interface RelicJson {
|
||||
level: number;
|
||||
relic_id: number;
|
||||
relic_set_id: number;
|
||||
main_affix_id: number;
|
||||
sub_affixes: SubAffix[];
|
||||
internal_uid: number;
|
||||
equip_avatar: number;
|
||||
}
|
||||
|
||||
export interface LightconeJson {
|
||||
level: number;
|
||||
item_id: number;
|
||||
equip_avatar: number;
|
||||
rank: number;
|
||||
promotion: number;
|
||||
internal_uid: number;
|
||||
}
|
||||
+8
-7
@@ -1,19 +1,20 @@
|
||||
import { AvatarInfo } from "./lineup";
|
||||
import { AvatarType } from "./lineup";
|
||||
|
||||
|
||||
export interface TurnInfo {
|
||||
export interface TurnInfoType {
|
||||
avatars_turn_damage: number[];
|
||||
total_damage: number;
|
||||
action_value: number;
|
||||
action_value: number,
|
||||
cycle: number,
|
||||
wave: number,
|
||||
}
|
||||
|
||||
export interface TurnBeginType {
|
||||
action_value: number;
|
||||
turn_owner?: AvatarType
|
||||
}
|
||||
|
||||
export interface TurnEndType {
|
||||
avatars: AvatarInfo[];
|
||||
avatars_damage: number[];
|
||||
total_damage: number;
|
||||
action_value: number;
|
||||
avatars: AvatarType[];
|
||||
turn_info: TurnInfoType
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface UpdateWaveType {
|
||||
wave: number
|
||||
}
|
||||
|
||||
export interface UpdateCycleType {
|
||||
cycle: number
|
||||
}
|
||||
Reference in New Issue
Block a user