sonic-radiance/sonic-radiance.love/game/abstractmobs/ennemy.lua

27 lines
666 B
Lua
Raw Normal View History

2020-07-19 13:13:54 +02:00
AbstractMobParent = require "game.abstractmobs.parent"
AbstractEnnemy = AbstractMobParent:extend()
function AbstractEnnemy:new(name)
self.simplename = name
self.super.new(self)
end
function AbstractEnnemy:initBasicElements()
self.data = require("datas.gamedata.ennemies." .. self.simplename)
self.name = self.data.name
self.fullname = self.data.fullname
self.turns = self.data.turns
end
function AbstractEnnemy:createStats()
return require("datas.gamedata.ennemies." .. self.simplename .. ".stats")
end
function AbstractEnnemy:createSkills()
return require("datas.gamedata.ennemies." .. self.simplename .. ".skills")
end
return AbstractEnnemy