Skip to content
Snippets Groups Projects
Commit d2f07b9d authored by dg's avatar dg
Browse files

Emotes look and disappear nicer

Rat Lich event stairs have a few rats near them


git-svn-id: http://svn.net-core.org/repos/t-engine4@5950 51575b47-30f0-44d4-a5cc-537603b46e54
parent bd923753
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,11 @@ function _M:generate()
end
function _M:display(x, y)
self:drawFrame(self.frame, x, y)
self.tex[1]:toScreenFull(x-frame_ox1, y-frame_oy1, self.rw, self.rh, self.tex[2], self.tex[3])
local a = 1
if self.dur < 10 then
a = (self.dur) / 10
end
self:drawFrame(self.frame, x, y, 1, 1, 1, a * 0.7)
self.tex[1]:toScreenFull(x-frame_ox1, y-frame_oy1, self.rw, self.rh, self.tex[2], self.tex[3], 1, 1, 1, a)
end
......@@ -1254,7 +1254,7 @@ function _M:setupCommands()
end end
end end,
[{"_g","ctrl"}] = function() if config.settings.cheat then
local f, err = loadfile("/data/general/events/old-battle-field.lua")
local f, err = loadfile("/data/general/events/rat-lich.lua")
print(f, err)
setfenv(f, setmetatable({level=self.level, zone=self.zone}, {__index=_G}))
print(pcall(f))
......
......@@ -159,4 +159,14 @@ g.change_level_check = function(self)
end
game.zone:addEntity(game.level, g, "terrain", x, y)
-- Pop undead rats at the stairs
local npcs = mod.class.NPC:loadList{"/data/general/npcs/undead-rat.lua"}
for z = 1, 3 do
local m = game.zone:makeEntity(game.level, "actor", {base_list=npcs, name="skeletal rat"}, nil, true)
local i, j = util.findFreeGrid(x, y, 10, true, {[engine.Map.ACTOR]=true})
if i and j and m then
game.zone:addEntity(game.level, m, "actor", i, j)
end
end
return true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment