修复散弹方块 随机带走元素位置不正确bug

This commit is contained in:
meixiongfeng 2023-11-07 18:25:06 +08:00
parent 25a15adc08
commit 3b549fe732

View File

@ -117,7 +117,7 @@ func (this *MapData) InitMap(module *Entertainment, iType int32) {
this.SetIndelibilityPlat() this.SetIndelibilityPlat()
this.Plat = this.GetPalatData() this.Plat = this.GetPalatData()
//this.SetMap() // 方便测试固定地图 // this.SetMap() // 方便测试固定地图
} }
// 交换之前先判断是不是特殊元素的交换 // 交换之前先判断是不是特殊元素的交换
@ -741,12 +741,12 @@ func (this *MapData) SkillUp(pos int32, color int32, skillid int32, value int32,
func (this *MapData) SetMap() { func (this *MapData) SetMap() {
sz2 := []int32{ sz2 := []int32{
3, 3, 2, 2, 1, 3, 1, 3, 3, 2, 2, 1, 3, 1,
5, 1, 2, 3, 1, 2, 2, 5, 1, 3, 3, 1, 2, 2,
3, 4, 3, 5, 6, 1, 6, 3, 2, 1, 4, 3, 1, 6,
1, 4, 1, 4, 2, 3, 6, 1, 4, 3, 4, 2, 3, 6,
1, 5, 6, 5, 6, 1, 4, 1, 5, 6, 5, 6, 1, 4,
6, 6, 3, 6, 4, 3, 3, 6, 6, 3, 6, 3, 1, 3,
3, 3, 1, 3, 1, 2, 5, 3, 3, 1, 3, 3, 2, 5,
// 1, 4, 2, 5, 4, 5, 2, // 1, 4, 2, 5, 4, 5, 2,
// 3, 2, 3, 5, 2, 1, 4, // 3, 2, 3, 5, 2, 1, 4,
// 2, 5, 5, 4, 5, 4, 1, // 2, 5, 5, 4, 5, 4, 1,
@ -1179,8 +1179,8 @@ func (this *MapData) SpecialElem(id int, s int32) (x map[int]struct{}) {
// 获取配置 // 获取配置
if c, _ := this.module.configure.GetGameBlock(this.Plat[id].Color, FiveType); c != nil { if c, _ := this.module.configure.GetGameBlock(this.Plat[id].Color, FiveType); c != nil {
ids := utils.RandomNumbers(0, Total-1, int(c.Value)) ids := utils.RandomNumbers(0, Total-1, int(c.Value))
for key := range ids { for _, v := range ids {
x[key] = struct{}{} x[v] = struct{}{}
} }
} }
} else if s == BoomType { // 炸弹类型 带走周围一圈+ 上下左右 } else if s == BoomType { // 炸弹类型 带走周围一圈+ 上下左右