TheDarklingWolf/Cataclysm-DDA — pull request #1113 by i2amroy (2013-05-21 00:51:08+00:00)
Title: Adds Pyromaniac trait

This adds a -3 "Pyromaniac" trait as per requested in #926. Players with the trait will gain morale for lighting fires and for watching fires burn (based on fire size) and grow. Players also will steadily lose morale at a rate of -1 approximately every 30 minutes (1 hour with Prozac, and doubled while sleeping). When overall morale reaches -12 they gain a 1% chance attempt to light any tile with flammable objects in it that they leave, this goes up by 1% for each -2 on morale below -12 (2% at -14, etc.). This grants the usual bonus for successfully lighting fires, but will grant a penalty instead if the user doesn't have anything to make a fire with (matches, etc.).

This trait can give up to +/- 100 morale, but any positive morale benefits degrade twice as fast (losing 2 per minute instead of 1) meaning that even at high ends the bonus goes away extremely quickly. The end result is a single morale modifier that very slowly decreases while below zero and rapidly decreases while above zero.

This commit also adds in the ability for the game to handle symmetrical +/- morale bonuses in a single morale modifier (-100 to +100 for Pyromaniac, for example) as long as the morale max bonus is set to the negative when subtracting and positive when adding (through the addition of the ">=" in player.cpp).