feat(fight): 实现 boss 战斗中精灵特性的支持与多个新魂印效果

- 在 `fight_boss.go` 中为 Boss 的每只宠物增加了 CatchTime 字段以区分不同精灵,
  并修复了技能特效参数解析的问题。
- 新增多个魂印(NewSeIdx)实现,包括:
  * 无限 PP、伤害倍率控制、命中屏蔽、属性克制、暴击率调整等。
- 调整了部分已有 NewSeIdx 文件中的方法调用方式,统一使用 `ID().GetCatchTime()`
  来判断精灵是否在场。
- 修改了 EffectIDCombiner 的字段访问方式,改为通过 Get/Set 方法操作。
- 优化战斗逻辑,在 NPC 战斗中加入 AI 自动出招机制。
This commit is contained in:
2025-11-26 15:25:10 +08:00
parent f76587f952
commit 0ea1a24419
47 changed files with 518 additions and 102 deletions

View File

@@ -19,12 +19,20 @@ func (h Controller) SetPetSkill(data *pet.ChangeSkillInfo, c *player.Player) (re
if !ok {
return result, errorcode.ErrorCodes.ErrSystemBusy
}
_, HasSkill, ok := utils.FindWithIndex(onpet.SkillList, func(item model.SkillInfo) bool { //已经存在技能
_, _, ok = utils.FindWithIndex(onpet.SkillList, func(item model.SkillInfo) bool { //已经存在技能
return item.ID == data.ReplaceSkill
})
if ok {
return result, errorcode.ErrorCodes.ErrSystemBusy
}
_, hasskill, ok := utils.FindWithIndex(onpet.SkillList, func(item model.SkillInfo) bool { //已经存在技能
return item.ID == data.HasSkill
})
if !ok {
HasSkill.ID = data.ReplaceSkill
HasSkill.PP = uint32(xmlres.SkillMap[int(HasSkill.ID)].MaxPP)
if ok {
hasskill.ID = data.ReplaceSkill
hasskill.PP = uint32(xmlres.SkillMap[int(hasskill.ID)].MaxPP)
}
return &pet.ChangeSkillOutInfo{
CatchTime: data.CatchTime,