ToME: the Tales of Maj'Eyal

Bug: Drowning in Bubbles
Page 1 of 1

Author:  Sorenroy [ Fri Jul 27, 2018 1:27 am ]
Post subject:  Bug: Drowning in Bubbles

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.

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.

Author:  Cathbald [ Fri Jul 27, 2018 8:28 pm ]
Post subject:  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.

Author:  BugReporter [ Thu Aug 09, 2018 10:16 pm ]
Post subject:  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.
--- 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 =, 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:setEffect(self.EFF_SUFFOCATING, 1, {dam=20})
      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!
      --self.is_suffocating = false
      --self:removeEffect(self.EFF_SUFFOCATING, false, true)
   return false, true

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 =, self.y, Map.ACTOR) do?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group