This commit is contained in:
meixiongfeng 2024-01-30 19:06:41 +08:00
commit 84f3ed024c
3 changed files with 15 additions and 8 deletions

View File

@ -32468,7 +32468,7 @@
},
"value": 1,
"filter": [
1101012
1101014
],
"filter2": []
},

View File

@ -146,17 +146,23 @@ func (this *aiComp) ExceAi(_ai *AI) {
func (this *aiComp) ExceAiHandle_Avoid(_ai *AI, handle *AIHandle) {
var (
weights []int32 = make([]int32, 0)
conf *cfg.GameBuzkashiGradeData
indexhandle int32
)
weights = append(weights, _ai.Conf.BumpFailWeight)
weights = append(weights, _ai.Conf.BumpSuccessWeight...)
indexhandle = comm.GetRandW(weights)
if indexhandle == 0 { //失败
if _ai.ContNum >= _ai.Conf.GoldComboMax {
_ai.ContNum = 0
go this.module.avoid(_ai.Bid, _ai.Uid, 0, 0, nil)
} else {
conf = this.avoidConf[indexhandle-1]
go this.module.avoid(_ai.Bid, _ai.Uid, conf.Distance, 0, conf)
weights = append(weights, _ai.Conf.BumpFailWeight+_ai.ContNum*_ai.Conf.GoldWeight)
weights = append(weights, _ai.Conf.BumpDodgeWeight)
weights = append(weights, _ai.Conf.GoldEmptyWeight)
indexhandle = comm.GetRandW(weights)
if indexhandle == 0 { //装上
_ai.ContNum = 0
go this.module.avoid(_ai.Bid, _ai.Uid, 0, 0, nil)
} else if indexhandle == 1 { //吃金币
_ai.ContNum++
go this.module.eat(_ai.Bid, _ai.Uid)
}
}
handle.cd = _ai.Conf.BumpCD
}

View File

@ -87,4 +87,5 @@ type AI struct {
Conf *cfg.GameBukashiAiData //配置
Handles []*AIHandle //操作列表
CD int32 //CD
ContNum int32 //连击数
}