sonic-radiance/sonic-radiance.love/game/abstractmobs/ennemy.lua
2020-08-04 17:50:03 +02:00

28 lines
646 B
Lua

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