Difference between revisions of "Talk:Drain strength"

From NetHackWiki
Jump to navigation Jump to search
(Sustain ability)
Line 18: Line 18:
 
:I'm not sure why you didn't see strength drop below 4. The source code isn't modified in SLASH'EM as far as I can tell, and I'm pretty sure I'm reading it correctly. Additionally, this max HP loss can occur with poisonous corpses as well, as the same function is used for both the monster spell and poisonous corpses, and anything else that drains str (becoming weak, potions of sickness, poisonous fountains, etc). -- [[User:Qazmlpok|Qazmlpok]] 04:08, 22 December 2011 (UTC)
 
:I'm not sure why you didn't see strength drop below 4. The source code isn't modified in SLASH'EM as far as I can tell, and I'm pretty sure I'm reading it correctly. Additionally, this max HP loss can occur with poisonous corpses as well, as the same function is used for both the monster spell and poisonous corpses, and anything else that drains str (becoming weak, potions of sickness, poisonous fountains, etc). -- [[User:Qazmlpok|Qazmlpok]] 04:08, 22 December 2011 (UTC)
 
::Maybe it has something to do with lycanthropes - I was using a lycanthrope ranger (random choice). I just tried it with a human barbarian, and indeed Str was drained to 3.  But I tried the lycanthrope ranger again, and Str was only drained to 4, then it started taking from max hp, as usual.  And trying with a ring of sustain ability shows you are quite correct: it protects against the strength drain, but not the possible HP drain.  So it stops your 18/20 Str valkyrie or barbarian from suffering max HP loss, but not your 7 Str wizard. -[[User:Ion frigate|Ion frigate]] 08:32, 22 December 2011 (UTC)
 
::Maybe it has something to do with lycanthropes - I was using a lycanthrope ranger (random choice). I just tried it with a human barbarian, and indeed Str was drained to 3.  But I tried the lycanthrope ranger again, and Str was only drained to 4, then it started taking from max hp, as usual.  And trying with a ring of sustain ability shows you are quite correct: it protects against the strength drain, but not the possible HP drain.  So it stops your 18/20 Str valkyrie or barbarian from suffering max HP loss, but not your 7 Str wizard. -[[User:Ion frigate|Ion frigate]] 08:32, 22 December 2011 (UTC)
 +
::I'm guessing the difference with lycanthropes probably comes from the fact that their natural max strength is 19 - I'm guessing that might throw off the ABASE, and thus ustr, somehow. -[[User:Ion frigate|Ion frigate]] 09:07, 22 December 2011 (UTC)

Revision as of 09:07, 22 December 2011

Can we have an article on stat draining in general? Is it permanent if not cured? I think a unicorn horn and potion of restore ability can heal drained strength but are there other ways? DemonDoll 20:57, 29 May 2009 (UTC)

Feel free to make an article on stat loss. However, strength is the only stat that can be drained by a monster spell. It is "permanent" in that any further changes will start from your current stat, e.g. you can push boulder to exercise your strength back up. Unicorn horn, prayer, restore ability (potion/spell) are the most common ways to heal it, but there are more obscure ways (see food poisoning for a list of pointers where to look). The exception is stat loss due to polymorphing in a new version of yourself, it cannot be healed. -Tjr 15:55, 1 June 2009 (UTC)
I stand corrected, quasits can drain dexterity, energy vortices maximum power etc. See magic cancellation for a list. -Tjr 14:10, 17 June 2009 (UTC)

Sustain ability

So wizmode testing in SLASH'EM seems to suggest a couple things:

  • You start losing max hp at Str 4, not 3 (i.e. strength doesn't drop below 4)
  • It definitely seems that sustain ability blocks the stat drain. But, if you're already at the minimum strength, it doesn't seem to block the HP loss. I'm not sure about marginal cases - i.e., if you have 7 strength, sustain ability, and get drained for 6 - do you lose no max hp, or do you lose 18 (because, without sustain ability, you would have dropped to strength 1)?

I'll try to do some more controlled tests on this later, though if someone wants to try in the mean time, feel free. Admittedly, this is all pretty minor, since you very rarely don't have magic resistance or Elbereth when facing monsters who can cast this spell. -Ion frigate 02:11, 22 December 2011 (UTC)

According to losestr (attrib.c, line 178):
  • A temporary strength integer (ustr) is set to your current strength minus the 'damage' done.
  • If this is less than 3, the 'damage' is carried over to your hitpoints, both current and maximum. ustr is incremented, 'damage' is decreased, and 6 HP are taken away until ustr is at least 3.
    • If you are polymorphed, your polymorphed form loses HP, not your natural form. The HP damage is also done at once; if you have 8 max HP and lose 42 from drainstrength, the excess is wasted
  • Your strength is then reduced by the 'damage', after the reduction takes place.
    • If you have fixed attributes, this does not occur.
I'm not sure why you didn't see strength drop below 4. The source code isn't modified in SLASH'EM as far as I can tell, and I'm pretty sure I'm reading it correctly. Additionally, this max HP loss can occur with poisonous corpses as well, as the same function is used for both the monster spell and poisonous corpses, and anything else that drains str (becoming weak, potions of sickness, poisonous fountains, etc). -- Qazmlpok 04:08, 22 December 2011 (UTC)
Maybe it has something to do with lycanthropes - I was using a lycanthrope ranger (random choice). I just tried it with a human barbarian, and indeed Str was drained to 3. But I tried the lycanthrope ranger again, and Str was only drained to 4, then it started taking from max hp, as usual. And trying with a ring of sustain ability shows you are quite correct: it protects against the strength drain, but not the possible HP drain. So it stops your 18/20 Str valkyrie or barbarian from suffering max HP loss, but not your 7 Str wizard. -Ion frigate 08:32, 22 December 2011 (UTC)
I'm guessing the difference with lycanthropes probably comes from the fact that their natural max strength is 19 - I'm guessing that might throw off the ABASE, and thus ustr, somehow. -Ion frigate 09:07, 22 December 2011 (UTC)