三消随机消除 过滤特殊元素
This commit is contained in:
parent
9152db60e5
commit
d03db6d9f8
@ -526,7 +526,15 @@ func (this *MapData) SkillUp(pos int32, color int32, skillid int32, value int32,
|
||||
|
||||
switch skillid {
|
||||
case 1:
|
||||
ids = utils.RandomNumbers(0, Total-1, int(value))
|
||||
randNum := utils.RandomNumbers(0, Total-1, int(value)*2)
|
||||
for _, v := range randNum {
|
||||
if this.Plat[v].Special > 0 {
|
||||
ids = append(ids, v)
|
||||
if len(ids) >= int(value) {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
for i := 0; i < Height; i++ {
|
||||
ids = append(ids, 3*Width+i)
|
||||
|
Loading…
Reference in New Issue
Block a user