Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
84f3ed024c
@ -32468,7 +32468,7 @@
|
|||||||
},
|
},
|
||||||
"value": 1,
|
"value": 1,
|
||||||
"filter": [
|
"filter": [
|
||||||
1101012
|
1101014
|
||||||
],
|
],
|
||||||
"filter2": []
|
"filter2": []
|
||||||
},
|
},
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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 //连击数
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user