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, "value": 1,
"filter": [ "filter": [
1101012 1101014
], ],
"filter2": [] "filter2": []
}, },

View File

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

View File

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