Skip to content
Snippets Groups Projects
Commit 448b1008 authored by dg's avatar dg
Browse files

plop

git-svn-id: http://svn.net-core.org/repos/t-engine4@1913 51575b47-30f0-44d4-a5cc-537603b46e54
parent 2a8e7ec5
No related branches found
No related tags found
No related merge requests found
......@@ -394,8 +394,8 @@ function _M:changeLevel(lev, zone, keep_old_lev, force_down)
-- Decay level ?
if self.level.last_turn and self.level.data.decay and self.level.last_turn + self.level.data.decay[1] * 10 < self.turn then
local nb_actor, remain_actor = self.level:decay(Map.ACTOR, function(e) return not e.unique and not e.lore and self.level.last_turn + rng.range(self.level.data.decay[1], self.level.data.decay[2]) < self.turn * 10 end)
local nb_object, remain_object = self.level:decay(Map.OBJECT, function(e) return not e.unique and not e.lore and self.level.last_turn + rng.range(self.level.data.decay[1], self.level.data.decay[2]) < self.turn * 10 end)
local nb_actor, remain_actor = self.level:decay(Map.ACTOR, function(e) return not e.unique and not e.lore and not e.quest and self.level.last_turn + rng.range(self.level.data.decay[1], self.level.data.decay[2]) < self.turn * 10 end)
local nb_object, remain_object = self.level:decay(Map.OBJECT, function(e) return not e.unique and not e.lore and not e.quest and self.level.last_turn + rng.range(self.level.data.decay[1], self.level.data.decay[2]) < self.turn * 10 end)
local gen = self.zone:getGenerator("actor", self.level)
if gen.regenFrom then gen:regenFrom(remain_actor) end
......
......@@ -61,6 +61,7 @@ on_grant = function(self, who)
tries = tries + 1
end
if tries < 100 then
m.quest = true
m.on_die = function(self)
game.player:hasQuest("lightning-overload"):kill_one()
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