mirror of
https://github.com/SashLilac/cambridge-modpack.git
synced 2024-11-24 03:19:02 -06:00
Compare commits
7 Commits
152c37eac5
...
e91b91aff2
Author | SHA1 | Date | |
---|---|---|---|
|
e91b91aff2 | ||
|
d5e775fa68 | ||
|
58abd40238 | ||
|
7d2c217f71 | ||
|
c69ae42c0f | ||
|
2ddb800882 | ||
|
0a1c6ad871 |
@ -35,6 +35,8 @@ function PhantomManiaNXGame:new()
|
|||||||
|
|
||||||
self.coolregret_message = "COOL!!"
|
self.coolregret_message = "COOL!!"
|
||||||
self.coolregret_timer = 0
|
self.coolregret_timer = 0
|
||||||
|
self.section_cools = { [0] = 0 }
|
||||||
|
self.section_regrets = { [0] = 0 }
|
||||||
end
|
end
|
||||||
|
|
||||||
function PhantomManiaNXGame:getARE()
|
function PhantomManiaNXGame:getARE()
|
||||||
@ -118,6 +120,11 @@ function PhantomManiaNXGame:advanceOneFrame()
|
|||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
elseif self.roll_frames > 3238 then
|
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)
|
switchBGM(nil)
|
||||||
self.completed = true
|
self.completed = true
|
||||||
end
|
end
|
||||||
@ -209,11 +216,15 @@ function PhantomManiaNXGame:updateSectionTimes(old_level, new_level)
|
|||||||
table.insert(self.section_times, section_time)
|
table.insert(self.section_times, section_time)
|
||||||
self.section_start_time = self.frames
|
self.section_start_time = self.frames
|
||||||
if section_time >= frameTime(1,00) then
|
if section_time >= frameTime(1,00) then
|
||||||
self.last_section_cool = false
|
--self.last_section_cool = false
|
||||||
self.coolregret_message = "REGRET!!"
|
self.coolregret_message = "REGRET!!"
|
||||||
self.coolregret_timer = 300
|
self.coolregret_timer = 300
|
||||||
self.grade = self.grade - 1
|
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
|
self.cools = self.cools + 1
|
||||||
end
|
end
|
||||||
self.grade = self.grade + 1
|
self.grade = self.grade + 1
|
||||||
@ -227,8 +238,10 @@ function PhantomManiaNXGame:updateSectionTimes(old_level, new_level)
|
|||||||
self.last_section_cool = true
|
self.last_section_cool = true
|
||||||
self.coolregret_message = "COOL!!"
|
self.coolregret_message = "COOL!!"
|
||||||
self.coolregret_timer = 300
|
self.coolregret_timer = 300
|
||||||
|
table.insert(self.section_cools, 1)
|
||||||
else
|
else
|
||||||
self.last_section_cool = false
|
self.last_section_cool = false
|
||||||
|
table.insert(self.section_cools, 0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -291,11 +304,7 @@ end
|
|||||||
function PhantomManiaNXGame:getAggregateGrade()
|
function PhantomManiaNXGame:getAggregateGrade()
|
||||||
local grade_cap
|
local grade_cap
|
||||||
if self:qualifiesForGMRoll() then
|
if self:qualifiesForGMRoll() then
|
||||||
if self.roll_frames > 3238 then
|
|
||||||
grade_cap = 42
|
grade_cap = 42
|
||||||
else
|
|
||||||
grade_cap = 41
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
grade_cap = 26
|
grade_cap = 26
|
||||||
end
|
end
|
||||||
@ -308,7 +317,7 @@ end
|
|||||||
|
|
||||||
local master_grades = {"M", "MK", "MV", "MO"}
|
local master_grades = {"M", "MK", "MV", "MO"}
|
||||||
|
|
||||||
local function getLetterGrade(grade)
|
local function getLetterGrade(grade, roll_frames)
|
||||||
if grade == 0 then
|
if grade == 0 then
|
||||||
return "1"
|
return "1"
|
||||||
elseif grade <= 13 then
|
elseif grade <= 13 then
|
||||||
@ -317,13 +326,25 @@ local function getLetterGrade(grade)
|
|||||||
return "M" .. tostring(grade - 13)
|
return "M" .. tostring(grade - 13)
|
||||||
elseif grade <= 30 then
|
elseif grade <= 30 then
|
||||||
return master_grades[grade - 26]
|
return master_grades[grade - 26]
|
||||||
elseif grade <= 41 then
|
elseif grade <= 41 or roll_frames <= 3238 then
|
||||||
return "MM-" .. tostring(grade - 30)
|
return "MM-" .. tostring(grade - 30)
|
||||||
else
|
else
|
||||||
return "GM"
|
return "GM"
|
||||||
end
|
end
|
||||||
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()
|
function PhantomManiaNXGame:drawScoringInfo()
|
||||||
PhantomManiaNXGame.super.drawScoringInfo(self)
|
PhantomManiaNXGame.super.drawScoringInfo(self)
|
||||||
|
|
||||||
@ -351,7 +372,7 @@ function PhantomManiaNXGame:drawScoringInfo()
|
|||||||
love.graphics.setFont(font_3x5_3)
|
love.graphics.setFont(font_3x5_3)
|
||||||
if self.roll_frames > 3238 then love.graphics.setColor(1, 0.5, 0, 1)
|
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
|
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.setColor(1, 1, 1, 1)
|
||||||
love.graphics.printf(self.score, text_x, 220, 90, "left")
|
love.graphics.printf(self.score, text_x, 220, 90, "left")
|
||||||
love.graphics.printf(self.level, text_x, 340, 50, "right")
|
love.graphics.printf(self.level, text_x, 340, 50, "right")
|
||||||
|
Loading…
Reference in New Issue
Block a user