三消一次消除4个以上+1体力

This commit is contained in:
meixiongfeng 2024-01-30 15:04:08 +08:00
parent b5e2f1313f
commit 1042cdfb15
2 changed files with 5 additions and 2 deletions

View File

@ -464,7 +464,7 @@ func (this *MapData) Check3X() (bEliminate bool, xiaochu []int) {
// 校验地图可消除的 判断各组上面2个和右边两个是否三个相等
// xc 判断用来是否加体力
func (this *MapData) CheckMap(color int32, bSkill bool) (szMap []*pb.MapData, xc bool) {
func (this *MapData) CheckMap(color int32, bSkill bool) (szMap []*pb.MapData, bAddPs bool) {
var (
tXiaochu map[int]struct{}
curScore int32
@ -487,6 +487,9 @@ func (this *MapData) CheckMap(color int32, bSkill bool) (szMap []*pb.MapData, xc
new[k] = v
}
for _, v := range xc {
if len(v) >= 4 {
bAddPs = true
}
for _, v1 := range v {
tXiaochu[v1] = struct{}{}
}

View File

@ -38,7 +38,7 @@ func (this *apiComp) Refresh(session comm.IUserSession, req *pb.PlunderRefreshRe
}
}
}
if list.Freecount > freeCount {
if list.Freecount >= freeCount {
if errdata = this.module.ConsumeRes(session, []*cfg.Gameatn{this.module.ModuleTools.GetGlobalConf().PlunderPvpRemake}, true); errdata != nil {
return
}