CleverRaven/Cataclysm-DDA — pull request #3302 by gordallott (2013-09-27 15:14:41+00:00)
Title: Smoke changes

I got a little annoyed with how cataclysm current handles coughing so I went ahead and tried out something different to see if it would work. seems like a neat idea to me at least.

Essentially the previous system was, if you stand in smoke, you can get infected with the Smoke disease, the smoke disease will cause you to cough, inflicting a few points of HP damage whenever you do. the Smoke disease lasts for a significant amount of time.

This system means that it is not uncommon to have a character die, not from inhaling smoke in a smokey room, but many turns later from a slight cough.

A similar system is employed for drowning, you lose HP if you do not have gills and go underwater. which means if you go for a swim, you'll come out of the river as if you've been in a fight and lost.

I find both systems rather silly and thus implemented my own idea. Gone is HP damage from coughing and gone is HP damage from drowning. replacing both is a blood oxygen system. every 100 game moves the character breaths and exhausts. breathing restores blood oxygen, exhaust removes blood oxygen. - certain actions will cause slightly more blood oxygen to be depleted.

Breathing is obviously not possible underwater without gills and is restricted in various conditions like when in a smoke tile or if your mouth is encumbered. if you exhaust more of your blood oxygen than you gain from breathing, your blood oxygen level drops.

eventually, you will have low enough blood oxygen that you will feel faint, start falling unconscious (especially problematic in smoke filled buildings) and eventually, if your blood oxygen level gets low enough, instant death.

the blood oxygen system is always in effect, but really shouldn't have any gameplay changes aside from when dealing with large amounts of smoke or diving underwater. under normal circumstances breathing will always restore more blood oxygen than gets depleted.

In addition. coughing has been changed so that instead of it causing a uniform cough loudness, it can vary anywhere between 4-20 (previously 12). very high loudness results in a 'coughing fit' that takes much longer. a quiet cough takes much less time.

on average the cough length and loudness should be unchanged, but I felt that adding more variance there could end up with interesting gameplay results, being able to sneak past monsters if your luck holds off, but then one loud coughing fit causes big problems. things like that.