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

Fixed the Emancipation achievement

git-svn-id: http://svn.net-core.org/repos/t-engine4@3253 51575b47-30f0-44d4-a5cc-537603b46e54
parent a746b849
No related branches found
No related tags found
No related merge requests found
......@@ -1348,11 +1348,11 @@ function _M:die(src)
if src and src.attr and src:attr("vim_on_death") and not self:attr("undead") then src:incVim(src:attr("vim_on_death")) end
if src and src.last_vim_turn and src.last_vim_turn >= game.turn - 30 then src:incVim(src.last_vim_spent) src.last_vim_turn = nil end
if src and src.resolveSource and src:resolveSource().player then
if src and src.resolveSource and src:resolveSource().player or src.player then
-- Achievements
local p = game.party:findMember{main=true}
if math.floor(p.life) <= 1 and not p.dead then world:gainAchievement("THAT_WAS_CLOSE", p) end
if p.dead and self.rank >= 3.5 then world:gainAchievement("EMANCIPATION", p, self) end
world:gainAchievement("EMANCIPATION", p, self)
world:gainAchievement("EXTERMINATOR", p, self)
world:gainAchievement("PEST_CONTROL", p, self)
world:gainAchievement("REAVER", p, self)
......
......@@ -54,7 +54,10 @@ newAchievement{
mode = "player",
can_gain = function(self, who, target)
local p = game.party:findMember{main=true}
if p.dead and p.descriptor.subclass == "Alchemist" then return true end
print("===========================", target.rank >= 3.5, p.dead , p.descriptor.subclass == "Alchemist" , p.alchemy_golem , game.level:hasEntity(p.alchemy_golem) , not p.alchemy_golem.dead)
if target.rank >= 3.5 and p.dead and p.descriptor.subclass == "Alchemist" and p.alchemy_golem and game.level:hasEntity(p.alchemy_golem) and not p.alchemy_golem.dead then
return true
end
end,
on_gain = function(_, src, personal)
-- game:setAllowedBuild("construct")
......
......@@ -39,7 +39,7 @@ newEntity{
cost = 3000,
use_simple = { name="consume the heart", use = function(self, who)
game.logPlayer(who, "#00FFFF#You consume the heart and feel the knowledge of this very old creature fills you!")
game.logPlayer(who, "#00FFFF#You consume the heart and feel the knowledge of this very old creature fill you!")
who.unused_stats = who.unused_stats + 3
who.unused_talents = who.unused_talents + 1
who.unused_generics = who.unused_generics + 1
......
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