Page 1 of 1
Bug: Drowning in Bubbles
Posted: Fri Jul 27, 2018 1:27 am
by Sorenroy
I found this playing as a Yeek in the level
Murgol Lair. After auto-exploring too far I was low on air with no nearby air bubbles. By the time I got to any I had begun to suffocate. Rather than stopping the suffocation, all that the air bubbles did was refill my air meter. As such, by the time I died of suffocation, I was sitting around 60 air. While I haven't been playing this game for very long I don't think this is how this mechanic is supposed to work.
https://i.imgur.com/H4JmQKP.jpg
I was also successful when trying to replicate it. All that I needed to do was go back to
Murgol Lair, wait till I started drowning, and then step on another patch of air bubbles. If this is not a bug, please let me know, and if it is, hopefully it's an easy fix for the game's next release.
Re: Bug: Drowning in Bubbles
Posted: Fri Jul 27, 2018 8:28 pm
by Cathbald
Indeed, if you start suffocating you need to go back to a not submerged tile to stop, simply being on bubbles does not work for some reason.
So yes to bug.
Re: Bug: Drowning in Bubbles
Posted: Thu Aug 09, 2018 10:16 pm
by BugReporter
I can confirm this bug.
There is a function _M:suffocate (line 6225 in ..\mod\class\Actor.lua) which adds the suffocating effect when at 0 air. Suffocating effect (line 2288 in ..\data\timed_effects\other.lua) has a way to remove it. If I understood it correctly it can be cleared with self.is_suffocating = false (using other.lua code) or by self:removeEffect directly when air > 0.
Code: Select all
--- Suffocate a bit, lose air
function _M:suffocate(value, src, death_message)
if self:attr("no_breath") then return false, false end
if self:attr("invulnerable") then return false, false end
self.air = self.air - value
local ae = game.level.map(self.x, self.y, Map.ACTOR)
self.force_suffocate = true
if self.air <= 0 then
self.air = 0
if not self:hasEffect(self.EFF_SUFFOCATING) then
game.logSeen(self, "#LIGHT_RED#%s starts suffocating to death!", self.name:capitalize())
self:setEffect(self.EFF_SUFFOCATING, 1, {dam=20})
end
return false, true
-- return self:die(src, {special_death_msg=death_message or "suffocated to death"}), true
--!Uncomment else and either of the 2 following lines!
--else
--self.is_suffocating = false
--self:removeEffect(self.EFF_SUFFOCATING, false, true)
end
return false, true
end
PS. Interestingly enough air_level is negative. It is passed to suffocate function as (-air_level), then self.air is reduced by this value (self.air - (-air_level)). I'm really confused here. Also, what does
local ae = game.level.map(self.x, self.y, Map.ACTOR) do?