mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 03:32:34 +08:00
parent
e6ce767e0f
commit
2be00fb3b0
|
@ -437,14 +437,14 @@ function Room:getNCards(num, from)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local i, j = 1, num
|
||||||
|
if from == "bottom" then
|
||||||
|
i = #self.draw_pile + 1 - num
|
||||||
|
j = #self.draw_pile
|
||||||
|
end
|
||||||
local cardIds = {}
|
local cardIds = {}
|
||||||
while num > 0 do
|
for index = i, j, 1 do
|
||||||
|
table.insert(cardIds, table.remove(self.draw_pile, i))
|
||||||
local index = from == "top" and 1 or #self.draw_pile
|
|
||||||
table.insert(cardIds, self.draw_pile[index])
|
|
||||||
table.remove(self.draw_pile, index)
|
|
||||||
|
|
||||||
num = num - 1
|
|
||||||
end
|
end
|
||||||
|
|
||||||
self:doBroadcastNotify("UpdateDrawPile", #self.draw_pile)
|
self:doBroadcastNotify("UpdateDrawPile", #self.draw_pile)
|
||||||
|
@ -1991,7 +1991,7 @@ function Room:askForGuanxing(player, cards, top_limit, bottom_limit, customNotif
|
||||||
for i = #top, 1, -1 do
|
for i = #top, 1, -1 do
|
||||||
table.insert(self.draw_pile, 1, top[i])
|
table.insert(self.draw_pile, 1, top[i])
|
||||||
end
|
end
|
||||||
for i = #bottom, 1, -1 do
|
for i = 1, #bottom, -1 do
|
||||||
table.insert(self.draw_pile, bottom[i])
|
table.insert(self.draw_pile, bottom[i])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user