diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-18 18:58:52 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-18 18:58:52 +0000 |
commit | 6d7627cb65e54dae22237da82ea076bf17b1f9b7 (patch) | |
tree | 43eda0c3c953b041e1419650cc78a6ae9c381374 /crawl-ref/source/misc.cc | |
parent | 66c0054398335a6929dd22d3690775027b9906b6 (diff) | |
download | crawl-ref-6d7627cb65e54dae22237da82ea076bf17b1f9b7.tar.gz crawl-ref-6d7627cb65e54dae22237da82ea076bf17b1f9b7.zip |
Add the Slime god as per n78291's (Shayne?) patch. Thanks! :D
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10271 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 90d89d074f..d4e63f1186 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1157,6 +1157,21 @@ static void _spatter_neighbours(const coord_def& where, int chance) } } +bool slime_vault_to_floor() +{ + bool success = false; + + for (rectangle_iterator ri(1); ri; ++ri) + { + if (grd(*ri) == DNGN_STONE_WALL) + { + grd(*ri) = DNGN_FLOOR; + success = true; + } + } + return (success); +} + void generate_random_blood_spatter_on_level() { int startprob; @@ -2419,6 +2434,31 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, new_level(); + static int times_entered = 0; + + if (level_id::current() == level_id(BRANCH_SLIME_PITS, 6) + && you.religion == GOD_JIYVA) + { + const level_id target(BRANCH_SLIME_PITS, 6); + if (times_entered == 0) + { + if (apply_to_level(target, true, slime_vault_to_floor)) + { + if (!silenced(you.pos())) + { + mpr("You hear the sound of toppling stones.", + MSGCH_MONSTER_ENCHANT); + } + else + { + mpr("An unexplained breeze blows through the dungeon.", + MSGCH_MONSTER_ENCHANT); + } + } + times_entered++; + } + } + // Clear list of beholding monsters. if (you.duration[DUR_MESMERISED]) { @@ -3095,6 +3135,7 @@ bool stop_attack_prompt(const monsters *mon, bool beam_attack, prompt = true; } else if (inSanctuary || wontAttack + || (you.religion == GOD_JIYVA && mons_is_slime(mon)) || (isNeutral || isHoly) && is_good_god(you.religion) || isUnchivalric && you.religion == GOD_SHINING_ONE |