diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-06 23:00:57 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-06 23:00:57 +0000 |
commit | 7b30912a9981afe8e36b34420f205b606c959ade (patch) | |
tree | f1f8f7b8f708383c1eac048cc4ce9ecabf869231 | |
parent | 0e92e916d1637fa80ba3507d6f5ebd5063385876 (diff) | |
download | crawl-ref-7b30912a9981afe8e36b34420f205b606c959ade.tar.gz crawl-ref-7b30912a9981afe8e36b34420f205b606c959ade.zip |
Add more minor cosmetic fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9357 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/Kills.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/monplace.cc | 34 |
4 files changed, 22 insertions, 21 deletions
diff --git a/crawl-ref/source/Kills.cc b/crawl-ref/source/Kills.cc index b40e6b3a39..bc61b59af5 100644 --- a/crawl-ref/source/Kills.cc +++ b/crawl-ref/source/Kills.cc @@ -846,7 +846,7 @@ static int kill_lualc_symbol(lua_State *ls) case kill_monster_desc::M_ZOMBIE: case kill_monster_desc::M_SKELETON: case kill_monster_desc::M_SIMULACRUM: - ch = mons_zombie_size(ke->monnum) == Z_SMALL? 'z' : 'Z'; + ch = mons_zombie_size(ke->monnum) == Z_SMALL ? 'z' : 'Z'; break; case kill_monster_desc::M_SPECTRE: ch = 'W'; diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 8bef417413..cfba2e8b16 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -4607,9 +4607,8 @@ int dgn_place_monster(mons_spec &mspec, int tries = 100; do - { mg.cls = pick_random_monster(mspec.place, lev, lev); - } while (mg.cls != MONS_PROGRAM_BUG + while (mg.cls != MONS_PROGRAM_BUG && mons_class_is_zombified(mspec.monbase) && !mons_zombie_size(mg.cls) && tries-- > 0); diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 9ba6c775c5..52036621cb 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -3649,13 +3649,13 @@ int monsters::body_weight() const { int mclass = type; - switch(mclass) + switch (mclass) { case MONS_SPECTRAL_THING: case MONS_SPECTRAL_WARRIOR: case MONS_ELECTRIC_GOLEM: case MONS_RAKSHASA_FAKE: - return 0; + return (0); case MONS_ZOMBIE_SMALL: case MONS_ZOMBIE_LARGE: diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 7e7ce4e85f..f451f59b62 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -1228,15 +1228,15 @@ static monster_type _pick_random_zombie() zombifiable.push_back(mcls); } } - return (zombifiable[ random2(zombifiable.size()) ]); + return (zombifiable[random2(zombifiable.size())]); } -static void _define_zombie( int mid, monster_type ztype, - monster_type cs, int power, coord_def pos ) +static void _define_zombie(int mid, monster_type ztype, monster_type cs, + int power, coord_def pos) { - monster_type cls = MONS_PROGRAM_BUG; - monster_type mons_sec2 = MONS_PROGRAM_BUG; - int zombie_size = 0; + monster_type cls = MONS_PROGRAM_BUG; + monster_type mons_sec2 = MONS_PROGRAM_BUG; + zombie_size_type zombie_size = Z_NOZOMBIE; bool ignore_rarity = false; if (power > 27) @@ -1258,7 +1258,6 @@ static void _define_zombie( int mid, monster_type ztype, break; case MONS_SPECTRAL_THING: - zombie_size = -1; break; default: @@ -1294,14 +1293,14 @@ static void _define_zombie( int mid, monster_type ztype, // such as the Temple, HoB, and Slime Pits. if (you.level_type != LEVEL_DUNGEON || player_in_hell() - || player_in_branch( BRANCH_HALL_OF_ZOT ) - || player_in_branch( BRANCH_VESTIBULE_OF_HELL ) - || player_in_branch( BRANCH_ECUMENICAL_TEMPLE ) - || player_in_branch( BRANCH_CRYPT ) - || player_in_branch( BRANCH_TOMB ) - || player_in_branch( BRANCH_HALL_OF_BLADES ) - || player_in_branch( BRANCH_SNAKE_PIT ) - || player_in_branch( BRANCH_SLIME_PITS ) + || player_in_branch(BRANCH_HALL_OF_ZOT) + || player_in_branch(BRANCH_VESTIBULE_OF_HELL) + || player_in_branch(BRANCH_ECUMENICAL_TEMPLE) + || player_in_branch(BRANCH_CRYPT) + || player_in_branch(BRANCH_TOMB) + || player_in_branch(BRANCH_HALL_OF_BLADES) + || player_in_branch(BRANCH_SNAKE_PIT) + || player_in_branch(BRANCH_SLIME_PITS) || one_chance_in(1000)) { ignore_rarity = true; @@ -1320,8 +1319,11 @@ static void _define_zombie( int mid, monster_type ztype, // Size must match, but you can make a spectral thing out // of anything. - if (zombie_size != -1 && mons_zombie_size(cls) != zombie_size) + if (cs != MONS_SPECTRAL_THING + && mons_zombie_size(cls) != zombie_size) + { continue; + } if (cs == MONS_SKELETON_SMALL || cs == MONS_SIMULACRUM_SMALL) { |