refactor(fight): 重构战斗模块

- 优化了数据结构和类型定义,提高了代码的可读性和可维护性
- 移除了未使用的代码和冗余的结构体字段
- 重新组织了代码文件,提高了模块化程度
- 为后续的战斗逻辑实现和优化奠定了坚实的基础
This commit is contained in:
2025-08-25 16:26:56 +08:00
parent 1405bf5ee9
commit 038a5f13da
12 changed files with 395 additions and 288 deletions

View File

@@ -17,7 +17,7 @@ type MovesTbl struct {
}
type MovesMap struct {
XMLName xml.Name `xml:"MovesTbl"`
Moves map[int64]Move
Moves map[int]Move
EFF []SideEffect `xml:"SideEffects>SideEffect"`
}
@@ -105,9 +105,9 @@ func getMoves() MovesMap {
t1, _ := getxml()
xml.Unmarshal(t1, &maps)
var mapss MovesMap
mapss.Moves = make(map[int64]Move, 0)
mapss.Moves = make(map[int]Move, 0)
for _, v := range maps.Moves {
mapss.Moves[int64(v.ID)] = v
mapss.Moves[int(v.ID)] = v
}
return mapss