Skip to content
Snippets Groups Projects
Commit 503bdf09 authored by Chris Davidson's avatar Chris Davidson
Browse files

Reveal Map in dev mode now grants omnivision for 100 turns revealing everything

parent 7048830d
No related branches found
No related tags found
No related merge requests found
......@@ -574,6 +574,25 @@ function _M:playerFOV()
end, true, true, true)
end
-- See everything and ignore all forms of blocking, dev mode feature
if self:attr("omnivision") then
self:computeFOV(self:attr("omnivision"), "we_need_useless_string_not_nil", function(x, y)
local ok = false
if game.level.map(x, y, game.level.map.ACTOR) then ok = true end
if game.level.map(x, y, game.level.map.OBJECT) then ok = true end
if game.level.map(x, y, game.level.map.TRAP) then
game.level.map(x, y, game.level.map.TRAP):setKnown(self, true, x, y)
game.level.map.remembers(x, y, true)
game.level.map:updateMap(x, y)
ok = true
end
if ok then
game.level.map.seens(x, y, 0.6)
end
end, true, true, true)
end
-- Handle arcane eye
if self:hasEffect(self.EFF_ARCANE_EYE) then
local eff = self:hasEffect(self.EFF_ARCANE_EYE)
......
......@@ -3975,6 +3975,23 @@ newEffect{
end,
}
newEffect{
name = "OMNIVISION", image = "talents/track.png",
desc = "Sensing Everything",
long_desc = function(self, eff) return "Improves senses, allowing the detection of everything." end,
type = "other",
subtype = { sense=true },
status = "beneficial",
parameters = { range=10,},
activate = function(self, eff)
self:effectTemporaryValue(eff, "omnivision", eff.range)
game.level.map.changed = true
end,
deactivate = function(self, eff)
end,
}
newEffect{
name = "DOZING", image = "talents/sleep.png",
desc = "Dozing",
......@@ -3988,4 +4005,4 @@ newEffect{
end,
deactivate = function(self, eff)
end,
}
\ No newline at end of file
}
......@@ -93,6 +93,9 @@ function _M:use(item)
end
end
end
game.player:setEffect(game.player.EFF_OMNIVISION, 100, {
range = 200,
})
elseif act == "change_level" then
game:registerDialog(GetQuantity.new("Zone: "..game.zone.name, "Level 1-"..game.zone.max_level, game.level.level, game.zone.max_level, function(qty)
game:changeLevel(qty)
......
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