Skip to content
Snippets Groups Projects
Commit 03388f4b authored by dg's avatar dg
Browse files

If enough lumberjacks are saved they also provide a digger as a reward

git-svn-id: http://svn.net-core.org/repos/t-engine4@4978 51575b47-30f0-44d4-a5cc-537603b46e54
parent 0e3b28f0
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,15 @@ on_status_change = function(self, who, status, sub)
who:incMoney(money)
require("engine.ui.Dialog"):simplePopup("Thanks", ("The remaining lumberjacks collect some gold to thanks you (%0.2f)."):format(money))
end
if self.lumberjacks_died < 7 then
local o = game.zone:makeEntity(game.level, "object", {type="tool", subtype="digger", tome_drops="boss"}, nil, true)
if o then
game:addEntity(game.level, o, "object")
o:identify(true)
who:addObject(who.INVEN_INVEN, o)
require("engine.ui.Dialog"):simplePopup("Thanks", ("You saved most of us, please take this has a reward. (They give you %s)"):format(o:getName{do_color=true}))
end
end
who:setQuestStatus(self.id, engine.Quest.DONE)
game:setAllowedBuild("afflicted")
game:setAllowedBuild("afflicted_cursed", true)
......
......@@ -29,7 +29,7 @@ return {
all_lited = true,
persistent = "zone",
ambient_music = "Virtue lost.ogg",
min_material_level = 2,
min_material_level = 1,
max_material_level = 2,
generator = {
map = {
......
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