chore: remove deprecated recomputation functions

This commit is contained in:
Kazhnuz 2021-07-03 10:44:17 +02:00
parent 2265d7dac9
commit 32bb1b5425
4 changed files with 0 additions and 34 deletions

View file

@ -24,13 +24,6 @@ function AbstractCharacter:initBasicElements()
self:initLevel()
end
function AbstractCharacter:createStats()
local statNames = self:getStatList()
local stats = {}
return stats
end
function AbstractCharacter:updateHPPP()
if (self.hp ~= nil) then
self.hp = math.min(self.hp, self.stats:get(self.stats.HPMAX))

View file

@ -35,10 +35,6 @@ function AbstractEnnemy:initBasicElements()
self.turns = self.data.turns
end
function AbstractEnnemy:createStats()
return self.data.stats
end
function AbstractEnnemy:createSkills()
return self.data.skills
end

View file

@ -8,7 +8,6 @@ function AbstractMobParent:new(serializeFields, listSerializable, statManager)
self:initBasicElements()
self.stats = statManager(self)
self.stats:setStats(self:createStats())
self.skills = self:createSkills()
self.statuts = {}
self:initLife()
@ -29,21 +28,6 @@ function AbstractMobParent:getProtecTypes()
return {}
end
function AbstractMobParent:createStats()
local stats = {}
stats.hpmax = 0
stats.ppmax = 0
stats.attack = 0
stats.power = 0
stats.defense = 0
stats.technic = 0
stats.mind = 0
stats.speed = 0
return stats
end
function AbstractMobParent:createSkills()
return {}
end

View file

@ -15,13 +15,6 @@ function StatManager:new(owner)
self.owner = owner
end
function StatManager:setStats(stats)
self.list = {}
for key, value in pairs(stats) do
self.list[key] = value
end
end
function StatManager:get(statname)
return self:computeStat(statname)
end