diff --git a/game/engines/default/engine/Trap.lua b/game/engines/default/engine/Trap.lua index f4157453be8bae96bb217ad6ec10584bd2e8fc19..725c0a6417556a4bec487b25c0881ffe1dbad615 100644 --- a/game/engines/default/engine/Trap.lua +++ b/game/engines/default/engine/Trap.lua @@ -139,7 +139,7 @@ function _M:trigger(x, y, who) if self.triggered then known, del = self:triggered(x, y, who) end if self.summoner then self.summoner.__project_source = nil end if known then - self:setKnown(who, true) + self:setKnown(who, true, x, y) game.level.map:updateMap(x, y) end if del then diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 857648b8b2bc873bcca747b41548700ea4b27863..ab83cc19365147774d833a5501adac01e65d0611 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1287,7 +1287,7 @@ function _M:move(x, y, force) for x, yy in pairs(grids) do for y, _ in pairs(yy) do local trap = game.level.map(x, y, Map.TRAP) if trap and not trap:knownBy(self) and self:canSee(trap) and self:checkHit(power, trap.detect_power) then - trap:setKnown(self, true) + trap:setKnown(self, true, x, y) game.level.map:updateMap(x, y) game.logPlayer(self, "You have found a trap (%s)!", trap:getName()) end diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua index efe391e22bc3b5263c85b6054f1daf4507aa2fea..706134ed3048b4b353e62969b380ed819b81a757 100644 --- a/game/modules/tome/class/GameState.lua +++ b/game/modules/tome/class/GameState.lua @@ -2302,6 +2302,7 @@ function _M:startEvents() -- Randomize the order they are checked as table.shuffle(evts) + print("[STARTEVENTS] Zone events list:") table.print(evts) table.shuffle(mevts) table.print(mevts) @@ -2369,7 +2370,7 @@ function _M:startEvents() end return function() - print("Assigned events list") + print("[STARTEVENTS] Assigned events list:") table.print(game.zone.assigned_events) for i, e in ipairs(game.zone.assigned_events[game.level.level] or {}) do diff --git a/game/modules/tome/class/Grid.lua b/game/modules/tome/class/Grid.lua index cad271b2c8aaa319556cf9a6ea9c0cde947b0880..be36b59287577807e743866968b7a149ee497305 100644 --- a/game/modules/tome/class/Grid.lua +++ b/game/modules/tome/class/Grid.lua @@ -119,8 +119,8 @@ end --- Setup minimap color for this entity -- You may overload this method to customize your minimap function _M:setupMinimapInfo(mo, map) - if self.change_level then mo:minimap(240, 0, 240) return end if self.special_minimap then mo:minimap(self.special_minimap.r, self.special_minimap.g, self.special_minimap.b) return end + if self.change_level then mo:minimap(240, 0, 240) return end return engine.Grid.setupMinimapInfo(self, mo, map) end diff --git a/game/modules/tome/class/Trap.lua b/game/modules/tome/class/Trap.lua index d7810bdfef3ba9c3894833b681677b0362e24662..043147691d440d63cb3d5d6cb15348cf9793f71c 100644 --- a/game/modules/tome/class/Trap.lua +++ b/game/modules/tome/class/Trap.lua @@ -76,6 +76,14 @@ function _M:getName() end end +--- Set the known status for the given actor and make its tile remembered on the map for the player +function _M:setKnown(actor, v, x, y) + self.known_by[actor] = v + if actor.player and x and y and game.level.map(x, y, engine.Map.TRAP) == self then + game.level.map(x, y, engine.Map.TERRAIN).always_remember = true + end +end + -- Returns a tooltip for the trap function _M:tooltip() if self:knownBy(game.player) then diff --git a/game/modules/tome/data/general/events/antimagic-bush.lua b/game/modules/tome/data/general/events/antimagic-bush.lua index 2dd3b644fd4e860532e1d4cd4a77b0768c58bd03..ca654f3a66238e6c0a89a304b9d0a1d85ae82474 100644 --- a/game/modules/tome/data/general/events/antimagic-bush.lua +++ b/game/modules/tome/data/general/events/antimagic-bush.lua @@ -21,9 +21,12 @@ local x, y = game.state:findEventGrid(level) if not x then return false end +local on_stand = function(self, x, y, who) who:setEffect(who.EFF_ANTIMAGIC_BUSH, 1, {}) end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.name = "antimagic bush" g.display='~' g.color_r=0 g.color_g=255 g.color_b=100 g.notice = true +g.special_minimap = colors.OLIVE_DRAB +g.on_stand = on_stand g:removeAllMOs() if engine.Map.tiles.nicer_tiles then g.add_displays = g.add_displays or {} @@ -38,13 +41,13 @@ else level.map:particleEmitter(x, y, 3, "ultrashield", {rm=0, rM=0, gm=160, gM=240, bm=100, bM=160, am=220, aM=250, radius=3, density=1, life=14, instop=17}) end -local on_stand = function(self, x, y, who) who:setEffect(who.EFF_ANTIMAGIC_BUSH, 1, {}) end - -local grids = core.fov.circle_grids(x, y, 3, "do not block") +local grids = core.fov.circle_grids(x, y, 3, function(_, lx, ly) return not game.state:canEventGrid(level, lx, ly) end) 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 + if g.on_stand == on_stand and g.type == "floor" and not g.special_minimap then g.name = g.name .. " (antimagic aura)" g.special_minimap = {b=35, g=35, r=85} end + g.always_remember = true game.zone:addEntity(game.level, g, "terrain", x, y) end end - +print("[EVENT] antimagic-bush centered at ", x, y) return true diff --git a/game/modules/tome/data/general/events/bligthed-soil.lua b/game/modules/tome/data/general/events/bligthed-soil.lua index 11ac5929669f90d6587f980960c3791271be7b87..8f8a59328648619be61de92c936d5250de0cdf19 100644 --- a/game/modules/tome/data/general/events/bligthed-soil.lua +++ b/game/modules/tome/data/general/events/bligthed-soil.lua @@ -21,9 +21,12 @@ local x, y = game.state:findEventGrid(level) if not x then return false end +local on_stand = function(self, x, y, who) who:setEffect(who.EFF_BLIGHTED_SOIL, 1, {}) end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.name = "blighted soil" g.display='~' g.color_r=0 g.color_g=255 g.color_b=0 g.notice = true +g.special_minimap = colors.OLIVE_DRAB +g.on_stand = on_stand g:removeAllMOs() if engine.Map.tiles.nicer_tiles then g.add_displays = g.add_displays or {} @@ -38,13 +41,13 @@ else level.map:particleEmitter(x, y, 3, "ultrashield", {rm=50, rM=80, gm=80, gM=100, bm=30, bM=60, am=220, aM=250, radius=3, density=1, life=14, instop=17}) end -local on_stand = function(self, x, y, who) who:setEffect(who.EFF_BLIGHTED_SOIL, 1, {}) end - -local grids = core.fov.circle_grids(x, y, 3, "do not block") +local grids = core.fov.circle_grids(x, y, 3, function(_, lx, ly) return not game.state:canEventGrid(level, lx, ly) end) 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 + if g.on_stand == on_stand and g.type == "floor" and not g.special_minimap then g.name = g.name .. " (blighted aura)" g.special_minimap = colors.DARK_SLATE_GRAY end + g.always_remember = true game.zone:addEntity(game.level, g, "terrain", x, y) end end - +print("[EVENT] blighted-soil centered at ", x, y) return true diff --git a/game/modules/tome/data/general/events/cultists.lua b/game/modules/tome/data/general/events/cultists.lua index 3fdef38fcf715104420d435761d8909b4f49d772..793f72653e9ba8012a879d30c1f246a756ee596e 100644 --- a/game/modules/tome/data/general/events/cultists.lua +++ b/game/modules/tome/data/general/events/cultists.lua @@ -47,6 +47,7 @@ for i, p in ipairs(list) do local g = game.level.map(p.x, p.y, engine.Map.TERRAIN):cloneFull() g.name = "monolith" g.display='&' g.color_r=0 g.color_g=255 g.color_b=255 g.notice = true + g.always_remember = true g.special_minimap = colors.OLIVE_DRAB g.add_displays = g.add_displays or {} g.add_displays[#g.add_displays+1] = mod.class.Grid.new{image="terrain/moonstone_0"..rng.range(1,8)..".png", display_y=-1, display_h=2, z=18} g:altered() @@ -55,6 +56,7 @@ for i, p in ipairs(list) do g.autoexplore_ignore = true g.is_monolith = true game.zone:addEntity(game.level, g, "terrain", p.x, p.y) + print("[EVENT] monolith placed at ", p.x, p.y) local m = mod.class.NPC.new{ type = "humanoid", subtype = "shalore", image = "npc/humanoid_shalore_elven_corruptor.png", diff --git a/game/modules/tome/data/general/events/fell-aura.lua b/game/modules/tome/data/general/events/fell-aura.lua index af8f174f2700534dd4accf1c4598645d4b0e0571..11b22fb3a5cb0fc7c506643883cefce5aa294c53 100644 --- a/game/modules/tome/data/general/events/fell-aura.lua +++ b/game/modules/tome/data/general/events/fell-aura.lua @@ -29,11 +29,13 @@ end local on_stand = function(self, x, y, who) who:setEffect(who.EFF_FELL_AURA, 1, {}) end -local grids = core.fov.circle_grids(x, y, 2, "do not block") +local grids = core.fov.circle_grids(x, y, 2, function(_, lx, ly) return not game.state:canEventGrid(level, lx, ly) end) 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 + if g.on_stand == on_stand and g.type == "floor" and not g.special_minimap then g.name = g.name .. " (fell aura)" g.special_minimap = {b=99, g=99, r=60} end + g.always_remember = true game.zone:addEntity(game.level, g, "terrain", x, y) end end - +print("[EVENT] fell-aura centered at ", x, y) return true diff --git a/game/modules/tome/data/general/events/font-life.lua b/game/modules/tome/data/general/events/font-life.lua index fbd21baa04daf3d905f691b2af2ad9fa43c3f101..60497b8e9357cc059e30a7c4fd1c1362705c3d91 100644 --- a/game/modules/tome/data/general/events/font-life.lua +++ b/game/modules/tome/data/general/events/font-life.lua @@ -21,9 +21,12 @@ local x, y = game.state:findEventGrid(level) if not x then return false end +local on_stand = function(self, x, y, who) who:setEffect(who.EFF_FONT_OF_LIFE, 1, {}) end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.name = "font of life" g.display='&' g.color_r=0 g.color_g=255 g.color_b=0 g.notice = true +g.special_minimap = colors.OLIVE_DRAB +g.on_stand = on_stand g:removeAllMOs() if engine.Map.tiles.nicer_tiles then g.add_displays = g.add_displays or {} @@ -38,13 +41,14 @@ else level.map:particleEmitter(x, y, 2, "ultrashield", {rm=0, rM=0, gm=180, gM=220, bm=10, bM=80, am=220, aM=250, radius=2, density=1, life=14, instop=17}) end -local on_stand = function(self, x, y, who) who:setEffect(who.EFF_FONT_OF_LIFE, 1, {}) end - -local grids = core.fov.circle_grids(x, y, 2, "do not block") +local grids = core.fov.circle_grids(x, y, 2, function(_, lx, ly) return not game.state:canEventGrid(level, lx, ly) end) 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 + if g.on_stand == on_stand and g.type == "floor" and not g.special_minimap then g.name = g.name .. " (life aura)" g.special_minimap = colors.AQUAMARINE end + g.always_remember = true g.on_stand_safe = true game.zone:addEntity(game.level, g, "terrain", x, y) end end +print("[EVENT] font-life centered at ", x, y) return true diff --git a/game/modules/tome/data/general/events/glimmerstone.lua b/game/modules/tome/data/general/events/glimmerstone.lua index a778724ce35fc3d3b336a2d8772d1fc931e41e53..7a96d77ae76b0926f63025a6f8a9e6d0beff2a44 100644 --- a/game/modules/tome/data/general/events/glimmerstone.lua +++ b/game/modules/tome/data/general/events/glimmerstone.lua @@ -27,6 +27,7 @@ g.identified = true g.name = "glimmerstone" g.desc = "It shimmers and changes the light all around. This is dazling!" g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true +g.always_remember = true g:removeAllMOs() if engine.Map.tiles.nicer_tiles then g.add_displays = g.add_displays or {} diff --git a/game/modules/tome/data/general/events/glowing-chest.lua b/game/modules/tome/data/general/events/glowing-chest.lua index 5ac52aa91a47f7ab84db8c869107ad8cfb98ae93..63e6d85ab898f18923349bdfb5b9a25851b311de 100644 --- a/game/modules/tome/data/general/events/glowing-chest.lua +++ b/game/modules/tome/data/general/events/glowing-chest.lua @@ -53,6 +53,7 @@ end local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.name = "glowing chest" g.display='~' g.color_r=255 g.color_g=215 g.color_b=0 g.notice = true +g.always_remember = true g.special_minimap = {b=150, g=50, r=90} g:removeAllMOs() if engine.Map.tiles.nicer_tiles then g.add_displays = g.add_displays or {} @@ -87,6 +88,7 @@ g.block_move = function(self, x, y, who, act, couldpass) self.block_move = nil self.special = nil self.autoexplore_ignore = true + self.name = "glowing chest (opened)" if self.add_displays and self.add_displays[1] then self.add_displays[1].image = "object/chestopen3.png" @@ -98,5 +100,5 @@ g.block_move = function(self, x, y, who, act, couldpass) return false end game.zone:addEntity(game.level, g, "terrain", x, y) - +print("[EVENT] glowing-chest placed at ", x, y) return true diff --git a/game/modules/tome/data/general/events/icy-ground.lua b/game/modules/tome/data/general/events/icy-ground.lua index 028010d84e1b0c17e7f6e49929d3636e39e60ac7..afc3156f131f61c026a915a68ec0ab07470b4642 100644 --- a/game/modules/tome/data/general/events/icy-ground.lua +++ b/game/modules/tome/data/general/events/icy-ground.lua @@ -23,8 +23,10 @@ if not spots then return false end local list = mod.class.Grid:loadList("/data/general/grids/ice.lua") for _, spot in ipairs(spots) do - level.map(spot.x, spot.y, engine.Map.TERRAIN, list.ICY_FLOOR) + if game.state:canEventGrid(level, spot.x, spot.y) and not level.map(spot.x, spot.y, engine.Map.TERRAIN).on_stand then + level.map(spot.x, spot.y, engine.Map.TERRAIN, list.ICY_FLOOR) + end end for _, spot in ipairs(spots) do game.nicer_tiles:updateAround(level, spot.x, spot.y) end - +print("[EVENT] icy-ground placed") return true diff --git a/game/modules/tome/data/general/events/necrotic-air.lua b/game/modules/tome/data/general/events/necrotic-air.lua index 91d681c98275e943f7d8ace173af4709457f4825..4f892f89499ebc3ecd384dafd421b032781fa80a 100644 --- a/game/modules/tome/data/general/events/necrotic-air.lua +++ b/game/modules/tome/data/general/events/necrotic-air.lua @@ -29,11 +29,13 @@ end local on_stand = function(self, x, y, who) who:setEffect(who.EFF_NECROTIC_AIR, 1, {}) end -local grids = core.fov.circle_grids(x, y, 2, "do not block") +local grids = core.fov.circle_grids(x, y, 2, function(_, lx, ly) return not game.state:canEventGrid(level, lx, ly) end) 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 + if g.on_stand == on_stand and g.type == "floor" and not g.special_minimap then g.name = g.name .. " (necrotic air)" g.special_minimap = colors.DARK_SLATE_GRAY end + g.always_remember = true game.zone:addEntity(game.level, g, "terrain", x, y) end end - -return true +print("[EVENT] necrotic-air centered at ", x, y) +return true \ No newline at end of file diff --git a/game/modules/tome/data/general/events/old-battle-field.lua b/game/modules/tome/data/general/events/old-battle-field.lua index 9e4ae9384351e2abc12d56a80dbbf35bdc31c22a..c6dadf283f50e1a2fc0f12996344992bf07dc97f 100644 --- a/game/modules/tome/data/general/events/old-battle-field.lua +++ b/game/modules/tome/data/general/events/old-battle-field.lua @@ -116,6 +116,7 @@ if tries < 100 then local g = game.level.map(p.x, p.y, engine.Map.TERRAIN):cloneFull() g.name = "grave" g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true + g.always_remember = true g.special_minimap = colors.OLIVE_DRAB g:removeAllMOs() if engine.Map.tiles.nicer_tiles then g.add_displays = g.add_displays or {} @@ -135,6 +136,7 @@ if tries < 100 then local ov = g.add_displays[#g.add_displays] ov.image = "terrain/grave_opened_0"..rng.range(1, 3).."_64.png" end + g.name = "grave (opened)" game.level.map:updateMap(x, y) self.block_move = nil @@ -154,6 +156,7 @@ if tries < 100 then end game.zone:addEntity(game.level, g, "terrain", p.x, p.y) + print("[EVENT] grave placed at ", p.x, p.y) end end diff --git a/game/modules/tome/data/general/events/protective-aura.lua b/game/modules/tome/data/general/events/protective-aura.lua index 6e6a4e660dddbf6545fe4ed6b1eba5b0ae3c5445..64ef12ca62b75832e8f5184f9db70773770d5f09 100644 --- a/game/modules/tome/data/general/events/protective-aura.lua +++ b/game/modules/tome/data/general/events/protective-aura.lua @@ -29,11 +29,13 @@ end local on_stand = function(self, x, y, who) who:setEffect(who.EFF_PROTECTIVE_AURA, 1, {}) end -local grids = core.fov.circle_grids(x, y, 1, "do not block") +local grids = core.fov.circle_grids(x, y, 1, function(_, lx, ly) return not game.state:canEventGrid(level, lx, ly) end) 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 + if g.on_stand == on_stand and g.type == "floor" and not g.special_minimap then g.name = g.name .. " (protective aura)" g.special_minimap = colors.DARK_TAN end + g.always_remember = true game.zone:addEntity(game.level, g, "terrain", x, y) end end - -return true +print("[EVENT] protective-aura centered at ", x, y) +return true \ No newline at end of file diff --git a/game/modules/tome/data/general/events/slimey-pool.lua b/game/modules/tome/data/general/events/slimey-pool.lua index 767dd463113c3326cd61df9c854d6b712c098e0e..13f881766b086e21643053c6ec047989123221d6 100644 --- a/game/modules/tome/data/general/events/slimey-pool.lua +++ b/game/modules/tome/data/general/events/slimey-pool.lua @@ -23,19 +23,32 @@ if not x then return false end local list = mod.class.Grid:loadList("/data/general/grids/slime.lua") +local on_stand = function(self, x, y, who) who:setEffect(who.EFF_SLIMEY_POOL, 1, {}) end 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) +g = level.map(x, y, engine.Map.TERRAIN) +g.name = "slimey pool" +g.on_stand = on_stand +g.always_remember = true g.special_minimap = colors.OLIVE_DRAB +g:altered() -local on_stand = function(self, x, y, who) who:setEffect(who.EFF_SLIMEY_POOL, 1, {}) end +if core.shader.active(4) then + level.map:particleEmitter(x, y, 2, "shader_ring_rotating", {rotation=0, system_rotationv=0.1, radius=2}, {type="flames", aam=0.5, zoom=3, npow=4, time_factor=10000, color1={0.2,0.7,0,1}, color2={0,1,0.3,1}, hide_center=0}) +else + level.map:particleEmitter(x, y, 2, "ultrashield", {rm=0, rM=0, gm=180, gM=220, bm=10, bM=80, am=220, aM=250, radius=2, density=1, life=14, instop=17}) +end -local grids = core.fov.circle_grids(x, y, 1, "do not block") +local grids = core.fov.circle_grids(x, y, 1, function(_, lx, ly) return not game.state:canEventGrid(level, lx, ly) end) 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 + if g.on_stand == on_stand and g.type == "floor" and not g.special_minimap then + g.name = g.name .. " (slimey)" g.special_minimap = colors.DARK_SEA_GREEN + end + g.always_remember = true game.zone:addEntity(game.level, g, "terrain", x, y) end end - +print("[EVENT] slimey-pool centered at ", x, y) return true diff --git a/game/modules/tome/data/general/events/spellblaze-scar.lua b/game/modules/tome/data/general/events/spellblaze-scar.lua index cff3fa704a5acd1c84be615b84cc4621807363e9..72aa5990f3c7d28a94f9bc5a876438e595b8c84f 100644 --- a/game/modules/tome/data/general/events/spellblaze-scar.lua +++ b/game/modules/tome/data/general/events/spellblaze-scar.lua @@ -21,13 +21,16 @@ local x, y = game.state:findEventGrid(level) if not x then return false end +local on_stand = function(self, x, y, who) who:setEffect(who.EFF_SPELLBLAZE_SCAR, 1, {}) end local list = mod.class.Grid:loadList("/data/general/grids/lava.lua") - local g = list.LAVA_FLOOR:clone() -g.name = "spellblaze scar" -g.on_stand = nil -level.map(x, y, engine.Map.TERRAIN, g) +zone:addEntity(level, g, "terrain", x, y) game.nicer_tiles:updateAround(level, x, y) +g = level.map(x, y, engine.Map.TERRAIN) +g.on_stand = on_stand +g.always_remember = true g.special_minimap = colors.DARK_RED +g.name = "spellblaze scar" +g:altered() if core.shader.active(4) then level.map:particleEmitter(x, y, 1, "shader_ring_rotating", {rotation=0, radius=2}, {type="flames", aam=0.5, zoom=3, npow=4, time_factor=1000, hide_center=0}) @@ -35,14 +38,15 @@ else level.map:particleEmitter(x, y, 1, "ultrashield", {rm=180, rM=220, gm=0, gM=0, bm=10, bM=80, am=220, aM=250, radius=1, density=1, life=14, instop=17}) end -local on_stand = function(self, x, y, who) who:setEffect(who.EFF_SPELLBLAZE_SCAR, 1, {}) end - -local grids = core.fov.circle_grids(x, y, 1, "do not block") +local grids = core.fov.circle_grids(x, y, 1, function(_, lx, ly) return not game.state:canEventGrid(level, lx, ly) end) 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 + if g.on_stand == on_stand and g.type == "floor" and not g.special_minimap then g.name = g.name .. " (spellblaze aura)" g.special_minimap = colors.VERY_DARK_RED end + g.always_remember = true g.on_stand_safe = true game.zone:addEntity(game.level, g, "terrain", x, y) end end - +print("[EVENT] spellblaze-scar centered at ", x, y) return true + diff --git a/game/modules/tome/data/general/events/tombstones.lua b/game/modules/tome/data/general/events/tombstones.lua index f5b61ef29f4c387938989fede74e0e7a877d88d7..136846d8f4fce772a158d7129381702dbd8910a6 100644 --- a/game/modules/tome/data/general/events/tombstones.lua +++ b/game/modules/tome/data/general/events/tombstones.lua @@ -31,6 +31,7 @@ if tries < 100 then local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() g.name = "grave" g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true + g.always_remember = true g.special_minimap = colors.OLIVE_DRAB g:removeAllMOs() if engine.Map.tiles.nicer_tiles then g.add_displays = g.add_displays or {} @@ -49,6 +50,7 @@ if tries < 100 then local ov = g.add_displays[#g.add_displays] ov.image = "terrain/grave_opened_0"..rng.range(1, 3).."_64.png" end + g.name = "grave (opened)" game.level.map:updateMap(x, y) self.block_move = nil @@ -67,6 +69,7 @@ if tries < 100 then return false end, game.zone:addEntity(game.level, g, "terrain", x, y) + print("[EVENT] tombstone placed at ", x, y) end end -- for diff --git a/game/modules/tome/data/general/events/weird-pedestals.lua b/game/modules/tome/data/general/events/weird-pedestals.lua index ab8aca69c592032feebc44952060ef96a3942a4b..bbdb2838d8df05692cb683033de6b1d6ccf2d6a9 100644 --- a/game/modules/tome/data/general/events/weird-pedestals.lua +++ b/game/modules/tome/data/general/events/weird-pedestals.lua @@ -44,6 +44,7 @@ for i = 1, 3 do local g = game.level.map(i, j, engine.Map.TERRAIN):cloneFull() g.name = "weird pedestal" g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true + g.always_remember = true g.special_minimap = colors.OLIVE_DRAB g:removeAllMOs() if engine.Map.tiles.nicer_tiles then g.add_displays = g.add_displays or {} @@ -92,6 +93,7 @@ for i = 1, 3 do local ov = g.add_displays[#g.add_displays] ov.image = "terrain/pedestal_orb_0"..rng.range(1, 5)..".png" end + g.name = "weird pedestal (glowing)" game.level.map:updateMap(self.pedestal_x, self.pedestal_y) game.level.pedestal_events = (game.level.pedestal_events or 0) + 1 game.logSeen(self, "%s's soul is absorbed by the pedestal. A glowing orb appears.", self.name:capitalize()) @@ -134,6 +136,7 @@ for i = 1, 3 do return false end game.zone:addEntity(game.level, g, "terrain", i, j) + print("[EVENT] weird-pedestal placed at ", i, j) end return true diff --git a/game/modules/tome/data/general/events/whistling-vortex.lua b/game/modules/tome/data/general/events/whistling-vortex.lua index c71454c945d33030000e7c311c6970497d94cd75..fe8ae650cab0214e501efd0c9752ef8d6bdc4115 100644 --- a/game/modules/tome/data/general/events/whistling-vortex.lua +++ b/game/modules/tome/data/general/events/whistling-vortex.lua @@ -25,11 +25,13 @@ level.map:particleEmitter(x, y, 3, "generic_vortex", {rm=200, rM=250, gm=200, gM local on_stand = function(self, x, y, who) who:setEffect(who.EFF_WHISTLING_VORTEX, 1, {}) end -local grids = core.fov.circle_grids(x, y, 3, "do not block") +local grids = core.fov.circle_grids(x, y, 3, function(_, lx, ly) return not game.state:canEventGrid(level, lx, ly) end) 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 + if g.on_stand == on_stand and g.type == "floor" and not g.special_minimap then g.name = g.name .. " (whistling vortex)" g.special_minimap = colors.DARK_SLATE_GRAY end + g.always_remember = true game.zone:addEntity(game.level, g, "terrain", x, y) end end - -return true +print("[EVENT] whistling-vortex centered at ", x, y) +return true \ No newline at end of file diff --git a/game/modules/tome/data/general/grids/ice.lua b/game/modules/tome/data/general/grids/ice.lua index 2c73d3331dd81091078e3ea81c2700c301186a60..723097739748b6961640af03d0b6dac64eb0fa1a 100644 --- a/game/modules/tome/data/general/grids/ice.lua +++ b/game/modules/tome/data/general/grids/ice.lua @@ -25,6 +25,7 @@ newEntity{ name = "icy floor", image = "terrain/frozen_ground.png", display = '.', color=colors.LIGHT_BLUE, back_color=colors.WHITE, nice_editer = ice_editer, + always_remember = true, special_minimap = {b=220, g=220, r=120}, on_stand = function(self, x, y, who) who:setEffect(who.EFF_ICY_FLOOR, 1, {}) end, @@ -36,6 +37,6 @@ newEntity{ display = ';', color=colors.LIGHT_BLUE, back_color=colors.WHITE, nice_editer = ice_editer, nice_tiler = { method="replace", base={"FROZEN_WATER", 100, 1, 4}}, - special_minimap = colors.BLUE, + always_remember = true, special_minimap = {b=220, g=220, r=120}, } for i = 1, 4 do newEntity{ base="FROZEN_WATER", define_as = "FROZEN_WATER"..i, add_mos = {{image = "terrain/ice/frozen_ground_5_0"..i..".png"}}} end diff --git a/game/modules/tome/data/general/traps/complex.lua b/game/modules/tome/data/general/traps/complex.lua index 0bd4ef1a69e2af5e131621a3807b405558800832..e70918467d3bf83cf71ab336766574a6593c35d6 100644 --- a/game/modules/tome/data/general/traps/complex.lua +++ b/game/modules/tome/data/general/traps/complex.lua @@ -136,7 +136,7 @@ newEntity{ base = "TRAP_COMPLEX", newEntity{ base = "TRAP_COMPLEX", subtype = "nature", - name = "poison cloud", image = "trap/trap_acid_blast_01.png", + name = "poison spore", image = "trap/trap_acid_blast_01.png", detect_power = resolvers.clscale(40, 50, 8), disarm_power = resolvers.clscale(50, 50, 8), rarity = 3, level_range = {1, nil}, @@ -176,7 +176,7 @@ newEntity{ base = "TRAP_COMPLEX", end, act = function(self) if game.level.map(self.x, self.y, engine.Map.TRAP) ~= self then game.level:removeEntity(self, true) return end - if self.nb <= 0 then game.level:removeEntity(self, true) print("The poison spore looks somewhat drained.") return end + if self.nb <= 0 then game.level:removeEntity(self, true) game.logSeen(self, "The poison spore looks somewhat drained.") return end local ok = false local tg = {type="ball", radius=self.rad, friendlyfire=false} diff --git a/game/modules/tome/dialogs/MapMenu.lua b/game/modules/tome/dialogs/MapMenu.lua index 54bea947aa0b1c6d9f7779ff23aba34ce02c3c21..86431cd96a915c975268b353d37968e56d4d7ba7 100644 --- a/game/modules/tome/dialogs/MapMenu.lua +++ b/game/modules/tome/dialogs/MapMenu.lua @@ -142,6 +142,7 @@ function _M:generateList() if a and not self.on_player and config.settings.cheat then list[#list+1] = {name="Target player", action="target-player", color=colors.simple(colors.RED), actor=a} end if a and config.settings.cheat then list[#list+1] = {name="Lua inspect [Actor]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=a} end if g and config.settings.cheat then list[#list+1] = {name="Lua inspect [Terrain]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=g} end + if t and config.settings.cheat then list[#list+1] = {name="Lua inspect [Trap]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=t} end if p and config.settings.cheat then list[#list+1] = {name="Lua inspect [Projectile]", action="debug-inspect", color=colors.simple(colors.LIGHT_BLUE), actor=p} end if a and config.settings.cheat then list[#list+1] = {name="Show inventory", action="debug-inventory", color=colors.simple(colors.YELLOW), actor=a} end if self.on_player then list[#list+1] = {name="Rest a while", action="rest", color=colors.simple(colors.ANTIQUE_WHITE)} end