refactor(fight): 重构战斗相关实体属性
- 注释掉 BattlePetEntity 中的 CanSet 字段 - 删除 UnitAttributes 结构体 - 重命名 BattleSkillEntity 中的 DamageZone 相关字段 - 调整 DamageZoneValue 结构体的定义位置
This commit is contained in:
@@ -26,7 +26,7 @@ var AttrType = enum.New[struct {
|
||||
|
||||
// 属性封装结构:Ext 存储临时血量增量(key=状态ID,value=增量值)
|
||||
type Attribute struct {
|
||||
CanSet bool // 是否允许修改
|
||||
//CanSet bool // 是否允许修改
|
||||
originalValue int
|
||||
|
||||
Stat int //提升等级
|
||||
@@ -38,11 +38,6 @@ func (a *Attribute) Value() int64 {
|
||||
return calculateRealValue(int64(a.originalValue), a.Stat)
|
||||
}
|
||||
|
||||
// 基础属性集合:管理所有属性的封装结构
|
||||
type UnitAttributes struct {
|
||||
attrs map[EnumAttrType]*Attribute // 属性类型→属性封装
|
||||
}
|
||||
|
||||
type BattlePetEntity struct {
|
||||
// /host *BattleInputSourceEntity // 宠物的主人(输入源)
|
||||
//uuid string // 唯一标识
|
||||
|
||||
@@ -161,15 +161,24 @@ type DamageZoneValue struct {
|
||||
}
|
||||
|
||||
var Zone = enum.New[struct {
|
||||
|
||||
//增伤区间
|
||||
Power DamageZone // 通用增伤区
|
||||
|
||||
PowerP DamageZone //物理增伤区
|
||||
PowerS DamageZone //特殊增伤区
|
||||
Power_P DamageZone //物理
|
||||
Power_S DamageZone //特殊
|
||||
Power_C DamageZone //固定
|
||||
Power_B DamageZone //百分比
|
||||
Power_T DamageZone //真伤
|
||||
|
||||
Power_R DamageZone // 通用减伤区
|
||||
PowerP_R DamageZone //物理增伤区
|
||||
PowerS_R DamageZone //特殊增伤区
|
||||
//减伤区间
|
||||
Power_R DamageZone // 通用
|
||||
Power_P_R DamageZone //物理
|
||||
Power_S_R DamageZone //特殊
|
||||
Power_C_R DamageZone //固定
|
||||
|
||||
Power_B_R DamageZone //百分比
|
||||
Power_T_R DamageZone //真伤
|
||||
}]()
|
||||
|
||||
// s_nul DamageMultiplierZone //殊效果乘算区, 例如Boss伤害减免或哈莫雷特的非对应顺序技能攻击为0, 此系数默认为1
|
||||
|
||||
Reference in New Issue
Block a user