move print message before wait function
This commit is contained in:
parent
995ee95862
commit
d1ea8285cd
@ -400,21 +400,18 @@ function doUpkeep(_, clickedByColor, isRightClick)
|
|||||||
local pos = returnGlobalDiscardPosition()
|
local pos = returnGlobalDiscardPosition()
|
||||||
deckLib.placeOrMergeIntoDeck(cardsToDiscard, pos, self.getRotation())
|
deckLib.placeOrMergeIntoDeck(cardsToDiscard, pos, self.getRotation())
|
||||||
|
|
||||||
|
-- draw up to 5 cards
|
||||||
|
local cardsToDraw = 5 - #handCards + #cardsToDiscard
|
||||||
|
if cardsToDraw > 0 then
|
||||||
|
printToColor("Drawing " .. cardsToDraw .. " cards (Patrice)", messageColor)
|
||||||
|
|
||||||
-- add some time if there are any cards to discard
|
-- add some time if there are any cards to discard
|
||||||
local k = 0
|
local k = 0
|
||||||
if #cardsToDiscard > 0 then
|
if #cardsToDiscard > 0 then
|
||||||
k = 1 + (#cardsToDiscard * 0.1)
|
k = 1 + (#cardsToDiscard * 0.1)
|
||||||
end
|
end
|
||||||
|
Wait.time(function() drawCardsWithReshuffle(cardsToDraw) end, k)
|
||||||
-- draw up to 5 cards
|
|
||||||
Wait.time(
|
|
||||||
function()
|
|
||||||
local cardsToDraw = 5 - #handCards + #cardsToDiscard
|
|
||||||
if cardsToDraw > 0 then
|
|
||||||
printToColor("Drawing " .. cardsToDraw .. " cards (Patrice)", messageColor)
|
|
||||||
drawCardsWithReshuffle(cardsToDraw)
|
|
||||||
end
|
end
|
||||||
end, k)
|
|
||||||
end
|
end
|
||||||
elseif forcedLearning then
|
elseif forcedLearning then
|
||||||
printToColor("Drawing 2 cards, discard 1 (Forced Learning)", messageColor)
|
printToColor("Drawing 2 cards, discard 1 (Forced Learning)", messageColor)
|
||||||
|
Loading…
Reference in New Issue
Block a user