feat(xml): 添加进化配置映射并更新错误码提示

- 在 `common/data/xmlres/file.go` 中添加 EVOLVMAP 用于加载进化配置
- 更新多个控制器中的金币不足错误码,统一使用骄阳余额不足错误码 `ErrSunDouInsufficient10016`
- 修改战斗逻辑中 AI 动作触发机制,并优化战斗流程
- 增加对融合材料合法性的校验
- 调整战斗动作通道缓冲区大小以提升并发处理能力
- 更新 XML 配置
This commit is contained in:
2025-12-16 02:50:10 +08:00
parent 597bd7b9d5
commit 39dc79f706
17 changed files with 101 additions and 47 deletions

View File

@@ -189,7 +189,7 @@ func (our *Input) Damage(in *Input, sub *info.DamageZone) {
}
func (our *Input) GetAction(opp *Input) {
func (our *Input) GetAction() {
next := our.Exec(func(t Effect) bool {
@@ -205,7 +205,7 @@ func (our *Input) GetAction(opp *Input) {
for _, v := range our.AllPet {
if v.Info.Hp > 0 {
our.FightC.ChangePet(our.Player, v.Info.CatchTime)
our.GetAction(our.Opp)
return
}
@@ -237,7 +237,7 @@ func (our *Input) GetAction(opp *Input) {
continue
}
// 计算技能对对方的伤害假设CalculatePower返回伤害值或需从技能中获取
damage := our.CalculatePower(opp, s)
damage := our.CalculatePower(our.Opp, s)
if !s.CanUse() {
continue
@@ -245,7 +245,7 @@ func (our *Input) GetAction(opp *Input) {
allSkills = append(allSkills, skillWithDamage{SkillEntity: s, damage: damage})
// 判断是否能秒杀(伤害 >= 对方当前生命值)
if uint32(damage.IntPart()) >= opp.CurrentPet.Info.Hp { // 假设oppPet.HP为对方当前剩余生命值
if uint32(damage.IntPart()) >= our.Opp.CurrentPet.Info.Hp { // 假设oppPet.HP为对方当前剩余生命值
killableSkills = append(killableSkills, struct {
*info.SkillEntity
damage alpacadecimal.Decimal