chore: remove deprecated recomputation functions
This commit is contained in:
parent
2265d7dac9
commit
32bb1b5425
4 changed files with 0 additions and 34 deletions
|
@ -24,13 +24,6 @@ function AbstractCharacter:initBasicElements()
|
||||||
self:initLevel()
|
self:initLevel()
|
||||||
end
|
end
|
||||||
|
|
||||||
function AbstractCharacter:createStats()
|
|
||||||
local statNames = self:getStatList()
|
|
||||||
local stats = {}
|
|
||||||
|
|
||||||
return stats
|
|
||||||
end
|
|
||||||
|
|
||||||
function AbstractCharacter:updateHPPP()
|
function AbstractCharacter:updateHPPP()
|
||||||
if (self.hp ~= nil) then
|
if (self.hp ~= nil) then
|
||||||
self.hp = math.min(self.hp, self.stats:get(self.stats.HPMAX))
|
self.hp = math.min(self.hp, self.stats:get(self.stats.HPMAX))
|
||||||
|
|
|
@ -35,10 +35,6 @@ function AbstractEnnemy:initBasicElements()
|
||||||
self.turns = self.data.turns
|
self.turns = self.data.turns
|
||||||
end
|
end
|
||||||
|
|
||||||
function AbstractEnnemy:createStats()
|
|
||||||
return self.data.stats
|
|
||||||
end
|
|
||||||
|
|
||||||
function AbstractEnnemy:createSkills()
|
function AbstractEnnemy:createSkills()
|
||||||
return self.data.skills
|
return self.data.skills
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,7 +8,6 @@ function AbstractMobParent:new(serializeFields, listSerializable, statManager)
|
||||||
self:initBasicElements()
|
self:initBasicElements()
|
||||||
|
|
||||||
self.stats = statManager(self)
|
self.stats = statManager(self)
|
||||||
self.stats:setStats(self:createStats())
|
|
||||||
self.skills = self:createSkills()
|
self.skills = self:createSkills()
|
||||||
self.statuts = {}
|
self.statuts = {}
|
||||||
self:initLife()
|
self:initLife()
|
||||||
|
@ -29,21 +28,6 @@ function AbstractMobParent:getProtecTypes()
|
||||||
return {}
|
return {}
|
||||||
end
|
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()
|
function AbstractMobParent:createSkills()
|
||||||
return {}
|
return {}
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,13 +15,6 @@ function StatManager:new(owner)
|
||||||
self.owner = owner
|
self.owner = owner
|
||||||
end
|
end
|
||||||
|
|
||||||
function StatManager:setStats(stats)
|
|
||||||
self.list = {}
|
|
||||||
for key, value in pairs(stats) do
|
|
||||||
self.list[key] = value
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function StatManager:get(statname)
|
function StatManager:get(statname)
|
||||||
return self:computeStat(statname)
|
return self:computeStat(statname)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue