Compare commits

...

7 Commits

Author SHA1 Message Date
Ishaan Bhardwaj e91b91aff2
Merge pull request #11 from Kirby703/patch-4
adds MM-12 grade
2023-07-01 22:20:06 -04:00
Ishaan Bhardwaj d5e775fa68
Merge pull request #10 from Kirby703/patch-3
added points for surviving the roll
2023-07-01 22:19:49 -04:00
Ishaan Bhardwaj 58abd40238
Merge pull request #9 from Kirby703/patch-2
added cools+regret colors to splits
2023-07-01 22:19:21 -04:00
Kirby703 7d2c217f71
hotfix 2022-03-09 20:10:30 -05:00
Kirby703 c69ae42c0f
adds MM-12 grade
truer to specs, this is what happens with 15 grades in the gm roll but no clear
2022-03-09 15:11:58 -05:00
Kirby703 2ddb800882
added points for surviving the roll
how'd we forget such an important feature of this mode
2022-02-15 21:22:11 -05:00
Kirby703 0a1c6ad871
added cools+regret colors to splits 2022-02-10 01:34:32 -05:00
1 changed files with 31 additions and 10 deletions

View File

@ -35,6 +35,8 @@ function PhantomManiaNXGame:new()
self.coolregret_message = "COOL!!"
self.coolregret_timer = 0
self.section_cools = { [0] = 0 }
self.section_regrets = { [0] = 0 }
end
function PhantomManiaNXGame:getARE()
@ -118,6 +120,11 @@ function PhantomManiaNXGame:advanceOneFrame()
end
return false
elseif self.roll_frames > 3238 then
if self:qualifiesForGMRoll() then
self.roll_points = self.roll_points + 160
else
self.roll_points = self.roll_points + 50
end
switchBGM(nil)
self.completed = true
end
@ -209,11 +216,15 @@ function PhantomManiaNXGame:updateSectionTimes(old_level, new_level)
table.insert(self.section_times, section_time)
self.section_start_time = self.frames
if section_time >= frameTime(1,00) then
self.last_section_cool = false
--self.last_section_cool = false
self.coolregret_message = "REGRET!!"
self.coolregret_timer = 300
self.grade = self.grade - 1
elseif self.last_section_cool then
table.insert(self.section_regrets, 1)
else
table.insert(self.section_regrets, 0)
end
if self.last_section_cool then
self.cools = self.cools + 1
end
self.grade = self.grade + 1
@ -227,8 +238,10 @@ function PhantomManiaNXGame:updateSectionTimes(old_level, new_level)
self.last_section_cool = true
self.coolregret_message = "COOL!!"
self.coolregret_timer = 300
table.insert(self.section_cools, 1)
else
self.last_section_cool = false
table.insert(self.section_cools, 0)
end
end
end
@ -291,11 +304,7 @@ end
function PhantomManiaNXGame:getAggregateGrade()
local grade_cap
if self:qualifiesForGMRoll() then
if self.roll_frames > 3238 then
grade_cap = 42
else
grade_cap = 41
end
grade_cap = 42
else
grade_cap = 26
end
@ -308,7 +317,7 @@ end
local master_grades = {"M", "MK", "MV", "MO"}
local function getLetterGrade(grade)
local function getLetterGrade(grade, roll_frames)
if grade == 0 then
return "1"
elseif grade <= 13 then
@ -317,13 +326,25 @@ local function getLetterGrade(grade)
return "M" .. tostring(grade - 13)
elseif grade <= 30 then
return master_grades[grade - 26]
elseif grade <= 41 then
elseif grade <= 41 or roll_frames <= 3238 then
return "MM-" .. tostring(grade - 30)
else
return "GM"
end
end
function PhantomManiaNXGame:sectionColourFunction(section)
if self.section_cools[section] == 1 and self.section_regrets[section] == 1 then
return { 1, 1, 0, 1 }
elseif self.section_cools[section] == 1 then
return { 0, 1, 0, 1 }
elseif self.section_regrets[section] == 1 then
return { 1, 0, 0, 1 }
else
return { 1, 1, 1, 1 }
end
end
function PhantomManiaNXGame:drawScoringInfo()
PhantomManiaNXGame.super.drawScoringInfo(self)
@ -351,7 +372,7 @@ function PhantomManiaNXGame:drawScoringInfo()
love.graphics.setFont(font_3x5_3)
if self.roll_frames > 3238 then love.graphics.setColor(1, 0.5, 0, 1)
elseif self.level >= 1300 then love.graphics.setColor(0, 1, 0, 1) end
love.graphics.printf(getLetterGrade(self:getAggregateGrade()), text_x, 140, 90, "left")
love.graphics.printf(getLetterGrade(self:getAggregateGrade(), self.roll_frames), text_x, 140, 90, "left")
love.graphics.setColor(1, 1, 1, 1)
love.graphics.printf(self.score, text_x, 220, 90, "left")
love.graphics.printf(self.level, text_x, 340, 50, "right")