refactor(fight/xmlres): 重构效果参数处理逻辑,新增JSON解析支持并优化战斗伤害计算

This commit is contained in:
1
2025-09-23 17:34:58 +00:00
parent 53d4fafe73
commit 1245471129
13 changed files with 157 additions and 124 deletions

View File

@@ -0,0 +1,21 @@
package xmlres
type EffectArg struct {
SideEffects struct {
SideEffect []struct {
ID int `json:"ID"`
SideEffectArgcount int `json:"SideEffectArgcount"`
SideEffectArg string `json:"SideEffectArg,omitempty"`
} `json:"SideEffect"`
} `json:"SideEffects"`
}
var EffectArgs map[int]int
func init() {
EffectArgs = make(map[int]int)
for _, t := range EffectArgsConfig.SideEffects.SideEffect {
EffectArgs[t.ID] = t.SideEffectArgcount
}
}