feat(pet): 完善宠物异色功能和战斗逻辑

- 优化宠物异色生成逻辑,当Ext不为0时使用Ext值生成异色效果
- 修复战斗中我方放弃出手时的先后手判断逻辑
- 更新宠物融合和还原操作的调试日志输出
```
This commit is contained in:
2025-12-31 00:57:28 +08:00
parent 2dcf80f694
commit b86ab8d5a9
4 changed files with 13 additions and 29 deletions

View File

@@ -46,36 +46,17 @@ type OgrePetInfo struct {
}
func (o *OgrePetInfo) RandSHiny() {
// o.ShinyInfo = make([]data.GlowFilter, 1)
// // 假设 t 是包含 ShinyInfo 字段的结构体ShinyInfo 是 GlowFilter 类型的切片
// o.ShinyInfo[0] = data.GlowFilter{
// // 光晕颜色:白色(十六进制 0xFFFFFF符合 uint32 类型
// Color: 65535,
// // 透明度0.80.0~1.0 范围内的合理值float64 类型)
// Alpha: 0.3,
// // 水平模糊量100~255 范围内uint8 类型略高于默认值6
// BlurX: 20,
// // 垂直模糊量10与 BlurX 对称uint8 类型)
// BlurY: 20,
// // 发光强度80~255 范围内uint8 类型略高于默认值2
// Strength: 1,
// // 滤镜应用次数21~3 范围内int 类型非默认值1
// Quality: 2,
// // 内侧发光truebool 类型,模拟开启内侧发光)
// Inner: true,
// // 挖空falsebool 类型,保持默认逻辑)
// Knockout: false,
// // 颜色矩阵:标准 RGBA 矩阵20个uint8符合 [20]uint8 数组类型)
// // 矩阵含义R=100%、G=100%、B=100%、A=100%,无颜色偏移
var co *data.GlowFilter
if o.Ext != 0 {
co = config.NewShinyService().RandShiny(o.Ext)
} else {
co = config.NewShinyService().RandShiny(o.Id)
}
// }
co := config.NewShinyService().RandShiny(o.Id)
if co != nil {
o.ShinyInfo = append(o.ShinyInfo, *co)
}
//o.ShinyInfo[0].ColorMatrixFilter = GenerateRandomOffspringMatrix().Get()
//g.Dump(ttt.ShinyInfo)
// ttt.Shiny = 0 //待确认是否刷新异色
}
type Player struct {