Compare commits

..

2 Commits

Author SHA1 Message Date
Ishaan Bhardwaj
21beb5e3c0 Fixed a bug with Mizu RS 2021-06-16 13:48:56 -04:00
Ishaan Bhardwaj
c896bdfdd1 Hero mode fix 2021-06-04 19:11:09 -04:00
2 changed files with 7 additions and 4 deletions

View File

@ -127,17 +127,19 @@ function TheTrueHero:advanceOneFrame(inputs, ruleset)
self.section_frames = 0
self.attack_number = self.attack_number + 1
local prev_attack = self.current_attack
self.current_attack = -1
local attack_rolls = 0
repeat
while ((
prev_attack == self.current_attack or
self.current_attack == 5
) and (attack_rolls < 2)) or attack_rolls == 0 do
attack_rolls = attack_rolls + 1
if self.attack_number > 20 then
self.current_attack = math.random(#self.attacks)
else
self.current_attack = math.random(4)
end
until prev_attack ~= self.current_attack and (
self.current_attack ~= 5 or attack_rolls == 2
)
end
if self.current_attack == 1 then
self.var = math.floor(3 + math.random(
math.floor(self.attack_number / 4),

View File

@ -140,6 +140,7 @@ function MizuRS:onPieceMove(piece, grid)
end
function MizuRS:onPieceRotate(piece, grid)
self:checkNewLow(piece)
if piece:isDropBlocked(grid) then
piece.lock_delay = math.max((piece.lock_delay - piece.ldincrease), 0)
piece.ldincrease = piece.ldincrease - 1