mirror of
https://github.com/SashLilac/cambridge-modpack.git
synced 2024-11-25 05:49:03 -06:00
The True Hero rebalancing
This commit is contained in:
parent
a348280132
commit
699c2d4fe0
@ -127,7 +127,7 @@ 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
|
||||||
for i = 1, 3 do
|
for i = 1, 2 do
|
||||||
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
|
||||||
@ -153,14 +153,16 @@ function TheTrueHero:advanceOneFrame(inputs, ruleset)
|
|||||||
) *
|
) *
|
||||||
self.section_times[Mod1(self.attack_number, #self.section_times)] / 342)
|
self.section_times[Mod1(self.attack_number, #self.section_times)] / 342)
|
||||||
elseif self.current_attack == 3 then
|
elseif self.current_attack == 3 then
|
||||||
self.var = math.max(10 - love.math.random(
|
self.var = math.floor(
|
||||||
math.floor(self.attack_number / 8),
|
120 * 0.5 ^ ((self.attack_number - 1) / #self.section_times)
|
||||||
math.floor(self.attack_number / 4)
|
)
|
||||||
), 3)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self.frames = self.frames + 1
|
self.frames = self.frames + 1
|
||||||
self.section_frames = self.section_frames + 1
|
self.section_frames = self.section_frames + 1
|
||||||
|
if self.current_attack == 3 then
|
||||||
|
self.var = math.max(self.var - 1, 0)
|
||||||
|
end
|
||||||
if self.current_attack == 5 then
|
if self.current_attack == 5 then
|
||||||
self.lock_on_soft_drop = false
|
self.lock_on_soft_drop = false
|
||||||
self.lock_on_hard_drop = false
|
self.lock_on_hard_drop = false
|
||||||
@ -197,12 +199,14 @@ 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 cleared_row_count == 0 then
|
||||||
if self.var ~= math.floor(self.current_attack / 2) then
|
self:advanceBottomRow()
|
||||||
|
end
|
||||||
|
if self.current_attack == 1 then
|
||||||
|
if self.var ~= 0 then
|
||||||
playSE("undyne", "ding")
|
playSE("undyne", "ding")
|
||||||
end
|
end
|
||||||
self.var = math.max(self.var - 1, 0)
|
self.var = math.max(self.var - 1, 0)
|
||||||
self:advanceBottomRow(1)
|
|
||||||
elseif self.current_attack == 2 then
|
elseif self.current_attack == 2 then
|
||||||
if cleared_row_count ~= 0 and self.var ~= 0 then
|
if cleared_row_count ~= 0 and self.var ~= 0 then
|
||||||
playSE("undyne", "ding")
|
playSE("undyne", "ding")
|
||||||
@ -211,13 +215,12 @@ function TheTrueHero:onPieceLock(piece, cleared_row_count)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TheTrueHero:advanceBottomRow(dx)
|
function TheTrueHero:advanceBottomRow()
|
||||||
if self.var <= 0 and self.current_attack == 3 then
|
if self.var <= 0 and self.current_attack == 3 then
|
||||||
self.grid:copyBottomRow()
|
self.grid:copyBottomRow()
|
||||||
self.var = math.max(10 - love.math.random(
|
self.var = math.floor(
|
||||||
math.floor(self.attack_number / 8),
|
120 * 0.5 ^ ((self.attack_number - 1) / #self.section_times)
|
||||||
math.floor(self.attack_number / 4)
|
)
|
||||||
), 3)
|
|
||||||
playSE("undyne", "pike")
|
playSE("undyne", "pike")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user