Skip to content

Commit

Permalink
调整spin模式充能格规则和视觉表现
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Nov 29, 2024
1 parent 12c808f commit cc22ca9
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions assets/game/mechanicLib/brik/chargeLimit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,26 @@ end
do -- spin
function chargeLimit.spin_event_playerInit(P)
P.modeData.spinClear=0
P:addEvent('beforeClear',{-1,chargeLimit.spin_event_beforeClear})
P:addEvent('afterDrop',chargeLimit.spin_event_afterDrop)
P:addEvent('afterClear',{-1e99,chargeLimit.spin_event_afterClear})
P:addEvent('drawBelowMarks',chargeLimit.spin_event_drawBelowMarks)
end
function chargeLimit.spin_event_beforeClear(P)
function chargeLimit.spin_event_afterDrop(P)
local F=P.field
if P.lastMovement.immobile then
local CB=P.hand.matrix
for y=1,#CB do for x=1,#CB[1] do
local C=CB[y][x]
if C then
C.spin_charge=true
local cx,cy=x+P.handX-1,y+P.handY-1
if
F:getCell(cx-1,cy) or
F:getCell(cx+1,cy) or
F:getCell(cx,cy-1) or
F:getCell(cx,cy+1)
then
C.spin_charge=true
end
end
end end
end
Expand All @@ -147,7 +156,7 @@ do -- spin
end
end
function chargeLimit.spin_event_drawBelowMarks(P)
gc_setColor(1,1,1,.42)
gc_setColor(1,1,1,.62)
local mat=P.field._matrix
for y=1,#mat do for x=1,#mat[1] do
local C=mat[y][x]
Expand Down

0 comments on commit cc22ca9

Please sign in to comment.