Files
Kg.SeaTime/Web/src/services/Index/FightService.ts
2026-07-08 19:13:55 +08:00

78 lines
1.9 KiB
TypeScript

export class FightService {
/**
* 添加怪物战斗
* POST /Fight/FightMonster
* @param type body
* @param monsterId body
* @param sign body
*/
static async FightMonster(type: number, monsterId: string, sign: string) {
return await ApiService.Request("post", "/Fight/FightMonster", { type, monsterId, sign });
}
/**
* 角色战斗生成
* GET /Fight/FightPerson
*/
static async FightPerson(no: string) {
return await ApiService.Request("get", "/Fight/FightPerson", { no });
}
/**
* 战斗接口
* POST /Fight/Fight
* @param fightId body
* @param data body
*/
static async Fight(fightId: string, data: string) {
return await ApiService.Request("post", "/Fight/Fight", { fightId, data });
}
/**
* 退出战斗
* GET /Fight/Exit
*/
static async Exit(fightId: string) {
return await ApiService.Request("get", "/Fight/Exit", { fightId });
}
/**
* 使用药品
* GET /Fight/UseFightDrug
*/
static async UseFightDrug(fightId: string, drugId: string) {
return await ApiService.Request("get", "/Fight/UseFightDrug", { fightId, drugId });
}
/**
* 战斗信息
* GET /Fight/GetFightMsg
*/
static async GetFightMsg(fightId: string) {
return await ApiService.Request("get", "/Fight/GetFightMsg", { fightId });
}
/**
* 个人挂机信息
* GET /Fight/GetUserHook
*/
static async GetUserHook() {
return await ApiService.Request("get", "/Fight/GetUserHook");
}
/**
* 挂机
* GET /Fight/OnHook
*/
static async OnHook(fightId: string) {
return await ApiService.Request("get", "/Fight/OnHook", { fightId });
}
/**
* 结束挂机
* GET /Fight/StopOnHook
*/
static async StopOnHook() {
return await ApiService.Request("get", "/Fight/StopOnHook");
}
}