2019-08-14 16:26:23 +02:00
|
|
|
local Battler = require("scenes.battlesystem.actors.battler")
|
|
|
|
local Ennemy = Battler:extend()
|
2019-03-10 13:11:26 +01:00
|
|
|
|
2019-08-14 22:47:10 +02:00
|
|
|
local gui = require "game.modules.gui"
|
|
|
|
|
2020-07-19 17:06:17 +02:00
|
|
|
function Ennemy:new(world, x, y, owner)
|
2019-08-14 16:26:23 +02:00
|
|
|
Ennemy.super.new(self, world, x, y, 0)
|
2019-03-10 13:11:26 +01:00
|
|
|
self.isEnnemy = true
|
2020-07-19 17:06:17 +02:00
|
|
|
self.owner = owner
|
2019-03-10 13:11:26 +01:00
|
|
|
|
|
|
|
self.actionPerTurn = 2
|
|
|
|
end
|
|
|
|
|
|
|
|
function Ennemy:draw()
|
2020-07-19 17:06:17 +02:00
|
|
|
local x, y = self.world.map:gridToPixel(self.x, self.y, true)
|
2019-03-10 13:11:26 +01:00
|
|
|
love.graphics.setColor(1, 0, 0, 1)
|
|
|
|
love.graphics.rectangle("fill", x - 8, y - 32, 16, 32)
|
|
|
|
love.graphics.setColor(1, 1, 1, 1)
|
2019-08-14 22:47:10 +02:00
|
|
|
|
2020-07-19 17:06:17 +02:00
|
|
|
self.owner:drawHUD(x - 14, y - 38)
|
2020-07-24 19:49:24 +02:00
|
|
|
|
2020-07-19 21:41:14 +02:00
|
|
|
if (self.isSelected) then
|
|
|
|
local height = 32
|
|
|
|
self.assets.images["cursorpeak"]:draw(x - 7, y - 24 - 32)
|
|
|
|
end
|
2019-03-10 13:11:26 +01:00
|
|
|
end
|
|
|
|
|
2019-08-15 09:35:37 +02:00
|
|
|
function Ennemy:getStats()
|
|
|
|
return self.data.stats
|
2019-03-10 13:11:26 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
return Ennemy
|