refactor: 重构战斗属性和特效应用逻辑
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-04-06 03:11:38 +08:00
committed by cnb
parent a16a06e389
commit 40ec827342
9 changed files with 166 additions and 39 deletions

View File

@@ -44,6 +44,27 @@ func (p *baseplayer) GetPetInfo(limitlevel uint32) []model.PetInfo {
}
return ret
}
func (p *baseplayer) AddBattleProp(index int, level int8) {
if p == nil || index < 0 || index >= len(p.Prop) || level == 0 {
return
}
p.Prop[index] += level
if p.Prop[index] > 6 {
p.Prop[index] = 6
}
if p.Prop[index] < -6 {
p.Prop[index] = -6
}
}
func (p *baseplayer) ApplyBattleProps(target *model.AttackValue) {
if p == nil || target == nil {
return
}
target.Prop = p.Prop
}
func (f *baseplayer) InvitePlayer(ff common.PlayerI) {
}