diff options
author | Robert Burnham <burnhamrobertp@gmail.com> | 2010-06-10 15:37:06 -0500 |
---|---|---|
committer | Robert Burnham <burnhamrobertp@gmail.com> | 2010-06-10 15:40:43 -0500 |
commit | e11a34631cb682520dd6209064898dbb3429ff84 (patch) | |
tree | 11fdb95dad8648231c70a74e39fd24409a9d6bcb /crawl-ref/source/religion.h | |
parent | 9d244e2421d291f0c2ff0c5d1fd50c0155afdc91 (diff) | |
download | crawl-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.h | 2 |
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); |