Skip to content

Commit

Permalink
几处xxTimer==0改为<=0
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Nov 2, 2024
1 parent 391d120 commit bd236dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion assets/game/mechanicLib/brik/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ do -- Random Press
function misc.randomPress_event_always(P)
if not P.timing then return end
P.modeData.randomPressTimer=P.modeData.randomPressTimer-1
if P.modeData.randomPressTimer==0 then
if P.modeData.randomPressTimer<=0 then
local r=P:random(P.holdTime==0 and 5 or 4)
if r==1 then
P:moveLeft()
Expand Down
6 changes: 3 additions & 3 deletions assets/game/mechanicLib/brik/survivor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function survivor.scattered_event_always(P)
if md.waveTimer>0 then
md.waveTimer=min(md.waveTimer-1,(P.field:getHeight()+3*P.garbageSum)*260)
end
if md.waveTimer==0 and P.garbageSum<=max(15-P.field:getHeight()/2,8) then
if md.waveTimer<=0 and P.garbageSum<=max(15-P.field:getHeight()/2,8) then
md.wave=md.wave+1

local wave=md.wave
Expand Down Expand Up @@ -67,7 +67,7 @@ function survivor.power_event_always(P)
if md.waveTimer>0 then
md.waveTimer=min(md.waveTimer-1,(P.field:getHeight()+3*P.garbageSum)*260)
end
if md.waveTimer==0 and P.garbageSum<=max(20-P.field:getHeight(),12) then
if md.waveTimer<=0 and P.garbageSum<=max(20-P.field:getHeight(),12) then
md.wave=md.wave+1

local wave=md.wave
Expand Down Expand Up @@ -95,7 +95,7 @@ function survivor.spike_event_always(P)
if md.waveTimer>0 then
md.waveTimer=min(md.waveTimer-1,P.garbageSum*620)
end
if md.waveTimer==0 and P.garbageSum<=10 then
if md.waveTimer<=0 and P.garbageSum<=10 then
md.wave=md.wave+1

local wave=md.wave
Expand Down
2 changes: 1 addition & 1 deletion assets/scene/musicroom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function scene.keyDown(key,isRep)
elseif key=='backspace' or key=='delete' then
searchStr=""
elseif #key==1 and key:find'[0-9a-z]' then
if searchTimer==0 then
if searchTimer<=0 then
if searchStr:sub(6)=='recoll' then
PROGRESS.setSecret('musicroom_recollection')
end
Expand Down

0 comments on commit bd236dd

Please sign in to comment.