rendered paste bodydiff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.ccindex ce23da9..809a4ff 100644--- a/crawl-ref/source/beam.cc+++ b/crawl-ref/source/beam.cc@@ -3211,6 +3211,7 @@ void bolt::affect_place_explosion_clouds() case BEAM_POTION_GREY_SMOKE: case BEAM_POTION_BLUE_SMOKE: case BEAM_POTION_PURP_SMOKE:+ case BEAM_POTION_MUTAGENIC: cl_type = beam2cloud(flavour); break; @@ -5995,6 +5996,7 @@ std::string beam_type_name(beam_type type) case BEAM_POTION_BLUE_SMOKE: return("blue smoke"); case BEAM_POTION_PURP_SMOKE: return("purple smoke"); case BEAM_POTION_RANDOM: return("random potion");+ case BEAM_POTION_MUTAGENIC: return("mutagenic fog"); case BEAM_VISUAL: return("visual effects"); case BEAM_TORMENT_DAMAGE: return("torment damage"); case BEAM_STEAL_FOOD: return("steal food");diff --git a/crawl-ref/source/cloud.cc b/crawl-ref/source/cloud.ccindex 5d503f7..de7af28 100644--- a/crawl-ref/source/cloud.cc+++ b/crawl-ref/source/cloud.cc@@ -26,6 +26,8 @@ REVISION("$Rev$"); #include "stuff.h" #include "terrain.h" #include "view.h"+#include "mutation.h"+#include "tutorial.h" static int _actual_spread_rate(cloud_type type, int spread_rate) {@@ -407,6 +409,8 @@ cloud_type beam2cloud(beam_type flavour) return CLOUD_MIASMA; case BEAM_CHAOS: return CLOUD_CHAOS;+ case BEAM_POTION_MUTAGENIC:+ return CLOUD_MUTAGENIC; case BEAM_RANDOM: return CLOUD_RANDOM; }@@ -429,6 +433,7 @@ beam_type cloud2beam(cloud_type flavour) case CLOUD_STEAM: return BEAM_STEAM; case CLOUD_MIASMA: return BEAM_MIASMA; case CLOUD_CHAOS: return BEAM_CHAOS;+ case CLOUD_MUTAGENIC: return BEAM_POTION_MUTAGENIC; case CLOUD_RANDOM: return BEAM_RANDOM; } }@@ -679,6 +684,21 @@ void in_a_cloud() ouch(hurted, cl, KILLED_BY_CLOUD, "foul pestilence"); break; + case CLOUD_MUTAGENIC:+ mpr("You are engulfed in a mutagenic fog!");++ if (coinflip()) {+ mpr("Strange energies course through your body.");+ if (one_chance_in(3))+ you.mutate();+ else+ {+ learned_something_new(TUT_YOU_MUTATED);+ give_bad_mutation();+ }+ }+ break;+ default: break; }@@ -709,6 +729,8 @@ bool is_damaging_cloud(cloud_type type, bool temp) return (player_res_steam(false, temp) <= 0); case CLOUD_MIASMA: return (player_res_rotting());+ case CLOUD_MUTAGENIC:+ return (you.can_mutate()); default: // Smoke, never harmful.@@ -761,6 +783,8 @@ std::string cloud_name(cloud_type type) return "thin mist"; case CLOUD_CHAOS: return "seething chaos";+ case CLOUD_MUTAGENIC:+ return "mutagenic fog"; default: return "buggy goodness"; }diff --git a/crawl-ref/source/dat/clua/lm_fog.lua b/crawl-ref/source/dat/clua/lm_fog.luaindex 6fe49c6..4f1ad79 100644--- a/crawl-ref/source/dat/clua/lm_fog.lua+++ b/crawl-ref/source/dat/clua/lm_fog.lua@@ -21,8 +21,8 @@ -- -- cloud_type: The name of the cloud type to use. Possible cloud types are: -- flame, noxious fumes, freezing vapour, poison gases,--- grey smoke, blue smoke, purple smoke, steam, --- foul pestilence, black smoke, thin mist (the default).+-- grey smoke, blue smoke, purple smoke, steam,+-- foul pestilence, black smoke, mutagenic fog, thin mist (the default). -- walk_dist: The distance to move over the course of one random walk. -- defaults to 0. -- pow_min: The minimum "power" (lifetime) of each cloud; defaults to 1.diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.hindex f299733..dbecaa6 100644--- a/crawl-ref/source/enum.h+++ b/crawl-ref/source/enum.h@@ -261,6 +261,7 @@ enum beam_type // beam[].flavour BEAM_POTION_GREY_SMOKE, BEAM_POTION_BLUE_SMOKE, // 55 BEAM_POTION_PURP_SMOKE,+ BEAM_POTION_MUTAGENIC, BEAM_POTION_RANDOM, BEAM_LAST_REAL = BEAM_POTION_RANDOM,@@ -268,9 +269,9 @@ enum beam_type // beam[].flavour // For getting the visual effect of a beam. BEAM_VISUAL, - BEAM_TORMENT_DAMAGE, // Pseudo-beam for damage flavour.+ BEAM_TORMENT_DAMAGE, // 60: Pseudo-beam for damage flavour. BEAM_FIRST_PSEUDO = BEAM_TORMENT_DAMAGE,- BEAM_STEAL_FOOD, // 60: Pseudo-beam for harpies stealing food.+ BEAM_STEAL_FOOD, // Pseudo-beam for harpies stealing food. NUM_BEAMS };@@ -434,6 +435,7 @@ enum cloud_type CLOUD_MIASMA, CLOUD_MIST, CLOUD_CHAOS,+ CLOUD_MUTAGENIC, CLOUD_RANDOM = 98, CLOUD_DEBUGGING = 99 // 99: used once as 'nonexistent cloud' {dlb} };diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.ccindex 5a171cf..9824b78 100644--- a/crawl-ref/source/monstuff.cc+++ b/crawl-ref/source/monstuff.cc@@ -9378,6 +9378,20 @@ static void _mons_in_cloud(monsters *monster) hurted += (10 * random2avg(12, 3)) / speed; // 3 break; + case CLOUD_MUTAGENIC:+ simple_monster_message(monster, " is engulfed in a mutagenic fog!");++ // Will only polymorph a monster if they're not magic immune, can+ // mutate, aren't res asphyx, and pass the same check as meph cloud.+ if (monster->can_mutate() && !mons_immune_magic(monster)+ && 1 + random2(27) >= monster->hit_dice+ && !mons_res_asphyx(monster))+ {+ if (monster->mutate())+ wake = true;+ }+ break;+ default: // 'harmless' clouds -- colored smoke, etc {dlb}. return; }diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.ccindex c2e8780..677fe14 100644--- a/crawl-ref/source/spells4.cc+++ b/crawl-ref/source/spells4.cc@@ -1133,6 +1133,15 @@ bool cast_evaporate(int pow, bolt& beem, int pot_idx) break; case POT_MUTATION:+ // Maybe we'll get a mutagenic cloud.+ if (coinflip())+ {+ beem.effect_known = true;+ tracer_flavour = beem.flavour = BEAM_POTION_MUTAGENIC;+ break;+ }+ // if not, deliberate fall through for something random+ case POT_GAIN_STRENGTH: case POT_GAIN_DEXTERITY: case POT_GAIN_INTELLIGENCE:diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.ccindex 56dac33..525efa4 100644--- a/crawl-ref/source/view.cc+++ b/crawl-ref/source/view.cc@@ -1703,6 +1703,10 @@ inline static void _update_cloud_grid(int cloudno) which_colour = ETC_RANDOM; break; + case CLOUD_MUTAGENIC:+ which_colour = ETC_MUTAGENIC;+ break;+ default: which_colour = LIGHTGREY; break;