Skip to content

Commit 6502d16

Browse files
committed
fix #68
1 parent 95a4ffa commit 6502d16

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

gameplay/advance.lua

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,15 @@ local function choose_or_random(random_value_choice, advs, need_physics)
173173
-- choose random
174174
vtips.set()
175175
advs:reset()
176-
vdesktop.transfer("float", random_value_choice, "deck")
177-
flow.sleep(5)
178-
return addadv.choose_random_adv(random_value_choice)
176+
local r = addadv.choose_random_adv(random_value_choice)
177+
-- If only one choice, don't remove the card from the float region, remain this card for comfirming
178+
-- https://github.com/cloudwu/deepfuture/issues/66
179+
-- https://github.com/cloudwu/deepfuture/issues/68
180+
if #r > 1 then
181+
vdesktop.transfer("float", random_value_choice, "deck")
182+
flow.sleep(5)
183+
end
184+
return r
179185
elseif advs:focus(click_card) then
180186
vtips.set()
181187
advs:use(click_card)
@@ -312,9 +318,6 @@ local function advance(c, advs)
312318
local clone = choose[1]
313319
local adv_index = clone._random
314320
if adv_index then
315-
-- show this card for comfirming
316-
vdesktop.add("deck", c)
317-
vdesktop.transfer("deck", c, "float")
318321
-- draw value
319322
draw_value(advs, c, adv_index)
320323
advs:reset()

0 commit comments

Comments
 (0)