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

tmp

git-svn-id: http://svn.net-core.org/repos/t-engine4@5479 51575b47-30f0-44d4-a5cc-537603b46e54
parent 4dc6c66a
No related branches found
No related tags found
No related merge requests found
......@@ -1219,7 +1219,7 @@ function _M:setupCommands()
end end
end end,
[{"_g","ctrl"}] = function() if config.settings.cheat then
local f, err = loadfile("/data/general/events/fell-aura.lua")
local f, err = loadfile("/data/general/events/slimey-pool.lua")
print(f, err)
setfenv(f, setmetatable({level=self.level, zone=self.zone}, {__index=_G}))
print(pcall(f))
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
-- Find a random spot
local x, y = game.state:findEventGrid(level)
if not x then return false end
local list = mod.class.Grid:loadList("/data/general/grids/slime.lua")
local g = list.SLIME_FLOOR:clone()
g.name = "slimey pool"
g.on_stand = nil
level.map(x, y, engine.Map.TERRAIN, g)
game.nicer_tiles:updateAround(level, x, y)
local on_stand = function(self, x, y, who) who:setEffect(who.EFF_SLIMEY_POOL, 1, {}) end
local grids = core.fov.circle_grids(x, y, 1, "do not block")
for x, yy in pairs(grids) do for y, _ in pairs(yy) do
local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull()
g.on_stand = g.on_stand or on_stand
game.zone:addEntity(game.level, g, "terrain", x, y)
end end
return true
......@@ -142,3 +142,12 @@ floorEffect{
self:effectTemporaryValue(eff, "resists", {all=-20})
end,
}
floorEffect{
desc = "Slimey Pool", image = "talents/acidic_skin.png",
long_desc = "The target is walking on slime. Decreasing movement speed by 20% and dealing 20 slime damage to any creatures attacking it.",
activate = function(self, eff)
self:effectTemporaryValue(eff, "on_melee_hit", {[DamageType.SLIME] = 20})
self:effectTemporaryValue(eff, "movement_speed", -0.2)
end,
}
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