Skip to content
Snippets Groups Projects
Commit 411a37b7 authored by dg's avatar dg
Browse files

money

git-svn-id: http://svn.net-core.org/repos/t-engine4@1227 51575b47-30f0-44d4-a5cc-537603b46e54
parent 11958e37
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,11 @@ end
on_status_change = function(self, who, status, sub)
if self:isCompleted() then
local money = math.max(0, (20 - self.lumberjacks_died) * 1.2)
if money > 0 then
who:incMoney(money)
require("engine.Dialog"):simplePopup("Thanks", ("The remaining lumberjacks collect some gold to thanks you (%0.2f)."):format(money))
end
who:setQuestStatus(self.id, engine.Quest.DONE)
game:setAllowedBuild("afflicted")
game:setAllowedBuild("afflicted_cursed", true)
......
No preview for this file type
No preview for this file type
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