sonic-radiance/sonic-radiance.love/game/abstractmobs/ennemy.lua
2020-08-04 13:32:23 +02:00

30 lines
789 B
Lua

AbstractMobParent = require "game.abstractmobs.parent"
AbstractEnnemy = AbstractMobParent:extend()
function AbstractEnnemy:new(directory, name)
self.simplename = name
self.directory = directory
self.super.new(self)
end
function AbstractEnnemy:getDirectory()
return "datas.gamedata.ennemies." .. self.directory .. "."
end
function AbstractEnnemy:initBasicElements()
self.data = require(self:getDirectory() .. self.simplename)
self.name = self.data.name
self.fullname = self.data.fullname
self.turns = self.data.turns
end
function AbstractEnnemy:createStats()
return require(self:getDirectory() .. self.simplename .. ".stats")
end
function AbstractEnnemy:createSkills()
return require(self:getDirectory() .. self.simplename .. ".skills")
end
return AbstractEnnemy