diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-07 07:51:48 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-07 07:51:48 +0000 |
commit | b58fbcfafc44bc2810863a3722bee2e6a8f7d22d (patch) | |
tree | 22a1199ad8ca845bfad04590d9dc5e9891ae8960 /crawl-ref/source/mon-util.cc | |
parent | cf61c793d3d3783b2b5a39a8cf01b857806411b2 (diff) | |
download | crawl-ref-b58fbcfafc44bc2810863a3722bee2e6a8f7d22d.tar.gz crawl-ref-b58fbcfafc44bc2810863a3722bee2e6a8f7d22d.zip |
*Breaks save compatibility* - changed monster flags to long, added "god" field for future fun.
dungeon.cc cleanup and rework to support floating vaults.
Updated levcomp to support the float orientation.
coord_def now has a constructor.
USE_RIVERS and USE_NEW_UNRANDS are no longer conditional.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@585 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index f7f1cb0bb4..9c21739029 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -285,6 +285,15 @@ unsigned long get_mons_resists(const monsters *mon) return (resists); } +int mons_piety(const monsters *mon) +{ + if (mon->god == GOD_NO_GOD) + return (0); + + // We're open to fine-tuning. + return (mon->hit_dice * 14); +} + unsigned long mons_resist(const monsters *mon, unsigned long flags) { return (get_mons_resists(mon) & flags); @@ -967,7 +976,6 @@ int exper_value( const struct monsters *monster ) case MS_HELLFIRE_BURST: case MS_HELLFIRE: case MS_TORMENT: - case MS_IRON_BOLT: diff += 25; break; @@ -979,6 +987,7 @@ int exper_value( const struct monsters *monster ) case MS_SUMMON_DEMON_GREATER: case MS_BANISHMENT: case MS_CRYSTAL_SPEAR: + case MS_IRON_BOLT: case MS_TELEPORT: case MS_TELEPORT_OTHER: diff += 10; @@ -1139,6 +1148,8 @@ void define_monster(int index) speed = m->speed; + mons.god = GOD_NO_GOD; + switch (mcls) { case MONS_ABOMINATION_SMALL: @@ -1306,7 +1317,7 @@ void define_monster(int index) mons.speed = speed; mons.speed_increment = 70; mons.number = monnumber; - mons.flags = 0; + mons.flags = 0L; mons.colour = col; mons_load_spells( &mons, spells ); |