``refactor(pet): 提取宠物基础属性计算逻辑到GetBasic方法,优化经验计算流程``

This commit is contained in:
1
2025-10-17 21:38:24 +00:00
parent 6e7dc9ebca
commit 31c7687036
2 changed files with 22 additions and 14 deletions

View File

@@ -45,6 +45,15 @@ type PetInfo struct {
LearnableMoves LearnableMoves `xml:"LearnableMoves"` // 可学习的技能
}
func (basic *PetInfo) GetBasic() uint32 {
return basic.Atk +
basic.Def +
basic.SpAtk +
basic.SpDef +
basic.Spd +
uint32(basic.HP)
}
// Monsters 表示所有怪物的集合
type Monsters struct {
XMLName xml.Name `xml:"Monsters"`