diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-14 20:47:04 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-14 20:47:04 +0000 |
commit | b6c69a86519c6bb8a69ca7074350cdc496968ac6 (patch) | |
tree | f4b2b9bd70c0691c9b37bb8235d6ff2987439f3f /crawl-ref/source/beam.cc | |
parent | f03320c66fd006bd233cdca9490adfa9179339d3 (diff) | |
download | crawl-ref-b6c69a86519c6bb8a69ca7074350cdc496968ac6.tar.gz crawl-ref-b6c69a86519c6bb8a69ca7074350cdc496968ac6.zip |
Consolidate beam and cloud handling routines a bit, and allow clouds to
destroy items on the floor where applicable. Also allow grey smoke as a
random potion effect from Evaporate.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5040 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index ba1c34c536..dcd1664677 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -2413,6 +2413,7 @@ static void _beam_explodes(bolt &beam, int x, int y) break; case BEAM_POTION_STEAM: + case BEAM_POTION_GREY_SMOKE: beam.colour = LIGHTGREY; break; @@ -2920,52 +2921,33 @@ static void _affect_place_explosion_clouds(bolt &beam, int x, int y) switch (beam.flavour) { case BEAM_POTION_STINKING_CLOUD: - cl_type = CLOUD_STINK; - break; - case BEAM_POTION_POISON: - cl_type = CLOUD_POISON; - break; - case BEAM_POTION_MIASMA: - cl_type = CLOUD_MIASMA; - break; - - case BEAM_POTION_BLACK_SMOKE: - cl_type = CLOUD_BLACK_SMOKE; - break; - + case BEAM_POTION_STEAM: case BEAM_POTION_FIRE: - cl_type = CLOUD_FIRE; - break; - case BEAM_POTION_COLD: - cl_type = CLOUD_COLD; - break; - + case BEAM_POTION_BLACK_SMOKE: + case BEAM_POTION_GREY_SMOKE: case BEAM_POTION_BLUE_SMOKE: - cl_type = CLOUD_BLUE_SMOKE; - break; - case BEAM_POTION_PURP_SMOKE: - cl_type = CLOUD_PURP_SMOKE; + cl_type = beam2cloud(beam.flavour); break; case BEAM_POTION_RANDOM: - switch (random2(10)) + switch (random2(11)) { case 0: cl_type = CLOUD_FIRE; break; case 1: cl_type = CLOUD_STINK; break; case 2: cl_type = CLOUD_COLD; break; case 3: cl_type = CLOUD_POISON; break; case 4: cl_type = CLOUD_BLACK_SMOKE; break; - case 5: cl_type = CLOUD_BLUE_SMOKE; break; - case 6: cl_type = CLOUD_PURP_SMOKE; break; + case 5: cl_type = CLOUD_GREY_SMOKE; break; + case 6: cl_type = CLOUD_BLUE_SMOKE; break; + case 7: cl_type = CLOUD_PURP_SMOKE; break; default: cl_type = CLOUD_STEAM; break; } break; - case BEAM_POTION_STEAM: default: cl_type = CLOUD_STEAM; break; |