feat(fight): 支持勇者之塔和试炼之塔战斗功能

- 实现勇者之塔(CMD 2414)和试炼之塔(CMD 2428)的战斗逻辑
- 添加Tower500Service和Tower600Service的Boss查询功能
- 统一处理两个塔的BossId
This commit is contained in:
2026-01-01 15:37:43 +08:00
parent 4b6f2862d8
commit d88a2d19ea
11 changed files with 77 additions and 32 deletions

View File

@@ -15,7 +15,7 @@ type PetReward struct {
IsEnabled uint32 `gorm:"not null;default:0;comment:'是否启用0-禁用 1-启用)'" json:"is_enabled"`
MonID int32 `gorm:"not null;comment:'BOSS对应的精灵ID'" json:"mon_id"`
DV int32 `gorm:"not null;default:0;comment:'成长值'" json:"dv"`
Nature uint32 `gorm:"not null;default:0;comment:'BOSS属性-性格'" json:"nature"`
Nature int32 `gorm:"not null;default:0;comment:'BOSS属性-性格'" json:"nature"`
Effect int32 `gorm:"not null;comment:'BOSS特性'" json:"effect"`
Lv int32 `gorm:"not null;comment:'BOSS等级LvHpMatchUser非0时此配置无效'" json:"lv"`
IsEgg uint32 `gorm:"not null;default:0;comment:'是否蛋'" json:"is_egg"` //奖励是否为扭蛋奖励

View File

@@ -18,6 +18,8 @@ type TaskConfig struct {
OutState uint32 `gorm:"not null;default:0;comment:'任务分支'" json:"out_state" description:"任务分支"`
//父级任务
ParentTaskId uint32 `gorm:"not null;default:0;comment:'父级任务ID'" json:"parent_task_id" description:"父级任务ID"`
// type(任务类型0为常规任务1为日常任务),
TaskType uint32 `gorm:"not null;default:0;comment:'任务类型'" json:"task_type" description:"任务类型"`
// 奖励配置
ItemRewardIds []uint32 `gorm:"not null;type:json;default:'[]';comment:'绑定奖励物品ID数组关联item_gift表主键'" json:"item_reward_ids" description:"奖励物品数组"`

View File

@@ -13,10 +13,11 @@ type BaseTowerConfig struct {
*cool.Model `json:"-" gorm:"embedded"` // 嵌入通用ModelID/创建时间/更新时间不参与json序列化
// 核心必填字段(与勇者之塔完全一致,仅表名和标识不同)
TowerLevel uint32 `gorm:"not null;default:0;uniqueIndex;comment:'试炼之塔层数(唯一标识每层配置)'" json:"tower_level" description:"试炼之塔层数"`
BossIds []uint32 `gorm:"not null;type:json;default:'[]';comment:'绑定BOSS ID数组关联config_pet_boss表主键'" json:"boss_ids" description:"绑定BOSS数组"`
ItemRewardIds []uint32 `gorm:"not null;type:json;default:'[]';comment:'绑定奖励物品ID数组关联item_gift表主键'" json:"item_reward_ids" description:"绑定奖励物品数组"`
ElfRewardIds []uint32 `gorm:"not null;type:json;default:'[]';comment:'绑定奖励精灵ID数组关联config_pet_boss表主键'" json:"elf_reward_ids" description:"绑定奖励精灵数组"`
TowerLevel uint32 `gorm:"not null;default:0;uniqueIndex;comment:'试炼之塔层数(唯一标识每层配置)'" json:"tower_level" description:"试炼之塔层数"`
BossIds []uint32 `gorm:"not null;type:json;default:'[]';comment:'绑定BOSS ID数组关联config_pet_boss表主键'" json:"boss_ids" description:"绑定BOSS数组"`
//绑定任务数组BaseTowerConfig
TaskIds []uint32 `gorm:"not null;type:json;default:'[]';comment:'绑定任务ID数组关联config_task表主键'" json:"task_ids" description:"绑定任务数组"`
// 通用辅助字段(与勇者之塔完全一致,无额外添加)
IsEnabled uint32 `gorm:"not null;default:1;comment:'是否启用该层配置0-禁用 1-启用)'" json:"is_enabled" description:"是否启用"`