2021-05-08 12:54:07 +02:00
|
|
|
local Serializable = require "birb.classes.serializable"
|
|
|
|
local Difficulty = Serializable:extend()
|
2021-04-18 19:09:01 +02:00
|
|
|
|
|
|
|
function Difficulty:new()
|
|
|
|
self.toggles = {}
|
|
|
|
self.toggles.hazardMakesKo = false
|
|
|
|
self.toggles.playerKoChar = true
|
|
|
|
self.toggles.easierBattles = false
|
|
|
|
self.toggles.checkPointRegen = false
|
|
|
|
self.toggles.levelUpHeal = false
|
|
|
|
self.toggles.allDamage = true
|
2021-05-08 12:54:07 +02:00
|
|
|
Difficulty.super.new(self, {"toggles"})
|
2021-04-18 19:09:01 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function Difficulty:toggle(toggleName)
|
|
|
|
self.toggles[toggleName] = (self.toggles[toggleName] == false)
|
|
|
|
end
|
|
|
|
|
|
|
|
function Difficulty:get(toggleName)
|
|
|
|
return self.toggles[toggleName]
|
|
|
|
end
|
|
|
|
|
|
|
|
return Difficulty
|