KhymChanur: (2.2.7, ToME) If I'm weilding a mana-draining weapon, and INT+WIS isn't enough to regenerate mana faster than the drain, my mana goes to zero. This is fine, except that I periodically regen my mana to 1, which gets immediately drained, and this causes resting to silently stop. Rather annoying.

NeilStevens: Just take off your weapon when you rest if necessary. Mana drain is supposed to be a penalty. That said, I don't know what we should do about this.

SoulWynd: Incribe @w1 on your weapon, macro something to taR*w1 ... Fastest solution I can think of right now.

KhymChanur: Yes, but when I'm weilding an elemental weapon at dungeon level 40, with it being my only source of poison resistence, I'm a bit reluctant to let go of it.

MayLith: Ick, I can see why you wouldn't want to unwield it then. Still, as Neil said, mana drain is suppposed to be a penalty. I'd say either find another source of rpoison, or just deal with it. It doesn't seem a bug to me.

SoulWynd: Yes, but not being able to rest normaly is quite annoying.

I've hard swordmasters with mana drain weapons and it gets really frustrating with time. I use the macro I said up there but the disavantage is that you lose a round if the rest is interrupted. It would be okay to stay with 0 mana while resting normaly.

NeilStevens: I'd love to get rid of this annoyance, if I had any good ideas for how.

MayLith: I don't know how the code is set up, but might it be possible to add a user option of "do not disturb for changes in mana", or something like that?

SoulWynd: Just need to get someone to code a fix for it. A conditional at mana regen to check if you have the mana drain flag and 0 mana and if you do, don't regen the mana at all, leave it at 0.

NeilStevens: I WOULD code a fix for it if someone would suggest an idea that would work. If you don't disturb when mana hits 0, then you end up resting forever (an infinite loop I fixed a few versions ago). Ignoring mana completely when resting hurts people who care about mana (imagine playing a sorceror, resting your mana down to 0 without noticing, then getting surprised by a pack of greater hrus or something. I'd want to be alerted RIGHT AWAY, not later). I just don't see a way out.

SoulWynd: Okay, apparently my engrish isn't as good as logic.

At mana regeneration function:

if affected by mana drain AND current mana == 0
    mana regeneration = 0

If you want your mana back, take off the item. Simple as that.

NeilStevens: That changes the effects of mana drain. It doesn't fix the problem of the resting UI, meaning it just puts off the problem to be solved another day. I'd rather not do that.

KhymChanur: Could mana drain and mana regen be combined into a single step, so you put INT, WIS and mana-drain-status through a function to get a "change_mana_by" variable that you apply to the player's mana count? That way if the mana-drain rate exceed the INT+WIS regen rate, then nothing will happen.

ReenenLaurie: An option on the '=' screen... wait for full mana when resting? Though I believe that tome has too many options as it is, and it gets overwhelming. Maybe a 'options', and 'advanced options' kinda menu, and most people won't change the 'advanced' options.

NeilStevens: So far, an interface option is the only thing that could work, but I'm not sure if I like it.

PermanentInk: I like Khym's suggestion to just combine the two rates into a "net mana change" rate -- that would result in less exposure of implementation artifacts such as this bug. Alternately, why not just avoid disturbance based on mana being drained? Furthermore, please note that a similar issue exists for Summoners who are at their limit for partials -- mana's stuck at zero (or occasionally flicks to 1) and rest is constantly interrupted.

BugReport105 (last edited 2006-03-02 00:19:54 by NeilStevens)