diff --git a/modules/entertainment/room.go b/modules/entertainment/room.go index f0f42e734..5acb0cccf 100644 --- a/modules/entertainment/room.go +++ b/modules/entertainment/room.go @@ -772,7 +772,25 @@ func (this *Room) AutoOperator(uid string) { this.module.Errorf("cant found user:%s", uid) return } + conf, err := this.module.configure.GetGameConsumeHero(p.Cardid) + if err != nil { + return + } + // 交换元素 + if this.player1.Energy >= conf.Skillload { + var color int32 + if this.curPower == this.player1.Userinfo.Uid { + color = 1 + } else { + color = 2 + } + this.UserSkillUp(color, 0) + if this.RoomType == 2 && this.curPower == p.Userinfo.Uid { + this.AutoOperator(this.curPower) + } + return + } szMap, oid1, oid2, bAddPs = this.chessboard.AiSwapGirde() p.Ps-- if bAddPs {