diff options
-rw-r--r-- | crawl-ref/source/beam.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/cloud.cc | 27 | ||||
-rw-r--r-- | crawl-ref/source/enum.h | 4 | ||||
-rw-r--r-- | crawl-ref/source/godabil.cc | 20 | ||||
-rw-r--r-- | crawl-ref/source/mon-act.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/rltiles/dc-misc.txt | 2 | ||||
-rw-r--r-- | crawl-ref/source/rltiles/effect/cloud_gloom.png | bin | 0 -> 177 bytes | |||
-rw-r--r-- | crawl-ref/source/show.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/tilepick.cc | 4 |
9 files changed, 70 insertions, 2 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 36c47d85b8..49b464b608 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -6396,6 +6396,7 @@ std::string beam_type_name(beam_type type) case BEAM_VISUAL: return ("visual effects"); case BEAM_TORMENT_DAMAGE: return ("torment damage"); case BEAM_STEAL_FOOD: return ("steal food"); + case BEAM_GLOOM: return ("gloom"); case NUM_BEAMS: DEBUGSTR("invalid beam type"); return ("INVALID"); diff --git a/crawl-ref/source/cloud.cc b/crawl-ref/source/cloud.cc index 823164846d..d4c35f363c 100644 --- a/crawl-ref/source/cloud.cc +++ b/crawl-ref/source/cloud.cc @@ -41,6 +41,8 @@ static int _actual_spread_rate(cloud_type type, int spread_rate) switch (type) { + case CLOUD_GLOOM: + return 50; case CLOUD_STEAM: case CLOUD_GREY_SMOKE: case CLOUD_BLACK_SMOKE: @@ -227,6 +229,19 @@ void manage_clouds() dissipate *= 4; else if ((cloud.type == CLOUD_COLD || cloud.type == CLOUD_RAIN) && grd(cloud.pos) == DNGN_LAVA) dissipate *= 4; + else if (cloud.type == CLOUD_GLOOM) + { + int count = 0; + for (adjacent_iterator ai(cloud.pos); ai; ++ai) + if (env.cgrid(*ai) != EMPTY_CLOUD) + if (env.cloud[env.cgrid(*ai)].type == CLOUD_GLOOM) + count++; + + if (count < 4) + dissipate *= 50; + else + dissipate /= 20; + } expose_items_to_element(cloud2beam(cloud.type), cloud.pos, 2); @@ -514,6 +529,8 @@ cloud_type beam2cloud(beam_type flavour) return CLOUD_RAIN; case BEAM_POTION_MUTAGENIC: return CLOUD_MUTAGENIC; + case BEAM_GLOOM: + return CLOUD_GLOOM; case BEAM_RANDOM: return CLOUD_RANDOM; } @@ -539,6 +556,7 @@ beam_type cloud2beam(cloud_type flavour) case CLOUD_CHAOS: return BEAM_CHAOS; case CLOUD_RAIN: return BEAM_POTION_RAIN; case CLOUD_MUTAGENIC: return BEAM_POTION_MUTAGENIC; + case CLOUD_GLOOM: return BEAM_GLOOM; case CLOUD_RANDOM: return BEAM_RANDOM; } } @@ -833,6 +851,11 @@ void in_a_cloud() } break; + case CLOUD_GLOOM: + mprf("You are engulfed in %s!", !name.empty() ? name.c_str() : "a thick gloom"); + + break; + default: break; } @@ -887,6 +910,7 @@ bool is_harmless_cloud(cloud_type type) case CLOUD_MIST: case CLOUD_RAIN: case CLOUD_MAGIC_TRAIL: + case CLOUD_GLOOM: case CLOUD_DEBUGGING: return (true); default: @@ -963,6 +987,8 @@ std::string cloud_name(cloud_type type) return "mutagenic fog"; case CLOUD_MAGIC_TRAIL: return "magical condensation"; + case CLOUD_GLOOM: + return "gloom"; default: return "buggy goodness"; } @@ -1078,6 +1104,7 @@ int get_cloud_colour(int cloudno) case CLOUD_PURPLE_SMOKE: case CLOUD_TLOC_ENERGY: + case CLOUD_GLOOM: which_colour = MAGENTA; break; diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 90b38b78ae..622cee97ad 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -254,6 +254,7 @@ enum beam_type // beam[].flavour BEAM_POTION_BLUE_SMOKE, BEAM_POTION_PURPLE_SMOKE, BEAM_POTION_RAIN, + BEAM_GLOOM, BEAM_POTION_RANDOM, BEAM_LAST_REAL = BEAM_POTION_RANDOM, @@ -420,9 +421,10 @@ enum cloud_type CLOUD_TLOC_ENERGY, CLOUD_FOREST_FIRE, CLOUD_STEAM, + CLOUD_GLOOM, CLOUD_OPAQUE_FIRST = CLOUD_BLACK_SMOKE, - CLOUD_OPAQUE_LAST = CLOUD_STEAM, + CLOUD_OPAQUE_LAST = CLOUD_GLOOM, CLOUD_MIASMA, CLOUD_MIST, diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc index f6a1d82c1d..07b6fd42aa 100644 --- a/crawl-ref/source/godabil.cc +++ b/crawl-ref/source/godabil.cc @@ -536,6 +536,9 @@ bool sunlight() int plant_count = 0; int processed_count = 0; + // This is dealt with outside of the main loop. + int cloud_count = 0; + // FIXME: Uncomfortable level of code duplication here but the explosion // code in bolt subjects the input radius to r*(r+1) for the threshold and // since r is an integer we can never get just the 4-connected neighbours. @@ -634,6 +637,20 @@ bool sunlight() } } + // We damage clousd for a large radius, though. + for (radius_iterator ai(base, 7); ai; ++ai) + { + if (env.cgrid(*ai) != EMPTY_CLOUD) + { + const int cloudidx = env.cgrid(*ai); + if (env.cloud[cloudidx].type == CLOUD_GLOOM) + { + cloud_count++; + delete_cloud(cloudidx); + } + } + } + #ifndef USE_TILE // Move the cursor out of the way (it looks weird). cgotoxy(base.x, base.y, GOTO_DNGN); @@ -650,6 +667,9 @@ bool sunlight() if (evap_count) mprf("Some water evaporates in the bright sunlight."); + if (cloud_count) + mprf("Sunlight penetrates the thick gloom."); + return (processed_count); } diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc index 2065414df9..4120508703 100644 --- a/crawl-ref/source/mon-act.cc +++ b/crawl-ref/source/mon-act.cc @@ -44,6 +44,7 @@ #include "random.h" #include "religion.h" #include "shopping.h" // for item values +#include "spells1.h" #include "state.h" #include "stuff.h" #include "terrain.h" @@ -3454,6 +3455,13 @@ static bool _monster_move(monsters *monster) 2 + random2(3), monster->kill_alignment(), KILL_MON_MISSILE ); } + + // Commented out, but left in as an example of gloom. {due} + //if (monster->type == MONS_SHADOW) + //{ + // big_cloud (CLOUD_GLOOM, monster->kill_alignment(), monster->pos(), 10 + random2(5), 2 + random2(8)); + //} + } else { diff --git a/crawl-ref/source/rltiles/dc-misc.txt b/crawl-ref/source/rltiles/dc-misc.txt index 92329d2dd8..8050483dcd 100644 --- a/crawl-ref/source/rltiles/dc-misc.txt +++ b/crawl-ref/source/rltiles/dc-misc.txt @@ -42,6 +42,8 @@ cloud_rain1 CLOUD_RAIN cloud_rain2 cloud_grey_smoke CLOUD_MIST +cloud_gloom CLOUD_GLOOM + #########MAP %sdir dc-misc %corpse 0 diff --git a/crawl-ref/source/rltiles/effect/cloud_gloom.png b/crawl-ref/source/rltiles/effect/cloud_gloom.png Binary files differnew file mode 100644 index 0000000000..914e500a3c --- /dev/null +++ b/crawl-ref/source/rltiles/effect/cloud_gloom.png diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc index 0148d92438..342c424dcd 100644 --- a/crawl-ref/source/show.cc +++ b/crawl-ref/source/show.cc @@ -272,7 +272,11 @@ void show_def::_update_cloud(int cloudno) const coord_def e = grid2show(env.cloud[cloudno].pos); int which_colour = get_cloud_colour(cloudno); _set_backup(e); - grid(e).cls = SH_CLOUD; + if (env.cloud[cloudno].type != CLOUD_GLOOM) + { + grid(e).cls = SH_CLOUD; + } + grid(e).colour = which_colour; #ifdef USE_TILE diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 9e5b4fd390..913c7855b5 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -2796,6 +2796,10 @@ static int _tileidx_cloud(cloud_struct cl) ch = TILE_CLOUD_RAIN + random2(tile_main_count(TILE_CLOUD_RAIN)); break; + case CLOUD_GLOOM: + ch = TILE_CLOUD_GLOOM; + break; + default: ch = TILE_CLOUD_GREY_SMOKE; break; |