Unhealable and poisoned

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
tamanegi
Posts: 142
Joined: August 25th, 2014, 11:38 am
Location: Japan

Unhealable and poisoned

Post by tamanegi »

Hi everyone,

I have a question about "poisoned" and "unhealable" statuses. If an unit has both of "poisoned" and "unhealable" statuses, the unit does not take a poison damage in the beginning of its side's turn. Is this an expected or a buggy result? :cry:

I could not find any detailed descriptions about this situation. I also briefly checked the source code (void calculate_healing at actions/heal.cpp). It looks like an unhealable unit never takes poison damage in the beginning of the turn, since the block concerning poison damage is skipped for unhealable units (i assume the skipped block containing the call of poison_progress deals with poison damages)...
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel
User avatar
Elvish_Hunter
Forum Moderator
Posts: 1444
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: Unhealable and poisoned

Post by Elvish_Hunter »

tamanegi wrote:Is this an expected or a buggy result?
I'd say that this is a buggy result, caused by the fact that it's very rare to find a unit that is both poisoned and unhealable.
My guess is that the correct behaviour should be that, in this case, the unit should suffer the poison's damage; however, what should be the correct behaviour about poison removal on unhealable units? Should a healer be able to remove the poison, or just to stop its effects for the turn, or maybe not be able to help at all? :hmm:
Current maintainer of these add-ons:
1.14: The Sojournings of Grog, A Rough Life, The White Troll (co-author), Wesnoth Lua Pack
1.12: Children of Dragons
User avatar
tamanegi
Posts: 142
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: Unhealable and poisoned

Post by tamanegi »

Thank you, Elvish_Hunter.
Now I understand the unhealable is rarely used, and complicated situations such as unhealable as well as poisoned are not seriously cared. :cry: I don't know it is a bug, but at least it looks strange for me. For curing poison of unhealable unit, i prefer "just to stop effects for the turn" or "able to remove poison"... But any of these three possibilities sounds reasonable. I wonder why "unhealable" status is implemented... :hmm:

(The both poisoned and unhealable situation happens in my campaign and is reported by Konrad2; i was not aware of that, since it is a rare case).
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel
Post Reply