summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.h
diff options
context:
space:
mode:
authorRobert Burnham <burnhamrobertp@gmail.com>2010-06-10 15:37:06 -0500
committerRobert Burnham <burnhamrobertp@gmail.com>2010-06-10 15:40:43 -0500
commite11a34631cb682520dd6209064898dbb3429ff84 (patch)
tree11fdb95dad8648231c70a74e39fd24409a9d6bcb /crawl-ref/source/religion.h
parent9d244e2421d291f0c2ff0c5d1fd50c0155afdc91 (diff)
downloadcrawl-ref-e11a34631cb682520dd6209064898dbb3429ff84.tar.gz
crawl-ref-e11a34631cb682520dd6209064898dbb3429ff84.zip
Modularize get_tension and demonic guardian
Splits get_tension into get_monster_tension without affecting the functionality of get_tension so that one can easily obtain the tension value of an individual monster. This change facilitates the change in guardian which allows for the number of guardians to be balanced based on the current tension. This is achieved by looping through and manually totalling the tension values for each monster, at any given point if the tension is less than random2(mutlevel * 5), remove the next monster we iterate to that is friendly and a demonic guardian. Also nerfs the spawn rate of demons quite significantly.
Diffstat (limited to 'crawl-ref/source/religion.h')
-rw-r--r--crawl-ref/source/religion.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index 83ceb0dea5..4c624ee916 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -11,6 +11,7 @@
#include "enum.h"
#include "externs.h"
#include "ouch.h"
+#include "mon-iter.h"
#include "player.h"
#include "religion-enum.h"
@@ -104,6 +105,7 @@ void religion_turn_start();
void religion_turn_end();
int get_tension(god_type god = you.religion, bool count_travelling = true);
+int get_monster_tension(monster_iterator mons, god_type god = you.religion);
bool do_god_gift(bool prayed_for = false, bool forced = false);