diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-01 22:49:33 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-01 22:49:33 +0000 |
commit | 9d50c76de535f99c039fbd1250eadb8554cedcbb (patch) | |
tree | 587642b0ffc9642cd1198adc292699062b3b311b /crawl-ref | |
parent | 633a81c7f6b92c1e85f9efde063a01bf3ac34f27 (diff) | |
download | crawl-ref-9d50c76de535f99c039fbd1250eadb8554cedcbb.tar.gz crawl-ref-9d50c76de535f99c039fbd1250eadb8554cedcbb.zip |
For Tiles, use some of the other wall types in the Abyss as well to make
it more interesting. The rest is mostly clean-up.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6307 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/abyss.cc | 34 | ||||
-rw-r--r-- | crawl-ref/source/acr.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/effects.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/files.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/lev-pand.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/tile2.cc | 29 | ||||
-rw-r--r-- | crawl-ref/source/tutorial.cc | 28 |
8 files changed, 67 insertions, 43 deletions
diff --git a/crawl-ref/source/abyss.cc b/crawl-ref/source/abyss.cc index 7c9b17cc0e..f0deac1c39 100644 --- a/crawl-ref/source/abyss.cc +++ b/crawl-ref/source/abyss.cc @@ -38,11 +38,13 @@ #include "view.h" #include "xom.h" +// If not_seen is true, don't place the feature where it can be seen from +// the centre. static bool _place_feature_near( const coord_def ¢re, int radius, dungeon_feature_type candidate, dungeon_feature_type replacement, - int tries ) + int tries, bool not_seen = false ) { const int radius2 = radius * radius + 1; for (int i = 0; i < tries; ++i) @@ -50,9 +52,13 @@ static bool _place_feature_near( const coord_def ¢re, const coord_def &cp = centre + coord_def(random_range(-radius, radius), random_range(-radius, radius)); + if (cp == centre || (cp - centre).abs() > radius2 || !in_bounds(cp)) continue; + if (not_seen && grid_see_grid(cp.x, cp.y, centre.x, centre.y)) + continue; + if (grd(cp) == candidate) { #ifdef DEBUG_DIAGNOSTICS @@ -97,8 +103,8 @@ void generate_abyss() if (you.char_direction == GDT_GAME_START) { grd[45][35] = DNGN_ALTAR_LUGONU; - _place_feature_near( coord_def(45, 35), LOS_RADIUS, - DNGN_FLOOR, DNGN_EXIT_ABYSS, 50 ); + _place_feature_near( coord_def(45, 35), LOS_RADIUS + 2, + DNGN_FLOOR, DNGN_EXIT_ABYSS, 50, true ); } else { @@ -228,7 +234,7 @@ static void _generate_area(int gx1, int gy1, int gx2, int gy2, thing_created = items(1, OBJ_MISCELLANY, MISC_RUNE_OF_ZOT, true, 51, 51); placed_abyssal_rune = true; -#if DEBUG_ABYSS +#ifdef DEBUG_ABYSS mpr("Placing an Abyssal rune.", MSGCH_DIAGNOSTICS); #endif } @@ -274,7 +280,7 @@ static void _generate_area(int gx1, int gy1, int gx2, int gy2, { grd[i][j] = DNGN_EXIT_ABYSS; exits_wanted--; -#if DEBUG_ABYSS +#ifdef DEBUG_ABYSS mpr("Placing Abyss exit.", MSGCH_DIAGNOSTICS); #endif } @@ -303,7 +309,7 @@ static void _generate_area(int gx1, int gy1, int gx2, int gy2, grd[i][j] = DNGN_ALTAR_LUGONU; altars_wanted--; -#if DEBUG_ABYSS +#ifdef DEBUG_ABYSS mpr("Placing altar.", MSGCH_DIAGNOSTICS); #endif } @@ -423,7 +429,7 @@ static void _abyss_lose_monster(monsters &mons) void area_shift(void) /*******************/ { -#if DEBUG_ABYSS +#ifdef DEBUG_ABYSS mpr("area_shift().", MSGCH_DIAGNOSTICS); #endif @@ -576,7 +582,7 @@ void abyss_teleport( bool new_area ) if (i < 100) { -#if DEBUG_ABYSS +#ifdef DEBUG_ABYSS mpr("Non-new area Abyss teleport.", MSGCH_DIAGNOSTICS); #endif you.moveto(x, y); @@ -585,7 +591,7 @@ void abyss_teleport( bool new_area ) } } -#if DEBUG_ABYSS +#ifdef DEBUG_ABYSS mpr("New area Abyss teleport.", MSGCH_DIAGNOSTICS); #endif @@ -593,12 +599,13 @@ void abyss_teleport( bool new_area ) // Get new monsters and colours. init_pandemonium(); +#ifdef USE_TILE + tile_init_flavor(); +#endif for (i = 0; i < MAX_MONSTERS; ++i) - { if (menv[i].alive()) _abyss_lose_monster(menv[i]); - } // Orbs and fixed artefacts are marked as "lost in the abyss". for (k = 0; k < MAX_ITEMS; ++k) @@ -629,6 +636,11 @@ void abyss_teleport( bool new_area ) _generate_area(MAPGEN_BORDER, MAPGEN_BORDER, GXM - MAPGEN_BORDER, GYM - MAPGEN_BORDER, true); +#ifdef USE_TILE + // Update the wall colours. + TileLoadWall(true); +#endif + _xom_check_nearness(); grd[you.x_pos][you.y_pos] = DNGN_FLOOR; diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 3777d0951b..7bfe689d1c 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -4086,8 +4086,8 @@ static bool _initialise(void) // recalculated for the next monster that tries to reach us. you.lava_in_sight = you.water_in_sight = -1; - // set vision radius to player's current vision - setLOSRadius( you.current_vision ); + // Set vision radius to player's current vision. + setLOSRadius(you.current_vision); if (newc) // start a new game { diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index d2541ea9c8..2a6a86b555 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -445,6 +445,7 @@ void dgn_set_grid_colour_at(const coord_def &c, int colour) env.grid_colours(c) = colour; if (!dgn_colour_grid.get()) dgn_colour_grid.reset( new dungeon_colour_grid ); + (*dgn_colour_grid)(c) = coloured_feature(grd(c), colour); } } diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 7bb4f2b803..f45762c9b9 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -2114,10 +2114,10 @@ bool vitrify_area(int radius) // This hinges on clear wall types having the same order as non-clear ones! const int clear_plus = DNGN_CLEAR_ROCK_WALL - DNGN_ROCK_WALL; bool something_happened = false; - for ( int x = X_BOUND_1; x <= X_BOUND_2; ++x ) - for ( int y = Y_BOUND_1; y <= Y_BOUND_2; ++y ) + for (int x = X_BOUND_1; x <= X_BOUND_2; ++x) + for (int y = Y_BOUND_1; y <= Y_BOUND_2; ++y) { - if ( distance(x,y,you.x_pos,you.y_pos) < radius2 ) + if (distance(x,y,you.x_pos,you.y_pos) < radius2) { dungeon_feature_type grid = grd[x][y]; diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 7ca2bb266e..96787e87e9 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -1198,7 +1198,7 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode, && load_mode == LOAD_ENTER_LEVEL) { place_followers(); - } // end of moving followers + } // Load monsters in transit. if (load_mode == LOAD_ENTER_LEVEL) @@ -1697,7 +1697,7 @@ bool apply_to_all_dungeons(bool (*applicator)()) _restore_level(original); - return success; + return (success); } static bool _get_and_validate_version(FILE *restoreFile, char &major, char &minor, diff --git a/crawl-ref/source/lev-pand.cc b/crawl-ref/source/lev-pand.cc index a5eac58c7c..f2028b7edf 100644 --- a/crawl-ref/source/lev-pand.cc +++ b/crawl-ref/source/lev-pand.cc @@ -163,8 +163,8 @@ void init_pandemonium(void) if (one_chance_in(10)) env.mons_alloc[7 + random2(3)] = MONS_PIT_FIEND; - // set at least some specific monsters for the special levels - this - // can also be used to set some colours + // Set at least some specific monsters for the special levels - this + // can also be used to set some colours. env.floor_colour = BLACK; env.rock_colour = BLACK; diff --git a/crawl-ref/source/tile2.cc b/crawl-ref/source/tile2.cc index e04679829a..efce722939 100644 --- a/crawl-ref/source/tile2.cc +++ b/crawl-ref/source/tile2.cc @@ -990,7 +990,31 @@ void WallIdx(int &wall, int &floor, int &special) } else if (you.level_type == LEVEL_ABYSS) { - wall = IDX_WALL_UNDEAD; + switch (env.rock_colour) + { + case YELLOW: + case BROWN: + wall = IDX_WALL_HIVE; + break; + case RED: + case LIGHTRED: + wall = IDX_WALL_PEBBLE_RED; + break; + case GREEN: + case LIGHTGREEN: + wall = IDX_WALL_SLIME; + break; + case BLUE: + wall = IDX_WALL_ICE; + break; + case LIGHTGRAY: + case WHITE: + wall = IDX_WALL_HALL; + break; + default: + wall = IDX_WALL_UNDEAD; + break; + } floor = IDX_FLOOR_NERVES; return; } @@ -2046,7 +2070,8 @@ void TilePlayerInit() int gender = 0; for (i = 0; i < TILEP_PARTS_TOTAL; i++) - doll.parts[i] = 0; + doll.parts[i] = 0; + tilep_race_default(you.species, gender, you.experience_level, doll.parts); tilep_job_default(you.char_class, gender, doll.parts); diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index 6251da1299..3c0961da49 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -2563,27 +2563,13 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) break; case TUT_FLEEING_MONSTER: - if (Options.tutorial_type != TUT_BERSERK_CHAR) - return; - - text << "While unsporting, it is sometimes useful to attack a " - "fleeing monster by throwing something after it. To do this, " -#ifdef USE_TILE - "you can choose your firing ammunition by <w>left-clicking</w> " - "on it with your mouse. " - "In the case of weapons (rather than missiles) you need to " - "be pressing <w>Ctrl</w> at the same time, to distinguish " - "the action from wielding. Then target the monster by " - "clicking on it." -#else - "press <w>f</w>, choose a throwing weapon, e.g. one of your " - "spears, use <w>+</w> to select a monster and press " - "<w>.</w>, <w>f</w> or <w>Enter</w>. The closest monster " - "will be autoselected. If you've got the fire_order option " - "set you can directly use <w>ff</w> or <w>f+.</w> instead; " - "the game will pick the first weapon that fits the option." -#endif - "\nIf you miss, you can fire at it again with <w>ff</w>."; + text << "Now that monster is scared of you! Note that you do not " + "absolutely have to follow it. Rather, you can let it run " + "away. Sometimes, though, it can be useful to attack a " + "fleeing creature by throwing something after it. If you " + "have any daggers or hand axes in your <w>i</w>nventory you " + "can look at one of them to read an explanation of how to do " + "this."; break; case TUT_MONSTER_BRAND: |