summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-09 21:43:14 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-09 21:43:14 +0000
commita4649f7bcd32304352b4d52a9c24a8455b41e8bc (patch)
tree2653ff094f7279d0f17c76d14528f0c1cbf1c52d /crawl-ref
parent94e75528f21fb8aa910c06893dfc46ca2785f20f (diff)
downloadcrawl-ref-a4649f7bcd32304352b4d52a9c24a8455b41e8bc.tar.gz
crawl-ref-a4649f7bcd32304352b4d52a9c24a8455b41e8bc.zip
Apply recent commits to 0.4, including Matthew's evil zoo fix.
Now how do I change the properties to native again? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6465 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/abyss.cc1
-rw-r--r--crawl-ref/source/acr.cc4
-rw-r--r--crawl-ref/source/dat/clua/luamark.lua1
-rw-r--r--crawl-ref/source/dat/descript/ability.txt71
-rw-r--r--crawl-ref/source/dat/mini.des31
-rw-r--r--crawl-ref/source/decks.cc2
-rw-r--r--crawl-ref/source/effects.cc2
-rw-r--r--crawl-ref/source/fight.cc3
-rw-r--r--crawl-ref/source/files.cc10
-rw-r--r--crawl-ref/source/food.cc1
-rw-r--r--crawl-ref/source/mutation.cc8
-rw-r--r--crawl-ref/source/newgame.cc57
-rw-r--r--crawl-ref/source/output.cc23
-rw-r--r--crawl-ref/source/player.cc4
-rw-r--r--crawl-ref/source/randart.cc6
-rw-r--r--crawl-ref/source/spells1.cc4
-rw-r--r--crawl-ref/source/stuff.cc2
-rw-r--r--crawl-ref/source/terrain.cc26
-rw-r--r--crawl-ref/source/tutorial.cc15
-rw-r--r--crawl-ref/source/tutorial.h1
20 files changed, 173 insertions, 99 deletions
diff --git a/crawl-ref/source/abyss.cc b/crawl-ref/source/abyss.cc
index 2ded18e8a7..14440d8d0a 100644
--- a/crawl-ref/source/abyss.cc
+++ b/crawl-ref/source/abyss.cc
@@ -525,7 +525,6 @@ void area_shift(void)
}
}
-
for (unsigned int i = 0; i < MAX_CLOUDS; i++)
{
if (env.cloud[i].type == CLOUD_NONE)
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 92f6ba80ef..437ca0d192 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -4107,6 +4107,10 @@ static bool _initialise(void)
// For a new game, wipe out monsters in LOS.
zap_los_monsters();
+
+ // For a newly started tutorial, turn secret doors into normal ones.
+ if (Options.tutorial_left)
+ tutorial_zap_secret_doors();
}
#ifdef USE_TILE
diff --git a/crawl-ref/source/dat/clua/luamark.lua b/crawl-ref/source/dat/clua/luamark.lua
index cc677f18c1..af92aaebd8 100644
--- a/crawl-ref/source/dat/clua/luamark.lua
+++ b/crawl-ref/source/dat/clua/luamark.lua
@@ -8,6 +8,7 @@ dofile('clua/lm_1way.lua')
dofile('clua/lm_timed.lua')
dofile('clua/lm_flags.lua')
dofile('clua/lm_fog.lua')
+dofile('clua/lm_props.lua')
function dlua_marker_function(table, name)
return table[name]
diff --git a/crawl-ref/source/dat/descript/ability.txt b/crawl-ref/source/dat/descript/ability.txt
index 8b09d0a407..89c7966cb2 100644
--- a/crawl-ref/source/dat/descript/ability.txt
+++ b/crawl-ref/source/dat/descript/ability.txt
@@ -59,45 +59,44 @@ your strength is too low.
%%%%
Spit Acid
-There's currently no description for this ability...
+Spit acid at a targeted monster.
%%%%
# Both for Fly I and II.
Fly
-There's currently no description for this ability...
+Pretty self-explanatory: Start flying.
%%%%
Summon Minor Demon
-There's currently no description for this ability...
+Summon a minor demon.
%%%%
Summon Demon
-There's currently no description for this ability...
+Summon a greater demon.
%%%%
Hellfire
-There's currently no description for this ability...
+Blast your enemies with hellfire.
%%%%
Torment
-There's currently no description for this ability...
+Torment yourself and the monsters around you.
%%%%
Raise Dead
-There's currently no description for this ability...
+Bring the corpses in your vicinity back to life.
%%%%
Control Demon
-There's currently no description for this ability...
+Temporarily enslave a demon.
%%%%
Gate Yourself to Pandemonium
-Enter the chaotic realm of Pandemonium. Getting back might be
-difficult.
+Enter the chaotic realm of Pandemonium. Note that getting back might be difficult.
%%%%
Channeling
-There's currently no description for this ability...
+Regain a small amount of magical energy.
%%%%
Throw Flame ability
@@ -109,7 +108,7 @@ Throw a blast of frost at a targeted monster.
%%%%
Bolt of Draining ability
-There's currently no description for this ability...
+Drain the life force of a targeted monster. This will reduce the experience you'll get from killing it.
%%%%
Release Delayed Fireball
@@ -118,7 +117,9 @@ additional cost in terms of magic or hunger.
%%%%
Self-Restoration
-There's currently no description for this ability...
+At the permanent loss of one magic point restore your Strength,
+Dexterity and Intelligence, and heal a large amount of rotted
+hitpoints.
%%%%
Evoke Sense Surroundings
@@ -185,7 +186,9 @@ greater effect.
%%%%
Sanctuary
-There's currently no description for this ability...
+For a short duration gain safety in a divine refuge. While the sanctuary
+is in effect monsters will not attack you, but the protection will
+disappear at once should you breach the divine peace.
%%%%
# The Shining One
Divine Shield
@@ -208,33 +211,34 @@ by the Shining One to stay longer or even permanently in this world.
# Both Kikubaaqudgha and Yredelmnul.
Recall Undead Slaves
-There's currently no description for this ability...
+Recall your undead followers from anywhere on the level to your immediate surroundings.
%%%%
# Kikubaaqudgha
Enslave Undead
-There's currently no description for this ability...
+Permanently enslave undead monsters.
%%%%
Invoke Death
-There's currently no description for this ability...
+Summon the personification of Death, depending on your Invocations
+skill possibly hostile.
%%%%
# Yredelemnul
Animate Corpse
-There's currently no description for this ability...
+Reanimate a corpse as a follower.
%%%%
Animate Dead ability
-There's currently no description for this ability...
+Bring the corpses in your vicinity back to life.
%%%%
Drain Life
-There's currently no description for this ability...
+Drain the life force of the monsters surrounding you.
%%%%
Control Undead
-There's currently no description for this ability...
+Attempt to temporarily enslave undead monsters around you.
%%%%
# Okawaru
Might
@@ -266,7 +270,7 @@ There's currently no description for this ability...
# Sif Muna
Channel Energy
-There's currently no description for this ability...
+Replenish your magical reservoir by an amount depending on your Invocations skill.
%%%%
Forget Spell
@@ -308,23 +312,25 @@ being accidentally destroyed, use the !D inscription.
%%%%
Lesser Healing
-There's currently no description for this ability...
+Depending on your Invocations skill, heal a small amount of your hitpoints.
%%%%
Purification
-There's currently no description for this ability...
+Purge your body of bad effects such as sickness, poisoning, slowness,
+confusion, and rotting.
%%%%
Healing
-There's currently no description for this ability...
+Depending on your Invocations skill, heal a moderate amount of your hitpoints.
%%%%
Restoration
-There's currently no description for this ability...
+Fully restore your Strength, Dexterity and Intelligence, and heal a large
+amount of rotted hitpoints.
%%%%
Greater Healing
-There's currently no description for this ability...
+Depending on your Invocations skill, heal a great amount of your hitpoints.
%%%%
# Lugonu
Depart the Abyss
@@ -334,7 +340,7 @@ when you left the dungeon.
%%%%
Bend Space
-There's currently no description for this ability...
+Cause distortional damage to a targeted monster.
%%%%
Banish
@@ -343,7 +349,10 @@ banished into the Abyss.
%%%%
Corrupt
-There's currently no description for this ability...
+Corrupt the current level by unleashing Abyssal energies on it. This will
+cause the level largely changing appearance and will gate in demons from
+the Abyss bent on causing destruction. This will not work on levels
+already corrupted or in the Abyss.
%%%%
Enter the Abyss
@@ -367,7 +376,9 @@ which one to keep. Discard the other two.
%%%%
Mark Four
-There's currently no description for this ability...
+Draw four cards from your wielded deck, remember them and shuffle them
+back into the deck. The deck will be inscribed as containing those
+cards, and doing so will identify the deck.
%%%%
Stack Five
diff --git a/crawl-ref/source/dat/mini.des b/crawl-ref/source/dat/mini.des
index e5bdcefa95..c09c75e591 100644
--- a/crawl-ref/source/dat/mini.des
+++ b/crawl-ref/source/dat/mini.des
@@ -676,24 +676,25 @@ ENDMAP
###################################
# Evil zoo
#
-# FIXME This vault is somewhat problematic as the doors are treated as
-# gateways. The ideal fix would be make sure that (formerly)
-# secret doors are never part of gateways.
-#
+# The marker affects find_connected_range() so that each door opens and
+# closes separately rather than all of them joining together into a huge
+# gate that opens all at once.
NAME: minivault_9
TAGS: allow_dup
DEPTH: D:15-27, Elf, Vault, Crypt, Dis, Geh, Tar, Coc
-MAP
-==========
-=x========
-==========
-===8888===
-===8998===
-===8998===
-===8888===
-==========
-==========
-==========
+MARKER: X = lua: props_marker { connected_exclude="true" }
+SUBST: X = =
+MAP
+XXXXXXXXXX
+XxXXXXXXXX
+XXXXXXXXXX
+XXX8888XXX
+XXX8998XXX
+XXX8998XXX
+XXX8888XXX
+XXXXXXXXXX
+XXXXXXXXXX
+XXXXXXXXXX
ENDMAP
###################################
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 6298404b97..1328c4e0d3 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -841,7 +841,7 @@ bool deck_peek()
// Mark a deck: look at the next four cards, mark them, and shuffle
// them back into the deck. The player won't know what order they're
-// in, and the if the top card is non-marked then the player won't
+// in, and if the top card is non-marked then the player won't
// know what the next card is. Return false if the operation was
// failed/aborted along the way.
bool deck_mark()
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 123b2131c3..86ac9c40d9 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1504,8 +1504,6 @@ bool acquirement(object_class_type class_wanted, int agent,
for (int item_tries = 0; item_tries < 40; item_tries++)
{
int type_wanted = _find_acquirement_subtype(class_wanted, quant);
- if (class_wanted == OBJ_BOOKS)
- type_wanted = BOOK_MANUAL;
// Clobber class_wanted for vampires.
if (you.species == SP_VAMPIRE && class_wanted == OBJ_FOOD)
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 38ae378f58..f5821ebb84 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -3697,8 +3697,7 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk)
case AF_VAMPIRIC:
// Only may bite non-vampiric monsters (or player) capable of bleeding.
- if (defender->atype() == ACT_PLAYER
- && (you.species == SP_VAMPIRE || !victim_can_bleed(-1))
+ if (defender->atype() == ACT_PLAYER && !victim_can_bleed(-1)
|| defender->atype() == ACT_MONSTER
&& !victim_can_bleed(def->type))
{
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index f00a8cf58a..4e9a019817 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1367,7 +1367,7 @@ void save_game(bool leave_game, const char *farewellmsg)
/* lua */
std::string luaFile = get_savedir_filename( you.your_name, "", "lua" );
clua.save(luaFile.c_str());
- // note that luaFile may not exist
+ // Note that luaFile may not exist.
DO_CHMOD_PRIVATE(luaFile.c_str());
#endif
@@ -1405,7 +1405,6 @@ void save_game(bool leave_game, const char *farewellmsg)
}
/* tutorial */
-
std::string tutorFile = get_savedir_filename(you.your_name, "", "tut");
FILE *tutorf = fopen(tutorFile.c_str(), "wb");
if (tutorf)
@@ -1503,7 +1502,7 @@ void _load_ghost(void)
ghosts.clear();
_restore_ghost_version(gfile, majorVersion, minorVersion);
- // sanity check - EOF
+ // Sanity check - EOF.
if (!feof(gfile))
{
fclose(gfile);
@@ -1521,10 +1520,10 @@ void _load_ghost(void)
mpr( "Loaded ghost.", MSGCH_DIAGNOSTICS );
#endif
- // remove bones file - ghosts are hardly permanent.
+ // Remove bones file - ghosts are hardly permanent.
unlink(cha_fil.c_str());
- // translate ghost to monster and place.
+ // Translate ghost to monster and place.
for (int imn = 0; imn < MAX_MONSTERS - 10 && !ghosts.empty(); imn++)
{
if (menv[imn].type != -1)
@@ -1601,7 +1600,6 @@ void restore_game(void)
}
/* tutorial */
-
std::string tutorFile = get_savedir_filename(you.your_name, "", "tut");
FILE *tutorf = fopen(tutorFile.c_str(), "rb");
if (tutorf)
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 1f4ece801e..210b6f50f7 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -1206,6 +1206,7 @@ int eat_from_floor()
return 1;
}
need_more = true;
+ break;
case 'i':
case '?':
// Directly skip ahead to inventory.
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index ff05e986dd..7734e09b4c 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -1459,7 +1459,7 @@ static void _display_vampire_attributes()
{"Spell hunger ", "full ", "full ", "full ", "halved ", "none ", "none "},
- {EOL EOL "<w>Resistances</w>" EOL
+ {EOL "<w>Resistances</w>" EOL
"Poison resistance ", " ", " ", " ", " + ", " + ", " + "},
{"Cold resistance ", " ", " ", " ", " + ", " + ", " ++ "},
@@ -1468,7 +1468,7 @@ static void _display_vampire_attributes()
{"Torment resistance ", " ", " ", " ", " ", " ", " + "},
- {EOL EOL "<w>Other effects</w>" EOL
+ {EOL "<w>Other effects</w>" EOL
"Mutation chance ", "always ", "often ", "sometimes ", "never ", "never ", "never "},
{"Non-physical " EOL
@@ -1519,9 +1519,7 @@ static void _display_vampire_attributes()
result += EOL;
}
- result += EOL EOL;
- result += EOL EOL;
- result += EOL EOL;
+ result += EOL;
result += "Press '<w>!</w>' to toggle between mutations and properties depending on your " EOL
"hunger status." EOL;
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 7a966c159f..f59d414632 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -2309,18 +2309,18 @@ static bool _choose_weapon()
{
ASSERT(startwep[i] != WPN_UNKNOWN);
+ if (startwep_restrictions[i] == CC_BANNED)
+ continue;
+
if (startwep_restrictions[i] == CC_UNRESTRICTED)
textcolor(LIGHTGREY);
else
textcolor(DARKGREY);
- char letter = (startwep_restrictions[i] == CC_BANNED)
- ? ' ' : ('a' + i);
-
- if (startwep[i] == WPN_UNARMED)
- cprintf("%c - claws" EOL, letter);
- else
- cprintf("%c - %s" EOL, letter, weapon_base_name(startwep[i]));
+ const char letter = 'a' + i;
+ cprintf("%c - %s" EOL, letter,
+ startwep[i] == WPN_UNARMED ? "claws"
+ : weapon_base_name(startwep[i]));
if (Options.prev_weapon == startwep[i])
prevmatch = true;
@@ -2334,7 +2334,7 @@ static bool _choose_weapon()
"Bksp - Back to species and class selection; "
"X - Quit" EOL);
- if (Options.prev_weapon != WPN_UNKNOWN)
+ if (Options.prev_weapon == WPN_RANDOM || prevmatch)
{
cprintf("; Enter - %s",
Options.prev_weapon == WPN_RANDOM ? "Random" :
@@ -3579,20 +3579,21 @@ spec_query:
else
textcolor(DARKGREY);
- // Show banned races but omit letter
- char sletter;
+ // Show banned races as "unavailable".
if (you.char_class != JOB_UNKNOWN
&& _class_allowed(si, you.char_class) == CC_BANNED)
{
- sletter = ' ';
+ cprintf(" %s N/A", species_name(si, 1).c_str());
}
else
- sletter = index_to_letter(i);
+ {
+ char sletter = index_to_letter(i);
- if (sletter == Options.prev_race)
- prevraceok = true;
+ if (sletter == Options.prev_race)
+ prevraceok = true;
- cprintf( "%c - %s", sletter, species_name(si,1).c_str() );
+ cprintf("%c - %s", sletter, species_name(si, 1).c_str());
+ }
if (j % 2)
cprintf(EOL);
@@ -3826,17 +3827,20 @@ job_query:
else
textcolor(DARKGREY);
- // Show banned classes but omit letter.
- char letter;
+ // Show banned races as "unavailable".
if (_class_allowed(you.species, which_job) == CC_BANNED)
- letter = ' ';
+ {
+ cprintf(" %s N/A", get_class_name(which_job));
+ }
else
- letter = index_to_letter(i);
+ {
+ char sletter = index_to_letter(i);
- if (letter == Options.prev_cls)
- prevclassok = true;
+ if (sletter == Options.prev_cls)
+ prevclassok = true;
- cprintf( "%c - %s", letter, get_class_name(which_job) );
+ cprintf("%c - %s", sletter, get_class_name(which_job));
+ }
if (j % 2)
cprintf(EOL);
@@ -4206,10 +4210,11 @@ bool _give_items_skills()
cprintf("a - Zin (for traditional priests)" EOL);
cprintf("b - Yredelemnul (for priests of death)" EOL);
- const bool valid = _is_valid_religion(GOD_BEOGH);
- textcolor( valid ? LIGHTGREY : DARKGREY );
- cprintf("%s - Beogh (priest of Orcs)" EOL,
- valid ? "c" : " ");
+ if (_is_valid_religion(GOD_BEOGH))
+ {
+ textcolor(LIGHTGREY);
+ cprintf("c - Beogh (priest of Orcs)" EOL);
+ }
textcolor( BROWN );
cprintf(EOL "* - Random choice; "
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index c5ff49069e..c0a57cabd7 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -1209,6 +1209,16 @@ monster_pane_info::less_than(const monster_pane_info& m1,
else if (m1.m_attitude > m2.m_attitude)
return (false);
+ // Force plain but different coloured draconians to be treated like the
+ // same sub-type.
+ if (!zombified && m1.m_mon->type >= MONS_DRACONIAN
+ && m1.m_mon->type <= MONS_PALE_DRACONIAN
+ && m2.m_mon->type >= MONS_DRACONIAN
+ && m2.m_mon->type <= MONS_PALE_DRACONIAN)
+ {
+ return (false);
+ }
+
// By descending difficulty
if (m1.m_difficulty > m2.m_difficulty)
return (true);
@@ -1234,8 +1244,8 @@ monster_pane_info::less_than(const monster_pane_info& m1,
if (zombified)
{
- // Because of the type checks above, if one of the two is zombified, so is
- // the other, and of the same type.
+ // Because of the type checks above, if one of the two is zombified, so
+ // is the other, and of the same type.
if (mons_is_zombified(m1.m_mon)
&& m1.m_mon->base_monster < m2.m_mon->base_monster)
{
@@ -1282,16 +1292,23 @@ void monster_pane_info::to_string( int count, std::string& desc,
}
else
{
- // Don't differentiate between dancing weapons or mimics
+ // Don't differentiate between dancing weapons, mimics, or draconians
// of different types.
if (m_fullname
&& m_mon->type != MONS_DANCING_WEAPON
+ && mons_genus(m_mon->type) != MONS_DRACONIAN
&& !mons_is_mimic(m_mon->type)
&& m_mon->mname.empty())
{
out << count << " "
<< pluralise(m_mon->name(DESC_PLAIN));
}
+ else if (m_mon->type >= MONS_DRACONIAN
+ && m_mon->type <= MONS_PALE_DRACONIAN)
+ {
+ out << count << " "
+ << pluralise(mons_type_name(MONS_DRACONIAN, DESC_PLAIN));
+ }
else
{
out << count << " "
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index aa308bf8d5..cfa61aadd7 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -2899,8 +2899,8 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain,
level_change();
- // increase tutorial time-out now that it's actually
- // become useful for a longer time
+ // Increase tutorial time-out now that it's actually
+ // become useful for a longer time.
if (Options.tutorial_left && you.experience_level == 7)
tutorial_finished();
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc
index e0108b9d80..d676e93813 100644
--- a/crawl-ref/source/randart.cc
+++ b/crawl-ref/source/randart.cc
@@ -110,12 +110,12 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item)
break;
case GOD_SIF_MUNA:
- // no weapons for Sif Muna
+ case GOD_KIKUBAAQUDGHA:
+ case GOD_VEHUMET:
+ // The magic gods: no weapons, no preventing spellcasting.
if (item.base_type == OBJ_WEAPONS)
return (false);
- case GOD_KIKUBAAQUDGHA:
- case GOD_VEHUMET:
if (randart_wpn_property( item, RAP_PREVENT_SPELLCASTING ))
return (false);
break;
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 6c8be52d3c..ca2c9294a7 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -1206,11 +1206,11 @@ void purification(void)
{
mpr("You feel purified!");
- you.duration[DUR_POISONING] = 0;
+ you.disease = 0;
you.rotting = 0;
+ you.duration[DUR_POISONING] = 0;
you.duration[DUR_CONF] = 0;
you.duration[DUR_SLOW] = 0;
- you.disease = 0;
you.duration[DUR_PARALYSIS] = 0; // can't currently happen -- bwr
you.duration[DUR_PETRIFIED] = 0;
}
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index 2ab5cec604..3406decaa9 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -1589,7 +1589,7 @@ void zap_los_monsters()
int imon = mgrd[gx][gy];
- // at tutorial beginning disallow items in line of sight
+ // At tutorial beginning disallow items in line of sight.
if (Options.tutorial_events[TUT_SEEN_FIRST_OBJECT])
{
int item = igrd[gx][gy];
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index 5a9587f8c4..c9fd96f293 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -235,6 +235,19 @@ void find_connected_identical(coord_def d, dungeon_feature_type ft,
std::set<coord_def>& out)
{
if (grd[d.x][d.y] != ft) return;
+
+ std::string prop = env.markers.property_at(d, MAT_ANY,
+ "connected_exclude");
+
+ if (!prop.empty())
+ {
+ // Even if this square is excluded from being a part of connected
+ // cells, add it if it's the starting square.
+ if (out.size() == 0)
+ out.insert(d);
+ return;
+ }
+
if (out.insert(d).second)
{
find_connected_identical(coord_def(d.x+1, d.y), ft, out);
@@ -250,6 +263,19 @@ void find_connected_range(coord_def d, dungeon_feature_type ft_min,
std::set<coord_def>& out)
{
if (grd[d.x][d.y] < ft_min || grd[d.x][d.y] > ft_max) return;
+
+ std::string prop = env.markers.property_at(d, MAT_ANY,
+ "connected_exclude");
+
+ if (!prop.empty())
+ {
+ // Even if this square is excluded from being a part of connected
+ // cells, add it if it's the starting square.
+ if (out.size() == 0)
+ out.insert(d);
+ return;
+ }
+
if (out.insert(d).second)
{
find_connected_range(coord_def(d.x+1, d.y), ft_min, ft_max, out);
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index 1507ade82a..ece23849de 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -262,6 +262,21 @@ static job_type _get_tutorial_job(unsigned int type)
}
}
+// Converts all secret doors in a fixed radius around the player's starting
+// position into normal closed doors.
+void tutorial_zap_secret_doors()
+{
+ for (int x = you.x_pos - 10; x <= you.x_pos + 10; x++)
+ for (int y = you.y_pos - 10; y <= you.y_pos + 10; y++)
+ {
+ if (!in_bounds(x,y))
+ continue;
+
+ if (grd[x][y] == DNGN_SECRET_DOOR)
+ grd[x][y] = DNGN_CLOSED_DOOR;
+ }
+}
+
// Prints the tutorial welcome screen.
static formatted_string _tut_starting_info(unsigned int width)
{
diff --git a/crawl-ref/source/tutorial.h b/crawl-ref/source/tutorial.h
index 88ec4c22d8..2b8d4e2f8f 100644
--- a/crawl-ref/source/tutorial.h
+++ b/crawl-ref/source/tutorial.h
@@ -29,6 +29,7 @@ void init_tutorial_options(void);
bool pick_tutorial(void);
void print_tutorial_menu(unsigned int type);
+void tutorial_zap_secret_doors(void);
formatted_string tut_starting_info2();
void tut_starting_screen(void);