Apply 1895318, with some cleanup.

This patch implements dploog's suggestion of hysteresis on piety. gain/lose_piety() adjust you.piety_hysteresis first; you.piety is modified with the leftovers (if any) once the hysteresis reaches its limit.

Players start out at the upper end of the hysteresis region, meaning there is no lag on piety increase, but a lag on piety decrease.

Hysteresis value set by "#define PIETY_HYSTERESIS_LIMIT 1"

Does not break old saves.

git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3562 c06c8d41-db1a-0410-9941-cceddc491573

Created by  pauldubois  on March 9, 2008
FS4MVTH4EEEECLEAO2FTNK5CLF2PHFYO2JZHC2YEOKYLWXRDRU6AC
Change contents