修改战斗系统
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
"math/rand"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
const TableNamePet = "pet"
|
||||
@@ -87,13 +89,19 @@ func GenPetInfo(id int, dv, natureId, abilityTypeEnum, shinyid, level []int) *Pe
|
||||
CatchTime: uint32(time.Now().Unix()),
|
||||
Level: uint32(RandomInRange(level))} //等级
|
||||
|
||||
p.EffectInfo = append(p.EffectInfo, PetEffectInfo{
|
||||
EID: 28,
|
||||
})
|
||||
naxml := xmlres.NatureRootMap[int(p.Nature)]
|
||||
petxml := xmlres.PetMAP[int(id)]
|
||||
|
||||
p.EffectInfo[0].Args = []int{petxml.Type, 5} //默认等级1
|
||||
if abilityTypeEnum != nil {
|
||||
|
||||
rrr := xmlres.EffectMAP[RandomInRange(abilityTypeEnum)+1006]
|
||||
p.EffectInfo = append(p.EffectInfo, PetEffectInfo{
|
||||
EID: uint16(gconv.Int16(rrr.Eid)),
|
||||
Args: rrr.ArgsS,
|
||||
})
|
||||
//p.EffectInfo[0].Args = []int{petxml.Type, 5} //默认等级1
|
||||
|
||||
}
|
||||
tttt := make([]uint32, 0)
|
||||
for _, v := range petxml.LearnableMoves.Moves {
|
||||
if p.Level >= uint32(v.LearningLv) {
|
||||
|
||||
Reference in New Issue
Block a user