Skip to content

Commit

Permalink
fixed stage list "random" selection memorization
Browse files Browse the repository at this point in the history
  • Loading branch information
K4thos committed Nov 2, 2021
1 parent ca11c06 commit 27ede41
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions external/script/start.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ start.challenger = 0
local restoreCursor = false
local selScreenEnd = false
local stageEnd = false
local stageRandom = false
local stageListNo = 0
local t_aiRamp = {}
local t_gameStats = {}
Expand Down Expand Up @@ -517,6 +518,7 @@ function start.f_setStage(num, assigned)
if stageListNo == 0 then
num = main.t_selectableStages[math.random(1, #main.t_selectableStages)]
stageListNo = num -- comment out to randomize stage after each fight in survival mode, when random stage is chosen
stageRandom = true
else
num = main.t_selectableStages[stageListNo]
end
Expand Down Expand Up @@ -1539,6 +1541,10 @@ function start.f_selectReset(hardReset)
start.c[i].randRef = nil
end
end
if stageRandom then
stageListNo = 0
end
stageRandom = false
for side = 1, 2 do
if hardReset then
start.p[side].numSimul = math.max(2, config.NumSimul[1])
Expand Down

0 comments on commit 27ede41

Please sign in to comment.