mirror of
https://github.com/SashLilac/cambridge-modpack.git
synced 2024-11-21 20:59:03 -06:00
The True Hero remaster
This commit is contained in:
parent
7273c473b6
commit
a348280132
@ -127,18 +127,18 @@ function TheTrueHero:advanceOneFrame(inputs, ruleset)
|
|||||||
self.section_frames = 0
|
self.section_frames = 0
|
||||||
self.attack_number = self.attack_number + 1
|
self.attack_number = self.attack_number + 1
|
||||||
local prev_attack = self.current_attack
|
local prev_attack = self.current_attack
|
||||||
self.current_attack = -1
|
for i = 1, 3 do
|
||||||
local attack_rolls = 0
|
|
||||||
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
|
if self.attack_number > 20 then
|
||||||
self.current_attack = love.math.random(#self.attacks)
|
self.current_attack = love.math.random(#self.attacks)
|
||||||
else
|
else
|
||||||
self.current_attack = love.math.random(4)
|
self.current_attack = love.math.random(4)
|
||||||
end
|
end
|
||||||
|
if (
|
||||||
|
prev_attack ~= self.current_attack and
|
||||||
|
self.current_attack ~= 5
|
||||||
|
) then
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if self.current_attack == 1 then
|
if self.current_attack == 1 then
|
||||||
self.var = math.floor(3 + love.math.random(
|
self.var = math.floor(3 + love.math.random(
|
||||||
@ -198,14 +198,16 @@ end
|
|||||||
function TheTrueHero:onPieceLock(piece, cleared_row_count)
|
function TheTrueHero:onPieceLock(piece, cleared_row_count)
|
||||||
self.super:onPieceLock()
|
self.super:onPieceLock()
|
||||||
if self.current_attack == 1 or self.current_attack == 3 then
|
if self.current_attack == 1 or self.current_attack == 3 then
|
||||||
self.var = math.max(self.var - 1, 0)
|
if self.var ~= math.floor(self.current_attack / 2) then
|
||||||
self:advanceBottomRow(1)
|
|
||||||
playSE("undyne", "ding")
|
|
||||||
elseif self.current_attack == 2 then
|
|
||||||
self.var = math.max(self.var - cleared_row_count, 0)
|
|
||||||
if cleared_row_count ~= 0 then
|
|
||||||
playSE("undyne", "ding")
|
playSE("undyne", "ding")
|
||||||
end
|
end
|
||||||
|
self.var = math.max(self.var - 1, 0)
|
||||||
|
self:advanceBottomRow(1)
|
||||||
|
elseif self.current_attack == 2 then
|
||||||
|
if cleared_row_count ~= 0 and self.var ~= 0 then
|
||||||
|
playSE("undyne", "ding")
|
||||||
|
end
|
||||||
|
self.var = math.max(self.var - cleared_row_count, 0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user