From 9123616c1c2a40835af8841d7a1259e2a6382635 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sun, 4 Apr 2010 13:19:08 +0000
Subject: [PATCH]                  fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@499 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/engine/interface/WorldAchievements.lua   | 2 +-
 game/modules/tome/class/Actor.lua             | 1 +
 game/modules/tome/data/achievements/kills.lua | 3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/game/engine/interface/WorldAchievements.lua b/game/engine/interface/WorldAchievements.lua
index c191a0076b..74482a25f4 100644
--- a/game/engine/interface/WorldAchievements.lua
+++ b/game/engine/interface/WorldAchievements.lua
@@ -69,7 +69,7 @@ function _M:gainAchievement(id, src, ...)
 	local a = self.achiev_defs[id]
 	if not a then error("Unknown achievement "..id) return end
 	if self.achieved[id] then return end
-
+print("CHECK ACHIEV", id, src.name)
 	if a.can_gain then
 		local data = nil
 		if a.mode == "world" then
diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua
index 2c1d6dfde8..e5ba106f71 100644
--- a/game/modules/tome/class/Actor.lua
+++ b/game/modules/tome/class/Actor.lua
@@ -365,6 +365,7 @@ function _M:die(src)
 	-- Achievements
 	if src and src:resolveSource().player then
 		if src:resolveSource().life == 1 then world:gainAchievement("THAT_WAS_CLOSE", src:resolveSource()) end
+		world:gainAchievement("EXTERMINATOR", src:resolveSource(), self)
 		world:gainAchievement("PEST_CONTROL", src:resolveSource(), self)
 	end
 
diff --git a/game/modules/tome/data/achievements/kills.lua b/game/modules/tome/data/achievements/kills.lua
index e86ac0d6d2..7c55fdfe12 100644
--- a/game/modules/tome/data/achievements/kills.lua
+++ b/game/modules/tome/data/achievements/kills.lua
@@ -31,6 +31,7 @@ newAchievement{
 	mode = "player",
 	can_gain = function(self, who)
 		self.nb = (self.nb or 0) + 1
+		print(self.nb, "***")
 		if self.nb >= 1000 then return true end
 	end
 }
@@ -39,7 +40,7 @@ newAchievement{
 	desc = [[Killed 1000 reproducing vermins]],
 	mode = "player",
 	can_gain = function(self, who, target)
-		if target:hasTalent(target.T_MULTIPLY) then
+		if target:knowTalent(target.T_MULTIPLY) then
 			self.nb = (self.nb or 0) + 1
 			if self.nb >= 1000 then return true end
 		end
-- 
GitLab