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

Fixed the <50 infinite dungeon achievements

git-svn-id: http://svn.net-core.org/repos/t-engine4@6011 51575b47-30f0-44d4-a5cc-537603b46e54
parent 421e6b45
No related branches found
No related tags found
No related merge requests found
......@@ -834,6 +834,7 @@ function _M:loadList(file, no_default, res, mod, loaded)
if err then error(err) end
loaded = loaded or {}
if res.ignore_loaded and loaded[file] then return res end
loaded[file] = true
local newenv newenv = {
......@@ -869,8 +870,8 @@ function _M:loadList(file, no_default, res, mod, loaded)
load = function(f, new_mod)
self:loadList(f, no_default, res, new_mod or mod, loaded)
end,
loadList = function(f, new_mod)
return self:loadList(f, no_default, nil, new_mod or mod, nil)
loadList = function(f, new_mod, list, loaded)
return self:loadList(f, no_default, list, new_mod or mod, loaded)
end,
}
setfenv(f, setmetatable(newenv, {__index=_G}))
......
......@@ -104,6 +104,7 @@ end
-- @return true if an achievement was gained
function _M:gainAchievement(id, src, ...)
local a = self.achiev_defs[id]
print("=============== ach", id, a)
if not a then error("Unknown achievement "..id) return end
if self.achieved[id] and src.achievements and src.achievements[id] then return end
......
......@@ -60,9 +60,9 @@ newTalent{
local damage = t.getDamage(self, t)
local inc = t.getPercentInc(self, t)
return ([[Channel your mental power through your wielded mindstars, generating psionic blades sprouting from the mindstars.
Mindstar psiblades have their damage modifiers (how much damage they gain from stats) increased to %d%% and their armour penetration by %d%%.
Mindstar psiblades have their damage modifiers (how much damage they gain from stats) multiplied by %0.2f and their armour penetration by %0.2f.
Also increases Physical Power by %d and increases weapon damage by %d%% when using mindstars.]]):
format(100 * (1.3 + self:getTalentLevel(t) / 10), 100 * (1 + self:getTalentLevel(t) / 6.3), damage, 100 * inc)
format(1 * (1.3 + self:getTalentLevel(t) / 10), 1 * (1 + self:getTalentLevel(t) / 6.3), damage, 100 * inc)
end,
}
......
......@@ -66,21 +66,6 @@ return {
},
},
post_process = function(level)
-- Everything hates you in the infinite dungeon!
for uid, e in pairs(level.entities) do e.faction = e.hard_faction or "enemies" end
-- Some lore
if level.level == 1 or level.level == 10 or level.level == 20 or level.level == 30 or level.level == 40 then
local l = game.zone:makeEntityByName(level, "terrain", "ID_HISTORY"..level.level)
if not l then return end
for _, coord in pairs(util.adjacentCoords(level.default_up.x, level.default_up.y)) do
if game.level.map:isBound(coord[1], coord[2]) and (i ~= 0 or j ~= 0) and not game.level.map:checkEntity(coord[1], coord[2], engine.Map.TERRAIN, "block_move") then
game.zone:addEntity(level, l, "terrain", coord[1], coord[2])
return
end
end
end
-- Provide some achievements
if level.level == 10 then world:gainAchievement("INFINITE_X10", game.player)
elseif level.level == 20 then world:gainAchievement("INFINITE_X20", game.player)
......@@ -98,5 +83,20 @@ return {
elseif level.level == 400 then world:gainAchievement("INFINITE_X400", game.player)
elseif level.level == 500 then world:gainAchievement("INFINITE_X500", game.player)
end
-- Everything hates you in the infinite dungeon!
for uid, e in pairs(level.entities) do e.faction = e.hard_faction or "enemies" end
-- Some lore
if level.level == 1 or level.level == 10 or level.level == 20 or level.level == 30 or level.level == 40 then
local l = game.zone:makeEntityByName(level, "terrain", "ID_HISTORY"..level.level)
if not l then return end
for _, coord in pairs(util.adjacentCoords(level.default_up.x, level.default_up.y)) do
if game.level.map:isBound(coord[1], coord[2]) and (i ~= 0 or j ~= 0) and not game.level.map:checkEntity(coord[1], coord[2], engine.Map.TERRAIN, "block_move") then
game.zone:addEntity(level, l, "terrain", coord[1], coord[2])
return
end
end
end
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