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.
			
			
									
									
						Bug: Drowning in Bubbles
Moderator: Moderator
Re: Bug: Drowning in Bubbles
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.
			
			
									
									So yes to bug.
I write guides and make addons too now, apparently
You can go here for a compilation of everything I wrote, plus some other important stuff!
Includes general guides (inscriptions, zone, prodigies), and class guides (Demo, Anorithil, Bulwark, Zerker, Sblade)
						You can go here for a compilation of everything I wrote, plus some other important stuff!
Includes general guides (inscriptions, zone, prodigies), and class guides (Demo, Anorithil, Bulwark, Zerker, Sblade)
- 
				BugReporter
- Higher
- Posts: 62
- Joined: Wed Jun 06, 2018 10:53 am
Re: Bug: Drowning in Bubbles
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.
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?
			
			
									
									
						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