修改战斗系统

This commit is contained in:
2025-09-19 00:29:55 +08:00
parent 60a8be8b48
commit a2eb88e9d3
27 changed files with 87540 additions and 3617 deletions

View File

@@ -9,6 +9,7 @@ import (
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gfsnotify"
"github.com/gogf/gf/v2/os/glog"
"github.com/gogf/gf/v2/util/gconv"
)
var path string
@@ -33,11 +34,12 @@ var (
SkillMap map[int]Move
PetMAP map[int]PetInfo //宠物配置
NatureRootMap map[int]NatureItem
EffectMAP map[int]NewSeIdx
)
func initfile() {
path1, _ := os.Getwd()
path = path1 + "/public/assets/"
path = path1 + "/public/config/"
MapConfig = getXml[Maps](path + "210.xml")
ItemsConfig = getXml[Items](path + "43.xml")
TalkConfig = getXml[TalkCount](path + "talk.xml")
@@ -56,8 +58,8 @@ func initfile() {
// })
SkillMap = make(map[int]Move, len(Skill.Moves))
for _, v := range Skill.Moves {
v.SideEffectS = parseSideEffectArgs(v.SideEffect)
v.SideEffectArgS = parseSideEffectArgs(v.SideEffectArg)
v.SideEffectS = ParseSideEffectArgs(v.SideEffect)
v.SideEffectArgS = ParseSideEffectArgs(v.SideEffectArg)
SkillMap[v.ID] = v
}
@@ -72,6 +74,18 @@ func initfile() {
return m.ID
})
EffectMAP1 := getXml[NewSe](path + "bossbuff和特性.xml")
EffectMAP = make(map[int]NewSeIdx, len(EffectMAP1.SeIdxList))
for _, v := range EffectMAP1.SeIdxList {
v.ArgsS = ParseSideEffectArgs(v.Args)
EffectMAP[gconv.Int(v.Idx)] = v
}
// EffectMAP = utils.ToMap[NewSeIdx, int](EffectMAP1.SeIdxList, func(m NewSeIdx) int {
// return gconv.Int(m.Idx)
// })
}
func init() {