Skip to content
Snippets Groups Projects
Commit 2d971436 authored by DarkGod's avatar DarkGod
Browse files

Added some new .. things .. to spice up Ardhungol

parent 30b28814
No related branches found
No related tags found
No related merge requests found
......@@ -20,3 +20,33 @@
load("/data/general/grids/basic.lua")
load("/data/general/grids/cave.lua")
load("/data/general/grids/water.lua")
newEntity{ base="CAVEFLOOR", define_as = "WORMHOLE", nice_tiler = false,
name = "unstable wormhole",
display = '*', color = colors.GREY,
force_clone = true,
damage_project = function(self, src, x, y, type, dam)
local source_talent = src.__projecting_for and src.__projecting_for.project_type and (src.__projecting_for.project_type.talent_id or src.__projecting_for.project_type.talent) and src.getTalentFromId and src:getTalentFromId(src.__projecting_for.project_type.talent or src.__projecting_for.project_type.talent_id)
if _G.type(dam) == "table" and _G.type(dam.dam) == "number" then dam = dam.dam end
if dam and source_talent and source_talent.is_spell and rng.percent(dam / 3) and not game.__tmp_ardhungol_projecting then
local a = game.level.map(x, y, engine.Map.ACTOR)
if a then
game.logSeen(src, "#VIOLET#The wormhole absorbs the energy of the spell and teleports %s away!", a.name)
a:teleportRandom(x, y, 20)
else
game.logSeen({x=x,y=y}, "#VIOLET#The wormhole absorbs the energy of the spell and explodes in a burst of nullmagic!")
local DT = engine.DamageType
local grids = core.fov.circle_grids(x, y, 2, true)
game.__tmp_ardhungol_projecting = true -- OMFG this is fugly :/
for x, yy in pairs(grids) do for y, _ in pairs(yy) do
DT:get(DT.MANABURN).projector(self, x, y, DT.MANABURN, util.bound(dam / 2, 1, 200))
end end
game.__tmp_ardhungol_projecting = nil
game.level.map:particleEmitter(x, y, 2, "generic_sploom", {rm=150, rM=180, gm=20, gM=60, bm=180, bM=200, am=80, aM=150, radius=2, basenb=120})
end
end
end,
resolvers.generic(function(e) e:addParticles(engine.Particles.new("wormhole", 1, {})) end),
}
......@@ -39,7 +39,7 @@ return {
class = "engine.generator.map.Cavern",
zoom = 16,
min_floor = 1100,
floor = "CAVEFLOOR",
floor = function() if rng.percent(96) then return "CAVEFLOOR" else return "WORMHOLE" end end,
wall = "CAVEWALL",
up = "CAVE_LADDER_UP",
down = "CAVE_LADDER_DOWN",
......
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