Skip to content
Snippets Groups Projects
Commit 070e0a5e authored by DarkGod's avatar DarkGod
Browse files

Air bubbles have a more explicit description

Killing an aquatic horror will fill the surroundings with air bubbles
parent 6fff760c
No related branches found
No related tags found
No related merge requests found
......@@ -144,7 +144,7 @@ function _M:tooltip(x, y)
if game.level.map.lites(x, y) then tstr:add({"color", "YELLOW"}, "Lit", {"color", "LAST"}, true) end
if self:check("block_sight", x, y) then tstr:add({"color", "UMBER"}, "Blocks sight", {"color", "LAST"}, true) end
if self:check("block_move", x, y, game.player) then tstr:add({"color", "UMBER"}, "Blocks movement", {"color", "LAST"}, true) end
if self:attr("air_level") then tstr:add({"color", "LIGHT_BLUE"}, "Special breathing method required", {"color", "LAST"}, true) end
if self:attr("air_level") and self:attr("air_level") < 0 then tstr:add({"color", "LIGHT_BLUE"}, "Special breathing method required", {"color", "LAST"}, true) end
if self:attr("dig") then tstr:add({"color", "LIGHT_UMBER"}, "Diggable", {"color", "LAST"}, true) end
if game.level.map.attrs(x, y, "no_teleport") then tstr:add({"color", "VIOLET"}, "Cannot teleport to this place", {"color", "LAST"}, true) end
......
......@@ -98,6 +98,7 @@ newEntity{ base = "WATER_DOOR_OPEN", define_as = "WATER_DOOR_OPEN_VERT", image =
newEntity{
define_as = "WATER_FLOOR_BUBBLE",
name = "underwater air bubble", image = "terrain/underwater/subsea_floor_bubbles.png",
desc = "#LIGHT_BLUE#Replenishes air level when standing inside.#LAST#", show_tooltip = true,
display = ':', color=colors.LIGHT_BLUE, back_color=colors.DARK_BLUE,
air_level = 15, nb_charges = resolvers.rngrange(4, 7),
force_clone = true,
......
......@@ -40,6 +40,21 @@ newEntity{
no_breath = 1,
fear_immune = 1,
on_die = function(self)
local g = game.zone.grid_list.WATER_FLOOR_BUBBLE
if not g then return end
for i = self.x-1, self.x+1 do for j = self.y-1, self.y+1 do
if rng.percent(65) and game.level.map:isBound(i, j) then
local og = game.level.map(i, j, engine.Map.TERRAIN)
if og and not og.special and not og.change_level and og.type == "floor" and og.subtype == "underwater" then
local ng = g:clone()
ng:resolve() ng:resolve(nil, true)
game.zone:addEntity(game.level, ng, "terrain", i, j)
end
end
end end
end,
}
newEntity{ base = "BASE_NPC_HORROR_AQUATIC",
......
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