706468dad6
Fixes #87
29 lines
No EOL
649 B
Lua
29 lines
No EOL
649 B
Lua
local Difficulty = Object:extend()
|
|
|
|
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
|
|
end
|
|
|
|
function Difficulty:toggle(toggleName)
|
|
self.toggles[toggleName] = (self.toggles[toggleName] == false)
|
|
end
|
|
|
|
function Difficulty:get(toggleName)
|
|
return self.toggles[toggleName]
|
|
end
|
|
|
|
function Difficulty:getData()
|
|
return self.toggles
|
|
end
|
|
|
|
function Difficulty:setData(toggles)
|
|
self.toggles = toggles
|
|
end
|
|
|
|
return Difficulty |