Achievement "Emancipation" fires incorrectly

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
jotwebe
Uruivellas
Posts: 725
Joined: Fri Apr 15, 2011 6:58 am
Location: GMT+1

Achievement "Emancipation" fires incorrectly

#1 Post by jotwebe »

class/Actor.lua 1352 to 1355 _M:die

Code: Select all

-- 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


If I read this right, "Emancipation" fires when a unique dies while the player* is dead.
Next, the achievement code checks whether the player is dead again (seems redundant?) and
then checks if the player actually is an alchemist:

data/achievements/player.lua

Code: Select all

		
newAchievement{
	name = "Emancipation", id = "EMANCIPATION",
	desc = [[Have the golem kill a boss while its master is already dead.]],
	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
	end,
}


However, it does not really check what caused the unique's death - doesn't have to be the golem.
In fact, the other day Bill was still burning from a firebomb when he killed my alchy, having
dispatched the golem earlier.

So you probably should make sure here that either it was a golem that did the killing stroke, or
as a less stringent version, that the golem is at least still around át the moment the unique died -
maybe it got lured into a trap or something.

Since this was an amusing little adventure, it might be good to have a related achievement:

Code: Select all

newAchievement{
	name = "Sweet Revenge", id = "SWEET_REVENGE",
	desc = [[Take a boss into the grave with you.]],
	mode = "player",
    --implement here 
}
Awarded for killing a Boss after dying yourself - flame/poison/diseases/bleeding all would do...


* well, the player's character, of course. not the player ;)
Ghoul never existed, this never happened!

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Achievement "Emancipation" fires incorrectly

#2 Post by darkgod »

Oh thanks!

Nice report!
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply