ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Mon Oct 15, 2018 12:42 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Bug: Drowning in Bubbles
PostPosted: Fri Jul 27, 2018 1:27 am 
Offline

Joined: Fri Jul 27, 2018 1:17 am
Posts: 1
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.


Top
 Profile  
 
PostPosted: Fri Jul 27, 2018 8:28 pm 
Offline
Archmage

Joined: Wed Jan 22, 2014 1:46 pm
Posts: 364
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.

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


Top
 Profile  
 
PostPosted: Thu Aug 09, 2018 10:16 pm 
Offline
Cornac

Joined: Wed Jun 06, 2018 10:53 am
Posts: 35
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:
--- 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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group