Achievement "Emancipation" fires incorrectly
Posted: Wed Apr 20, 2011 1:56 pm
class/Actor.lua 1352 to 1355 _M:die
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
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:
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
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
}
* well, the player's character, of course. not the player
