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

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@1615 51575b47-30f0-44d4-a5cc-537603b46e54
parent d3e9c1b8
No related branches found
No related tags found
No related merge requests found
......@@ -113,7 +113,7 @@ end
function _M:onLeaveLevel(zone, level)
-- Fail past escort quests
local eid = "escort-duty-"..zone.short_name.."-"..level.level
if self.quests and self.quests[eid] then
if self.quests and self.quests[eid] and not self:hasQuest(eid):isEnded() then
local q = self.quests[eid]
q.abandoned = true
self:setQuestStatus(eid, q.FAILED)
......
......@@ -260,6 +260,7 @@ end
on_status_change = function(self, who, status, sub)
if status == self.FAILED then
-- Remove the actor is we failed
for uid, e in pairs(game.level.entities) do
if e.quest_id and e.quest_id == self.id then
e:disappear()
......
......@@ -218,7 +218,6 @@ end
function resolvers.calc.charges(tt, e)
e.max_power = rng.range(tt[1], tt[2])
e.power = e.max_power
print("creatin wand", e.name, e.egoed, e.max_power, e.cost_per_charge)
e.recharge_cost = (e.cost_per_charge or 0) * 4
e.cost = e.cost + (e.cost_per_charge or 0) * e.max_power
e.show_charges = true
......
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