refactor(fight): 重构战斗系统属性计算逻辑
- 移除 BattlePetEntity 中的冗余方法 - 优化属性计算逻辑,使用统一的 CalculateRealValue 方法 - 调整 SkillEntity 中的攻击命中计算 - 重构 AttackValue 结构,使用数组替代字典 - 优化 Input 结构,添加 GetProp 和 GetStatusEffect 方法 - 更新 PetInfo 结构,使用数组存储属性值
This commit is contained in:
@@ -65,8 +65,8 @@ func NewAttackValue(userid uint32) *AttackValue {
|
||||
0,
|
||||
[]model.SkillInfo{},
|
||||
0,
|
||||
StatusDict{},
|
||||
PropDict{},
|
||||
[20]int8{},
|
||||
[6]int8{},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,9 +83,9 @@ type AttackValue struct {
|
||||
SkillListLen uint32 `struc:"sizeof=SkillList"`
|
||||
SkillList []model.SkillInfo `json:"skillList" fieldDescription:"根据精灵的数据插入技能 最多4条 不定长"`
|
||||
IsCritical uint32 `json:"isCritical" fieldDescription:"是否暴击"`
|
||||
Status StatusDict //精灵的状态
|
||||
Status [20]int8 //精灵的状态
|
||||
//能力提升属性
|
||||
Prop PropDict
|
||||
Prop [6]int8
|
||||
// OwnerMaxShield uint32 `json:"ownerMaxShield" fieldDescription:"我方最大护盾"`
|
||||
// OwnerCurrentShield uint32 `json:"ownerCurrentShield" fieldDescription:"我方当前护盾"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user