summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-29 20:42:33 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-29 20:42:33 +0000
commit335bc1e39a376c5964b2bbe06d92876d7f5292c2 (patch)
tree557cf2cfe5f938f45130bd2b3125c693d905ad22 /crawl-ref
parent5158a056d86e67830f501adfab9fe3cd82e0e3bb (diff)
downloadcrawl-ref-335bc1e39a376c5964b2bbe06d92876d7f5292c2.tar.gz
crawl-ref-335bc1e39a376c5964b2bbe06d92876d7f5292c2.zip
No water monsters in the Crypt (David.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1398 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/acr.cc4
-rw-r--r--crawl-ref/source/dungeon.cc6
-rw-r--r--crawl-ref/source/monplace.cc11
-rw-r--r--crawl-ref/source/monplace.h4
4 files changed, 12 insertions, 13 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index a40ab9fb4e..b37ec439eb 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -2331,8 +2331,8 @@ static void world_reacts()
&& !player_in_branch( BRANCH_ECUMENICAL_TEMPLE )
&& one_chance_in((you.char_direction == DIR_DESCENDING) ? 240 : 10))
{
- int prox = (one_chance_in(10) ? PROX_NEAR_STAIRS
- : PROX_AWAY_FROM_PLAYER);
+ proximity_type prox = (one_chance_in(10) ? PROX_NEAR_STAIRS
+ : PROX_AWAY_FROM_PLAYER);
// The rules change once the player has picked up the Orb...
if (you.char_direction == DIR_ASCENDING)
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 81402b0549..9bdc1021ec 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -2027,10 +2027,10 @@ static void builder_monsters(int level_number, char level_type, int mon_wanted)
no_monster_zones );
place_uniques(level_number, level_type);
- place_aquatic_monsters(level_number, level_type);
- // Special handling
- if (player_in_branch( BRANCH_CRYPT ))
+ if ( !player_in_branch(BRANCH_CRYPT) ) // no water creatures in the Crypt
+ place_aquatic_monsters(level_number, level_type);
+ else
{
if (one_chance_in(3))
mons_place( MONS_CURSE_SKULL, BEH_SLEEP, MHITNOT, false, 0, 0 );
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index bb22598a7c..704c74e333 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -134,7 +134,7 @@ static bool need_moderate_ood(int lev_mons)
bool place_monster(int &id, int mon_type, int power, char behaviour,
int target, bool summoned, int px, int py, bool allow_bands,
- int proximity, int extra, int dur,
+ proximity_type proximity, int extra, int dur,
const dgn_region_list &forbidden)
{
int band_size = 0;
@@ -369,8 +369,6 @@ bool place_monster(int &id, int mon_type, int power, char behaviour,
proxOK = (pval > 0);
break;
- default:
- break;
}
if (!proxOK)
@@ -1199,8 +1197,8 @@ void mark_interesting_monst(struct monsters* monster, char behaviour)
// PUBLIC FUNCTION -- mons_place().
int mons_place( int mon_type, char behaviour, int target, bool summoned,
- int px, int py, int level_type, int proximity, int extra,
- int dur, bool permit_bands )
+ int px, int py, int level_type, proximity_type proximity,
+ int extra, int dur, bool permit_bands )
{
int mon_count = 0;
int temp_rand; // probability determination {dlb}
@@ -1363,7 +1361,8 @@ int create_monster( int cls, int dur, int beha, int cr_x, int cr_y,
if (pos.x != -1 && pos.y != -1)
{
summd = mons_place( cls, beha, hitting, true, pos.x, pos.y,
- you.level_type, 0, zsec, dur, permit_bands );
+ you.level_type, PROX_ANYWHERE, zsec,
+ dur, permit_bands );
}
// determine whether creating a monster is successful (summd != -1) {dlb}:
diff --git a/crawl-ref/source/monplace.h b/crawl-ref/source/monplace.h
index 961e152c3a..505f2f1207 100644
--- a/crawl-ref/source/monplace.h
+++ b/crawl-ref/source/monplace.h
@@ -39,7 +39,7 @@
* *********************************************************************** */
int mons_place( int mon_type, char behaviour, int target, bool summoned,
int px, int py, int level_type = LEVEL_DUNGEON,
- int proximity = PROX_ANYWHERE, int extra = 250,
+ proximity_type proximity = PROX_ANYWHERE, int extra = 250,
int dur = 0, bool permit_bands = false );
// last updated 12may2000 {dlb}
@@ -80,7 +80,7 @@ int summon_any_demon( char demon_class );
* *********************************************************************** */
bool place_monster( int &id, int mon_type, int power, char behaviour,
int target, bool summoned, int px, int py, bool allow_bands,
- int proximity = PROX_ANYWHERE, int extra = 250,
+ proximity_type proximity = PROX_ANYWHERE, int extra = 250,
int dur = 0,
const dgn_region_list &proscribed = dgn_region_list() );