From b58fbcfafc44bc2810863a3722bee2e6a8f7d22d Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 7 Dec 2006 07:51:48 +0000 Subject: *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 --- crawl-ref/source/mon-util.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/mon-util.cc') 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 ); -- cgit v1.2.3-54-g00ecf