``refactor(pet): 提取宠物基础属性计算逻辑到GetBasic方法,优化经验计算流程``
This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user