summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-31 23:33:49 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-31 23:33:49 +0000
commitb2a0f789b94558ed467b25ac5355eaf8b6558077 (patch)
tree8ffec1f322123a7ab8b725dcc4c23cbfa40e95f5 /crawl-ref/source
parent3344142e8b26c115585389049ca3a7f535fcab75 (diff)
downloadcrawl-ref-b2a0f789b94558ed467b25ac5355eaf8b6558077.tar.gz
crawl-ref-b2a0f789b94558ed467b25ac5355eaf8b6558077.zip
Fix 1962147: Move the comments on the food you eat at the end of DELAY_EAT.
Fix 1971216: Kills by confused undead use LIVING_KILLED_BY_SERVANT instead because the message ("collateral kill") fits better and, though it's basically a hack, the distinction does fit somehow. Fix 1914948: Tweak message when you resist a spell cast by an invisible monster. Fix 1946608: Print "Nothing appears to happen." if reading ?EWI when unarmed. I guess that's it, plus probably some more cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5378 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/beam.cc26
-rw-r--r--crawl-ref/source/dat/database/monspeak.txt3
-rw-r--r--crawl-ref/source/delay.cc4
-rw-r--r--crawl-ref/source/describe.cc16
-rw-r--r--crawl-ref/source/effects.cc25
-rw-r--r--crawl-ref/source/food.cc312
-rw-r--r--crawl-ref/source/food.h2
-rw-r--r--crawl-ref/source/item_use.cc47
-rw-r--r--crawl-ref/source/misc.cc2
-rw-r--r--crawl-ref/source/mon-data.h4
-rw-r--r--crawl-ref/source/mon-util.cc6
-rw-r--r--crawl-ref/source/monplace.cc2
-rw-r--r--crawl-ref/source/monstuff.cc43
-rw-r--r--crawl-ref/source/mstuff2.cc46
-rw-r--r--crawl-ref/source/output.cc16
-rw-r--r--crawl-ref/source/religion.cc8
-rw-r--r--crawl-ref/source/spells3.cc12
-rw-r--r--crawl-ref/source/tutorial.cc29
-rw-r--r--crawl-ref/source/view.cc361
19 files changed, 522 insertions, 442 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 89a926a2d2..5d7b327212 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2455,7 +2455,7 @@ bool mass_enchantment( enchant_type wh_enchant, int pow, int origin,
}
}
- // extra check for fear (monster needs to reevaluate behaviour)
+ // Extra check for fear (monster needs to reevaluate behaviour).
if (wh_enchant == ENCH_FEAR)
behaviour_event( monster, ME_SCARE, origin );
}
@@ -2467,13 +2467,10 @@ bool mass_enchantment( enchant_type wh_enchant, int pow, int origin,
return (msg_generated);
} // end mass_enchantment()
-/*
- Monster has probably failed save, now it gets enchanted somehow.
-
- returns MON_RESIST if monster is unaffected due to magic resist.
- returns MON_UNAFFECTED if monster is immune to enchantment
- returns MON_AFFECTED in all other cases (already enchanted, etc)
- */
+// Monster has probably failed save, now it gets enchanted somehow.
+// * Returns MON_RESIST if monster is unaffected due to magic resist.
+// * Returns MON_UNAFFECTED if monster is immune to enchantment.
+// * Returns MON_AFFECTED in all other cases (already enchanted, etc).
int mons_ench_f2(monsters *monster, bolt &pbolt)
{
switch (pbolt.flavour) /* put in magic resistance */
@@ -3688,7 +3685,18 @@ static int _affect_player( bolt &beam, item_def *item )
|| !beam.aimed_at_feet)
&& you_resist_magic( beam.ench_power ))
{
- canned_msg(MSG_YOU_RESIST);
+ bool need_msg = true;
+ if (beam.beam_source != -1)
+ {
+ monsters *mon = &menv[beam.beam_source];
+ if (!player_monster_visible(mon))
+ {
+ mpr("Something tries to affect you, but you resist.");
+ need_msg = false;
+ }
+ }
+ if (need_msg)
+ canned_msg(MSG_YOU_RESIST);
// You *could* have gotten a free teleportation in the Abyss,
// but no, you resisted.
diff --git a/crawl-ref/source/dat/database/monspeak.txt b/crawl-ref/source/dat/database/monspeak.txt
index 1229f1ca45..734f2f42a3 100644
--- a/crawl-ref/source/dat/database/monspeak.txt
+++ b/crawl-ref/source/dat/database/monspeak.txt
@@ -2266,6 +2266,9 @@ w:5
#################################################
related beogh orc sorcerer
+__NONE
+
+w:5
@_wizard_@
w:3
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 6df2378d7c..8c330e141d 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -988,9 +988,11 @@ static void finish_delay(const delay_queue_item &delay)
case DELAY_EAT:
mprf("You finish eating.");
// For chunks, warn the player if they're not getting much
- // nutrition.
+ // nutrition. Also, print the other eating messages only now.
if (delay.parm1)
chunk_nutrition_message(delay.parm1);
+ else if (delay.parm2 != -1)
+ finished_eating_message(delay.parm2);
break;
case DELAY_FEED_VAMPIRE:
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index afe37a0704..5b05f2e74e 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1926,24 +1926,8 @@ void describe_item( item_def &item, bool allow_inscribe )
}
if (Options.tutorial_left && wherey() <= get_number_of_lines() - 5)
- {
tutorial_inscription_info(allow_autoinscribe);
- if (wherey() <= get_number_of_lines() - 2)
- {
- if (allow_autoinscribe)
- {
- formatted_string::parse_string(
- "<cyan>So, do you wish to inscribe this item? "
- "('a' to autoinscribe) ").display();
- }
- else
- {
- formatted_string::parse_string(
- "<cyan>So, do you wish to inscribe this item? ").display();
- }
- }
- }
#ifdef USE_TILE
const int keyin = getch_ck();
if (toupper(keyin) == 'Y')
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index e2d69263c6..bbaa21426a 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -701,7 +701,7 @@ void mons_direct_effect(struct bolt &pbolt, int i)
damage_taken += 7 + random2avg(11, 2);
break;
- case DMNBM_BRAIN_FEED: // not implemented here (nor, probably, can be)
+ case DMNBM_BRAIN_FEED: // Not implemented here (nor, probably, can be).
break;
case DMNBM_MUTATION:
@@ -717,7 +717,7 @@ void mons_direct_effect(struct bolt &pbolt, int i)
break;
}
- // apply damage and handle death, where appropriate {dlb}
+ // Apply damage and handle death, where appropriate {dlb}
if (damage_taken > 0)
{
hurt_monster(monster, damage_taken);
@@ -727,7 +727,7 @@ void mons_direct_effect(struct bolt &pbolt, int i)
}
return;
-} // end mons_direct_effect()
+}
void random_uselessness(unsigned char ru, unsigned char sc_read_2)
{
@@ -736,8 +736,7 @@ void random_uselessness(unsigned char ru, unsigned char sc_read_2)
switch (ru)
{
case 0:
- msg::stream << "The dust glows " << weird_glowing_colour() << "!"
- << std::endl;
+ mprf("The dust glows %s!", weird_glowing_colour().c_str());
break;
case 1:
@@ -748,22 +747,22 @@ void random_uselessness(unsigned char ru, unsigned char sc_read_2)
case 2:
if (you.equip[EQ_WEAPON] != -1)
{
- msg::stream << you.inv[you.equip[EQ_WEAPON]].name(DESC_CAP_YOUR)
- << " glows " << weird_glowing_colour()
- << " for a moment." << std::endl;
+ mprf("%s glows %s for a moment.",
+ you.inv[you.equip[EQ_WEAPON]].name(DESC_CAP_YOUR).c_str(),
+ weird_glowing_colour().c_str());
}
else
canned_msg(MSG_NOTHING_HAPPENS);
break;
case 3:
- msg::stream << "You hear the distant roaring of an enraged "
- << weird_roaring_animal() << "!" << std::endl;
+ mprf("You hear the distant roaring of an enraged %s!",
+ weird_roaring_animal().c_str());
break;
case 4:
if (player_can_smell())
- msg::stream << "You smell " << weird_smell() << "." << std::endl;
+ mprf("You smell %s.", weird_smell().c_str());
else if (you.species == SP_MUMMY)
mpr("Your bandages flutter.");
else
@@ -801,9 +800,7 @@ void random_uselessness(unsigned char ru, unsigned char sc_read_2)
: "the tinkle of an enormous bell");
break;
}
-
- return;
-} // end random_uselessness()
+}
static armour_type random_nonbody_armour_type()
{
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index f8eae1a32f..fc46e4354b 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -1066,9 +1066,11 @@ static const char *_chunk_flavour_phrase(bool likes_chunks)
{
const int gourmand = you.duration[DUR_GOURMAND];
if (gourmand >= GOURMAND_MAX)
+ {
phrase =
one_chance_in(1000)? "tastes like chicken!"
: "tastes great.";
+ }
else if (gourmand > GOURMAND_MAX * 75 / 100)
phrase = "tastes very good.";
else if (gourmand > GOURMAND_MAX * 50 / 100)
@@ -1228,7 +1230,7 @@ static void _eat_chunk( int chunk_effect, bool cannibal, int mon_intel )
if (do_eat)
{
- start_delay( DELAY_EAT, 2, (suppress_msg) ? 0 : nutrition );
+ start_delay( DELAY_EAT, 2, (suppress_msg) ? 0 : nutrition, -1 );
lessen_hunger( nutrition, true );
}
@@ -1237,7 +1239,6 @@ static void _eat_chunk( int chunk_effect, bool cannibal, int mon_intel )
static void _eating(unsigned char item_class, int item_type)
{
- int temp_rand; // probability determination {dlb}
int food_value = 0;
int how_herbivorous = player_mutation_level(MUT_HERBIVOROUS);
int how_carnivorous = player_mutation_level(MUT_CARNIVOROUS);
@@ -1260,7 +1261,8 @@ static void _eating(unsigned char item_class, int item_type)
case FOOD_HONEYCOMB:
food_value = 2000;
break;
- case FOOD_SNOZZCUMBER: // maybe a nasty side-effect from RD's book?
+ case FOOD_SNOZZCUMBER: // Maybe a nasty side-effect from RD's book?
+ // I'd like that, but I don't dare. (jpeg)
case FOOD_PIZZA:
case FOOD_BEEF_JERKY:
food_value = 1500;
@@ -1297,7 +1299,7 @@ static void _eating(unsigned char item_class, int item_type)
break;
} // end base sustenance listing {dlb}
- // next, sustenance modifier for carnivores/herbivores {dlb}:
+ // Next, sustenance modifier for carnivores/herbivores {dlb}:
switch (item_type)
{
case FOOD_MEAT_RATION:
@@ -1344,135 +1346,13 @@ static void _eating(unsigned char item_class, int item_type)
break;
} // end carnivore/herbivore modifier listing {dlb}
- // next, let's take care of messaging {dlb}:
+ // Next, let's take care of messaging {dlb}:
if (how_carnivorous > 0 && carnivore_modifier < 0)
mpr("Blech - you need meat!");
else if (how_herbivorous > 0 && herbivore_modifier < 0)
mpr("Blech - you need greens!");
- if (how_herbivorous < 1)
- {
- switch (item_type)
- {
- case FOOD_MEAT_RATION:
- mpr("That meat ration really hit the spot!");
- break;
- case FOOD_BEEF_JERKY:
- mprf("That beef jerky was %s!",
- one_chance_in(4) ? "jerk-a-riffic"
- : "delicious");
- break;
- case FOOD_SAUSAGE:
- mpr("That sausage was delicious!");
- break;
- default:
- break;
- }
- }
-
- if (how_carnivorous < 1)
- {
- switch (item_type)
- {
- case FOOD_BREAD_RATION:
- mpr("That bread ration really hit the spot!");
- break;
- case FOOD_PEAR:
- case FOOD_APPLE:
- case FOOD_APRICOT:
- mprf("Mmmm... Yummy %s.",
- (item_type == FOOD_APPLE) ? "apple." :
- (item_type == FOOD_PEAR) ? "pear." :
- (item_type == FOOD_APRICOT) ? "apricot."
- : "fruit.");
- break;
- case FOOD_CHOKO:
- mpr("That choko was very bland.");
- break;
- case FOOD_SNOZZCUMBER:
- mpr("That snozzcumber tasted truly putrid!");
- break;
- case FOOD_ORANGE:
- mprf("That orange was delicious!%s",
- one_chance_in(8) ? " Even the peel tasted good!" : "");
- break;
- case FOOD_BANANA:
- mprf("That banana was delicious!%s",
- one_chance_in(8) ? " Even the peel tasted good!" : "");
- break;
- case FOOD_STRAWBERRY:
- mpr("That strawberry was delicious!");
- break;
- case FOOD_RAMBUTAN:
- mpr("That rambutan was delicious!");
- break;
- case FOOD_LEMON:
- mpr("That lemon was rather sour... But delicious nonetheless!");
- break;
- case FOOD_GRAPE:
- mpr("That grape was delicious!");
- break;
- case FOOD_SULTANA:
- mpr("That sultana was delicious! (but very small)");
- break;
- case FOOD_LYCHEE:
- mpr("That lychee was delicious!");
- break;
- default:
- break;
- }
- }
-
- switch (item_type)
- {
- case FOOD_HONEYCOMB:
- mpr("That honeycomb was delicious.");
- break;
- case FOOD_ROYAL_JELLY:
- mpr("That royal jelly was delicious!");
- restore_stat(STAT_ALL, 0, false);
- break;
- case FOOD_PIZZA:
- if (!SysEnv.crawl_pizza.empty() && !one_chance_in(3))
- mprf("Mmm... %s.", SysEnv.crawl_pizza.c_str());
- else
- {
- if (how_carnivorous >= 1) // non-vegetable
- temp_rand = 5 + random2(4);
- else if (how_herbivorous >= 1) // non-meaty
- temp_rand = random2(6) + 2;
- else
- temp_rand = random2(9);
-
- mprf("Mmm... %s",
- (temp_rand == 0) ? "Ham and pineapple." :
- (temp_rand == 2) ? "Vegetable." :
- (temp_rand == 3) ? "Pepperoni." :
- (temp_rand == 4) ? "Yeuchh - Anchovies!" :
- (temp_rand == 5) ? "Cheesy." :
- (temp_rand == 6) ? "Supreme." :
- (temp_rand == 7) ? "Super Supreme!"
- : "Chicken.");
- }
- break;
- case FOOD_CHEESE:
- temp_rand = random2(9);
- mprf("Mmm...%s.",
- (temp_rand == 0) ? "Cheddar" :
- (temp_rand == 1) ? "Edam" :
- (temp_rand == 2) ? "Wensleydale" :
- (temp_rand == 3) ? "Camembert" :
- (temp_rand == 4) ? "Goat cheese" :
- (temp_rand == 5) ? "Fruit cheese" :
- (temp_rand == 6) ? "Mozzarella" :
- (temp_rand == 7) ? "Sheep cheese"
- : "Yak cheese");
- break;
- default:
- break;
- }
-
- // finally, modify player's hunger level {dlb}:
+ // Finally, modify player's hunger level {dlb}:
if (carnivore_modifier && how_carnivorous > 0)
food_value += (carnivore_modifier * how_carnivorous);
@@ -1481,11 +1361,11 @@ static void _eating(unsigned char item_class, int item_type)
if (food_value > 0)
{
+ int duration = 1;
if (item_type == FOOD_MEAT_RATION || item_type == FOOD_BREAD_RATION)
- start_delay( DELAY_EAT, 3 );
- else
- start_delay( DELAY_EAT, 1 );
+ duration = 3;
+ start_delay( DELAY_EAT, 1, 0, item_type );
lessen_hunger( food_value, true );
}
break;
@@ -1497,6 +1377,176 @@ static void _eating(unsigned char item_class, int item_type)
return;
} // end eating()
+// Handle messaging at the end of eating.
+// Some food types may not get a message.
+void finished_eating_message(int food_type)
+{
+ bool herbivorous = player_mutation_level(MUT_HERBIVOROUS) > 0;
+ bool carnivorous = player_mutation_level(MUT_CARNIVOROUS) > 0;
+
+ if (herbivorous)
+ {
+ switch (food_type)
+ {
+ case FOOD_MEAT_RATION:
+ case FOOD_BEEF_JERKY:
+ case FOOD_SAUSAGE:
+ mpr("Blech - you need greens!");
+ return;
+ default:
+ break;
+ }
+ }
+ else
+ {
+ switch (food_type)
+ {
+ case FOOD_MEAT_RATION:
+ mpr("That meat ration really hit the spot!");
+ return;
+ case FOOD_BEEF_JERKY:
+ mprf("That beef jerky was %s!",
+ one_chance_in(4) ? "jerk-a-riffic"
+ : "delicious");
+ return;
+ case FOOD_SAUSAGE:
+ mpr("That sausage was delicious!");
+ return;
+ default:
+ break;
+ }
+ }
+
+ if (carnivorous)
+ {
+ switch (food_type)
+ {
+ case FOOD_BREAD_RATION:
+ case FOOD_BANANA:
+ case FOOD_ORANGE:
+ case FOOD_LEMON:
+ case FOOD_PEAR:
+ case FOOD_APPLE:
+ case FOOD_APRICOT:
+ case FOOD_CHOKO:
+ case FOOD_SNOZZCUMBER:
+ case FOOD_RAMBUTAN:
+ case FOOD_LYCHEE:
+ case FOOD_STRAWBERRY:
+ case FOOD_GRAPE:
+ case FOOD_SULTANA:
+ mpr("Blech - you need meat!");
+ return;
+ default:
+ break;
+ }
+ }
+ else
+ {
+ switch (food_type)
+ {
+ case FOOD_BREAD_RATION:
+ mpr("That bread ration really hit the spot!");
+ return;
+ case FOOD_PEAR:
+ case FOOD_APPLE:
+ case FOOD_APRICOT:
+ mprf("Mmmm... Yummy %s.",
+ (food_type == FOOD_APPLE) ? "apple." :
+ (food_type == FOOD_PEAR) ? "pear." :
+ (food_type == FOOD_APRICOT) ? "apricot."
+ : "fruit.");
+ return;
+ case FOOD_CHOKO:
+ mpr("That choko was very bland.");
+ return;
+ case FOOD_SNOZZCUMBER:
+ mpr("That snozzcumber tasted truly putrid!");
+ return;
+ case FOOD_ORANGE:
+ mprf("That orange was delicious!%s",
+ one_chance_in(8) ? " Even the peel tasted good!" : "");
+ return;
+ case FOOD_BANANA:
+ mprf("That banana was delicious!%s",
+ one_chance_in(8) ? " Even the peel tasted good!" : "");
+ return;
+ case FOOD_STRAWBERRY:
+ mpr("That strawberry was delicious!");
+ return;
+ case FOOD_RAMBUTAN:
+ mpr("That rambutan was delicious!");
+ return;
+ case FOOD_LEMON:
+ mpr("That lemon was rather sour... but delicious nonetheless!");
+ return;
+ case FOOD_GRAPE:
+ mpr("That grape was delicious!");
+ return;
+ case FOOD_SULTANA:
+ mpr("That sultana was delicious! (but very small)");
+ return;
+ case FOOD_LYCHEE:
+ mpr("That lychee was delicious!");
+ return;
+ default:
+ break;
+ }
+ }
+
+ switch (food_type)
+ {
+ case FOOD_HONEYCOMB:
+ mpr("That honeycomb was delicious.");
+ break;
+ case FOOD_ROYAL_JELLY:
+ mpr("That royal jelly was delicious!");
+ restore_stat(STAT_ALL, 0, false);
+ break;
+ case FOOD_PIZZA:
+ if (!SysEnv.crawl_pizza.empty() && !one_chance_in(3))
+ mprf("Mmm... %s.", SysEnv.crawl_pizza.c_str());
+ else
+ {
+ int temp_rand;
+ if (carnivorous) // non-vegetable
+ temp_rand = 5 + random2(4);
+ else if (herbivorous) // non-meaty
+ temp_rand = random2(6) + 2;
+ else
+ temp_rand = random2(9);
+
+ mprf("Mmm... %s",
+ (temp_rand == 0) ? "Ham and pineapple." :
+ (temp_rand == 2) ? "Vegetable." :
+ (temp_rand == 3) ? "Pepperoni." :
+ (temp_rand == 4) ? "Yeuchh - Anchovies!" :
+ (temp_rand == 5) ? "Cheesy." :
+ (temp_rand == 6) ? "Supreme." :
+ (temp_rand == 7) ? "Super Supreme!"
+ : "Chicken.");
+ }
+ break;
+ case FOOD_CHEESE:
+ {
+ int temp_rand = random2(9);
+ mprf("Mmm...%s.",
+ (temp_rand == 0) ? "Cheddar" :
+ (temp_rand == 1) ? "Edam" :
+ (temp_rand == 2) ? "Wensleydale" :
+ (temp_rand == 3) ? "Camembert" :
+ (temp_rand == 4) ? "Goat cheese" :
+ (temp_rand == 5) ? "Fruit cheese" :
+ (temp_rand == 6) ? "Mozzarella" :
+ (temp_rand == 7) ? "Sheep cheese"
+ : "Yak cheese");
+ break;
+ }
+ default:
+ break;
+ }
+}
+
// Divide full nutrition by duration, so that each turn you get the same
// amount of nutrition. Also, experimentally regenerate 1 hp per feeding turn
// - this is likely too strong.
diff --git a/crawl-ref/source/food.h b/crawl-ref/source/food.h
index 0fffa89981..32410065ae 100644
--- a/crawl-ref/source/food.h
+++ b/crawl-ref/source/food.h
@@ -105,6 +105,8 @@ void chunk_nutrition_message(int nutrition);
void vampire_nutrition_per_turn(const item_def &corpse,
int feeding = 0);
+void finished_eating_message(int food_type);
+
int you_max_hunger();
int you_min_hunger();
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 8799354ac7..950ea4ba6c 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -3889,13 +3889,16 @@ bool enchant_weapon( enchant_stat_type which_stat, bool quiet, item_def &wpn )
}
static bool _handle_enchant_weapon( enchant_stat_type which_stat,
- bool quiet, int item_slot )
+ bool quiet, int item_slot )
{
if (item_slot == -1)
item_slot = you.equip[ EQ_WEAPON ];
if (item_slot == -1)
+ {
+ canned_msg(MSG_NOTHING_HAPPENS);
return (false);
+ }
item_def& wpn(you.inv[item_slot]);
@@ -4158,7 +4161,7 @@ void read_scroll( int slot )
return;
}
- // here we try to read a book {dlb}:
+ // Here we try to read a book {dlb}:
if (scroll.base_type == OBJ_BOOKS)
{
handle_read_book( item_slot );
@@ -4172,10 +4175,10 @@ void read_scroll( int slot )
return;
}
- // ok - now we FINALLY get to read a scroll !!! {dlb}
+ // Ok - now we FINALLY get to read a scroll !!! {dlb}
you.turn_is_over = true;
- // imperfect vision prevents players from reading actual content {dlb}:
+ // Imperfect vision prevents players from reading actual content {dlb}:
if (player_mutation_level(MUT_BLURRY_VISION)
&& random2(5) < player_mutation_level(MUT_BLURRY_VISION))
{
@@ -4185,10 +4188,10 @@ void read_scroll( int slot )
return;
}
- // decrement and handle inventory if any scroll other than paper {dlb}:
+ // Decrement and handle inventory if any scroll other than paper {dlb}:
const scroll_type which_scroll = static_cast<scroll_type>(scroll.sub_type);
- if (which_scroll != SCR_PAPER &&
- (which_scroll != SCR_IMMOLATION || you.duration[DUR_CONF]))
+ if (which_scroll != SCR_PAPER
+ && (which_scroll != SCR_IMMOLATION || you.duration[DUR_CONF]))
{
mpr("As you read the scroll, it crumbles to dust.");
// Actual removal of scroll done afterwards. -- bwr
@@ -4197,7 +4200,7 @@ void read_scroll( int slot )
const bool alreadyknown = item_type_known(scroll);
const bool dangerous = player_in_a_dangerous_place();
- // scrolls of paper are also exempted from this handling {dlb}:
+ // Scrolls of paper are also exempted from this handling {dlb}:
if (which_scroll != SCR_PAPER)
{
if (you.duration[DUR_CONF])
@@ -4298,27 +4301,28 @@ void read_scroll( int slot )
case SCR_TORMENT:
torment( TORMENT_SCROLL, you.x_pos, you.y_pos );
- // is only naughty if you know you're doing it
+ // Is only naughty if you know you're doing it.
did_god_conduct(DID_UNHOLY, 10, item_type_known(scroll));
break;
case SCR_IMMOLATION:
mpr("The scroll explodes in your hands!");
- // we do this here to prevent it from blowing itself up
+ // We do this here to prevent it from blowing itself up.
dec_inv_item_quantity( item_slot, 1 );
- beam.type = dchar_glyph(DCHAR_FIRED_BURST);
- beam.damage = dice_def( 3, 10 );
// unsure about this // BEAM_EXPLOSION instead? {dlb}
- beam.flavour = BEAM_FIRE;
- beam.target_x = you.x_pos;
- beam.target_y = you.y_pos;
- beam.name = "fiery explosion";
- beam.colour = RED;
+ beam.flavour = BEAM_FIRE;
+
+ beam.type = dchar_glyph(DCHAR_FIRED_BURST);
+ beam.damage = dice_def( 3, 10 );
+ beam.target_x = you.x_pos;
+ beam.target_y = you.y_pos;
+ beam.name = "fiery explosion";
+ beam.colour = RED;
// your explosion, (not someone else's explosion)
- beam.thrower = KILL_YOU;
- beam.aux_source = "reading a scroll of immolation";
- beam.ex_size = 2;
+ beam.thrower = KILL_YOU;
+ beam.aux_source = "reading a scroll of immolation";
+ beam.ex_size = 2;
beam.is_explosion = true;
if (!alreadyknown)
@@ -4344,7 +4348,7 @@ void read_scroll( int slot )
}
break;
- // everything [in the switch] below this line is a nightmare {dlb}:
+ // Everything [in the switch] below this line is a nightmare {dlb}:
case SCR_ENCHANT_WEAPON_I:
id_the_scroll = _handle_enchant_weapon( ENCHANT_TO_HIT );
break;
@@ -4366,7 +4370,6 @@ void read_scroll( int slot )
mprf("%s glows bright yellow for a while.", iname.c_str() );
do_uncurse_item( you.inv[you.equip[EQ_WEAPON]] );
-
_handle_enchant_weapon( ENCHANT_TO_HIT, true );
if (coinflip())
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index bc1b0a4df0..90a5b87cee 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -2404,6 +2404,8 @@ void new_level(void)
#endif
}
+// XXX: Why the lowercasing? I mean why not list the messages as lowercased
+// in the first place? (jpeg)
std::string weird_glowing_colour()
{
std::string result = getRandNameString("glowing_colour_name");
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index 2b79da96cb..a41e4b6f3f 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -257,8 +257,8 @@
// draconians ('d')
{ // Base draconian -- for use like MONS_HUMAN, MONS_ELF although we
- // now store the draconian subspecies in the high byte of mon->number
- // for those listed as species MONS_DRACONIAN.
+ // now store the draconian subspecies in base_monster for those
+ // listed as species MONS_DRACONIAN.
MONS_DRACONIAN, 'd', BROWN, "draconian",
M_COLD_BLOOD | M_SPEAKS,
MR_NO_FLAGS,
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index b66c4cad13..418bcc373c 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -139,6 +139,7 @@ static void _initialize_randmons()
{
if (invalid_monster_class(m))
continue;
+
if (monster_habitable_grid(m, grid))
monsters_by_habitat[i].push_back(static_cast<monster_type>(m));
}
@@ -158,9 +159,10 @@ monster_type random_monster_at_grid(dungeon_feature_type grid)
const habitat_type ht = grid2habitat(grid);
const std::vector<monster_type> &valid_mons = monsters_by_habitat[ht];
+
ASSERT(!valid_mons.empty());
- return valid_mons.empty()? MONS_PROGRAM_BUG
- : valid_mons[ random2(valid_mons.size()) ];
+ return (valid_mons.empty() ? MONS_PROGRAM_BUG
+ : valid_mons[ random2(valid_mons.size()) ]);
}
typedef std::map<std::string, unsigned> mon_name_map;
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 70f28e54fa..fb5dec3f53 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -91,6 +91,7 @@ bool monster_habitable_grid(const monsters *m,
{
// Zombified monsters enjoy the same habitat as their original.
const int type = mons_is_zombified(m) ? mons_zombie_base(m) : m->type;
+
return (monster_habitable_grid(type, actual_grid, mons_flies(m),
m->paralysed()));
}
@@ -116,6 +117,7 @@ bool monster_habitable_grid(int monster_class,
{
const dungeon_feature_type preferred_habitat =
habitat2grid( mons_habitat_by_type(monster_class) );
+
return (grid_compatible(preferred_habitat, actual_grid)
// [dshaligram] Flying creatures are all DNGN_FLOOR, so we
// only have to check for the additional valid grids of deep
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 2e0cffac11..19e4259a87 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -480,7 +480,7 @@ static bool _is_pet_kill(killer_type killer, int i)
return (false);
const monsters *m = &menv[i];
- if (mons_friendly(m)) // this includes enslaved monsters
+ if (mons_friendly(m)) // This includes enslaved monsters.
return (true);
// Check if the monster was confused by you or a friendly, which
@@ -1055,9 +1055,25 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
if (attacker_holy == MH_UNDEAD)
{
if (targ_holy == MH_NATURAL)
- notice |=
- did_god_conduct(DID_LIVING_KILLED_BY_UNDEAD_SLAVE,
- monster->hit_dice);
+ {
+ // Yes, this is a hack, but it makes sure that confused
+ // monsters doing the kill are not referred to as
+ // "slave", and I think it's okay that Yredelemnul
+ // ignores kills done by confused monsters as opposed
+ // to enslaved or friendly ones. (jpeg)
+ if (mons_friendly(&menv[i]))
+ {
+ notice |=
+ did_god_conduct(DID_LIVING_KILLED_BY_UNDEAD_SLAVE,
+ monster->hit_dice);
+ }
+ else
+ {
+ notice |=
+ did_god_conduct(DID_LIVING_KILLED_BY_SERVANT,
+ monster->hit_dice);
+ }
+ }
}
else if (you.religion == GOD_VEHUMET
|| you.religion == GOD_MAKHLEB
@@ -1231,20 +1247,14 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
}
else if (monster->type == MONS_BORIS && !in_transit)
{
- // XXX: actual blood curse effect for Boris? -- bwr
+ // XXX: Actual blood curse effect for Boris? -- bwr
- if (one_chance_in(5))
- mons_speaks( monster );
- else
+ // Provide the player with an ingame clue to Boris' return. -- bwr
+ std::string msg = getSpeakString("Boris return_speech");
+ if (!msg.empty())
{
- // Provide the player with an ingame clue to Boris' return. -- bwr
- std::string msg = getSpeakString("Boris return_speech");
-
- if (!msg.empty())
- {
- msg = do_mon_str_replacements(msg, monster);
- mpr(msg.c_str(), MSGCH_TALK);
- }
+ msg = do_mon_str_replacements(msg, monster);
+ mpr(msg.c_str(), MSGCH_TALK);
}
// Now that Boris is dead, he's a valid target for monster
@@ -3109,6 +3119,7 @@ static void _handle_nearby_ability(monsters *monster)
if (one_chance_in(chance))
mons_speaks(monster);
}
+ // Okay then, don't speak.
if (monster_can_submerge(monster, grd[monster->x][monster->y])
&& !player_beheld_by(monster) // no submerging if player entranced
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index e1af2c44fc..1a788578f7 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -985,7 +985,7 @@ void monster_teleport(struct monsters *monster, bool instan, bool silent)
const coord_def oldplace = monster->pos();
- // pick the monster up
+ // Pick the monster up.
mgrd(oldplace) = NON_MONSTER;
if (mons_is_caught(monster))
@@ -997,7 +997,7 @@ void monster_teleport(struct monsters *monster, bool instan, bool silent)
newx = 10 + random2(GXM - 20);
newy = 10 + random2(GYM - 20);
- // don't land on top of another monster
+ // Don't land on top of another monster.
if (mgrd[newx][newy] != NON_MONSTER
|| newx == you.x_pos && newy == you.y_pos)
{
@@ -1061,46 +1061,40 @@ void setup_dragon(struct monsters *monster, struct bolt &pbolt)
case MONS_DRAGON:
case MONS_LINDWURM:
case MONS_XTAHUA:
- pbolt.name += "blast of flame";
- pbolt.flavour = BEAM_FIRE;
- pbolt.colour = RED;
+ pbolt.name += "blast of flame";
pbolt.aux_source = "blast of fiery breath";
+ pbolt.flavour = BEAM_FIRE;
+ pbolt.colour = RED;
break;
case MONS_ICE_DRAGON:
- pbolt.name += "blast of cold";
- pbolt.flavour = BEAM_COLD;
- pbolt.colour = WHITE;
+ pbolt.name += "blast of cold";
pbolt.aux_source = "blast of icy breath";
+ pbolt.flavour = BEAM_COLD;
+ pbolt.colour = WHITE;
break;
case MONS_RED_DRACONIAN:
- pbolt.name += "searing blast";
-#ifdef DEBUG_DIAGNOSTICS
- mprf( MSGCH_DIAGNOSTICS, "bolt name: '%s'", pbolt.name.c_str() );
-#endif
- pbolt.flavour = BEAM_FIRE;
- pbolt.colour = RED;
+ pbolt.name += "searing blast";
pbolt.aux_source = "blast of searing breath";
- scaling = 65;
+ pbolt.flavour = BEAM_FIRE;
+ pbolt.colour = RED;
+ scaling = 65;
break;
case MONS_WHITE_DRACONIAN:
- pbolt.name += "chilling blast";
-#ifdef DEBUG_DIAGNOSTICS
- mprf( MSGCH_DIAGNOSTICS, "bolt name: '%s'", pbolt.name.c_str() );
-#endif
- pbolt.flavour = BEAM_COLD;
- pbolt.colour = WHITE;
+ pbolt.name += "chilling blast";
pbolt.aux_source = "blast of chilling breath";
+ pbolt.flavour = BEAM_COLD;
+ pbolt.colour = WHITE;
scaling = 65;
break;
case MONS_PLAYER_GHOST: // draconians only
- pbolt.name += "blast of negative energy";
- pbolt.flavour = BEAM_NEG;
- pbolt.colour = DARKGREY;
+ pbolt.name += "blast of negative energy";
pbolt.aux_source = "blast of draining breath";
+ pbolt.flavour = BEAM_NEG;
+ pbolt.colour = DARKGREY;
scaling = 65;
break;
@@ -1109,6 +1103,10 @@ void setup_dragon(struct monsters *monster, struct bolt &pbolt)
break;
}
+#ifdef DEBUG_DIAGNOSTICS
+ mprf( MSGCH_DIAGNOSTICS, "bolt name: '%s'", pbolt.name.c_str() );
+#endif
+
pbolt.range = 4;
pbolt.rangeMax = 13;
pbolt.damage = dice_def( 3, (monster->hit_dice * 2) );
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 2e9b77c446..1303d72551 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -899,8 +899,8 @@ static std::string _level_description_string_hud()
short_name += make_stringf(":%d", player_branch_depth());
}
// Indefinite articles
- else if ( place.level_type == LEVEL_PORTAL_VAULT
- || place.level_type == LEVEL_LABYRINTH)
+ else if (place.level_type == LEVEL_PORTAL_VAULT
+ || place.level_type == LEVEL_LABYRINTH)
{
if (you.level_type_name == "bazaar")
short_name = "A Bazaar";
@@ -1481,16 +1481,8 @@ const char* itosym3(int stat)
static const char *s_equip_slot_names[] =
{
- "Weapon",
- "Cloak",
- "Helmet",
- "Gloves",
- "Boots",
- "Shield",
- "Armour",
- "Left Ring",
- "Right Ring",
- "Amulet",
+ "Weapon", "Cloak", "Helmet", "Gloves", "Boots",
+ "Shield", "Armour", "Left Ring", "Right Ring", "Amulet",
};
const char *equip_slot_to_name(int equip)
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index aa41e1c14e..a1268d9d0b 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1820,8 +1820,8 @@ std::string god_name( god_type which_god, bool long_name )
{
case GOD_NO_GOD: return "No God";
case GOD_RANDOM: return "random";
- case GOD_ZIN: return (long_name ? "Zin the Law-Giver" : "Zin");
- case GOD_SHINING_ONE: return "The Shining One";
+ case GOD_ZIN: return (long_name ? "Zin the Law-Giver" : "Zin");
+ case GOD_SHINING_ONE: return "The Shining One";
case GOD_KIKUBAAQUDGHA: return "Kikubaaqudgha";
case GOD_YREDELEMNUL:
return (long_name ? "Yredelemnul the Dark" : "Yredelemnul");
@@ -1833,8 +1833,8 @@ std::string god_name( god_type which_god, bool long_name )
case GOD_TROG: return (long_name ? "Trog the Wrathful" : "Trog");
case GOD_NEMELEX_XOBEH: return "Nemelex Xobeh";
case GOD_ELYVILON: return (long_name ? "Elyvilon the Healer" : "Elyvilon");
- case GOD_LUGONU: return (long_name ? "Lugonu the Unformed" : "Lugonu");
- case GOD_BEOGH: return (long_name ? "Beogh the Brigand" : "Beogh");
+ case GOD_LUGONU: return (long_name ? "Lugonu the Unformed" : "Lugonu");
+ case GOD_BEOGH: return (long_name ? "Beogh the Brigand" : "Beogh");
case GOD_XOM:
if (!long_name)
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index fc80ab2600..597e5a8887 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -128,10 +128,10 @@ bool remove_curse(bool suppress_msg)
int loopy = 0; // general purpose loop variable {dlb}
bool success = false; // whether or not curse(s) removed {dlb}
- // special "wield slot" case - see if you can figure out why {dlb}:
- // because only cursed weapons in hand only count as cursed -- bwr
+ // Special "wield slot" case - see if you can figure out why {dlb}:
+ // ... because only cursed weapons in hand count as cursed -- bwr
if (you.equip[EQ_WEAPON] != -1
- && you.inv[you.equip[EQ_WEAPON]].base_type == OBJ_WEAPONS)
+ && you.inv[you.equip[EQ_WEAPON]].base_type == OBJ_WEAPONS)
{
if (item_cursed( you.inv[you.equip[EQ_WEAPON]] ))
{
@@ -141,8 +141,8 @@ bool remove_curse(bool suppress_msg)
}
}
- // everything else uses the same paradigm - are we certain?
- // what of artefact rings and amulets? {dlb}:
+ // Everything else uses the same paradigm - are we certain?
+ // What of artefact rings and amulets? {dlb}:
for (loopy = EQ_CLOAK; loopy < NUM_EQUIP; loopy++)
{
if (you.equip[loopy] != -1 && item_cursed(you.inv[you.equip[loopy]]))
@@ -152,7 +152,7 @@ bool remove_curse(bool suppress_msg)
}
}
- // messaging output {dlb}:
+ // Messaging output. {dlb}:
if (!suppress_msg)
{
if (success)
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index c7ef5a6782..a182e2bb0e 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -3306,26 +3306,47 @@ void tutorial_inscription_info(bool autoinscribe)
std::ostringstream text;
text << "<" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
+ bool longtext = false;
if (!autoinscribe || wherey() <= get_number_of_lines() - 10)
{
text << EOL
"Inscriptions are a powerful concept of Dungeon Crawl." EOL
"You can inscribe items to differentiate them, or to comment on them, " EOL
"but also to set rules for item interaction. If you are new to Crawl, " EOL
- "you can safely ignore this feature, though." EOL;
+ "you can safely ignore this feature, though.";
+
+ longtext = true;
}
if (autoinscribe && wherey() <= get_number_of_lines() - 6)
{
- text << EOL EOL
+ text << EOL
"Artefacts can be autoinscribed to give a brief overview of their " EOL
"known properties. Here, doing a <w>left mouse click</w> will autoinscribe " EOL
- "this item." EOL;
+ "this item.";
+
+ longtext = true;
}
- text << "(In the main screen, press <w>?6</w> for more information.)" EOL;
+ text << EOL
+ "(In the main screen, press <w>?6</w> for more information.)" EOL;
text << "</" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
formatted_string::parse_string(text.str()).display();
+
+ if (longtext && wherey() <= get_number_of_lines() - 2)
+ {
+ if (autoinscribe)
+ {
+ formatted_string::parse_string(
+ "<cyan>So, do you wish to inscribe this item? "
+ "('a' to autoinscribe) ").display();
+ }
+ else
+ {
+ formatted_string::parse_string(
+ "<cyan>So, do you wish to inscribe this item? ").display();
+ }
+ }
}
bool tutorial_pos_interesting(int x, int y)
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 674b576ec8..0ccaa3aa98 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -269,7 +269,7 @@ bool is_terrain_changed( int x, int y )
return (env.map[x][y].flags & MAP_CHANGED_FLAG);
}
-// used to mark dug out areas, unset when terrain is seen or mapped again.
+// Used to mark dug out areas, unset when terrain is seen or mapped again.
void set_terrain_changed( int x, int y )
{
env.map[x][y].flags |= MAP_CHANGED_FLAG;
@@ -3474,13 +3474,14 @@ void show_map( coord_def &spec_place, bool travel_mode )
bool magic_mapping(int map_radius, int proportion, bool suppress_msg,
bool force)
{
- if (!force &&
- (testbits(env.level_flags, LFLAG_NO_MAGIC_MAP)
- || testbits(get_branch_flags(), BFLAG_NO_MAGIC_MAP)))
+ if (!force
+ && (testbits(env.level_flags, LFLAG_NO_MAGIC_MAP)
+ || testbits(get_branch_flags(), BFLAG_NO_MAGIC_MAP)))
{
if (!suppress_msg)
mpr("You feel momentarily disoriented.");
- return false;
+
+ return (false);
}
if (!suppress_msg)
@@ -3521,10 +3522,9 @@ bool magic_mapping(int map_radius, int proportion, bool suppress_msg,
#ifdef USE_TILE
if (!wizard_map && is_terrain_known(i,j))
{
- // can't use set_envmap_obj because that
- // will overwrite the gmap.
- env.tile_bk_bg[i][j] =
- tile_idx_unseen_terrain(i, j, grd[i][j]);
+ // Can't use set_envmap_obj because that would
+ // overwrite the gmap.
+ env.tile_bk_bg[i][j] = tile_idx_unseen_terrain(i, j, grd[i][j]);
}
#endif
@@ -3798,15 +3798,15 @@ void init_feature_table( void )
{
for (int i = 0; i < NUM_FEATURES; i++)
{
- Feature[i].dchar = NUM_DCHAR_TYPES;
- Feature[i].symbol = 0;
- Feature[i].colour = BLACK; // means must be set some other way
- Feature[i].flags = FFT_NONE;
- Feature[i].magic_symbol = 0; // made equal to symbol if untouched
- Feature[i].map_colour = DARKGREY;
- Feature[i].seen_colour = BLACK; // marks no special seen map handling
+ Feature[i].dchar = NUM_DCHAR_TYPES;
+ Feature[i].symbol = 0;
+ Feature[i].colour = BLACK; // means must be set some other way
+ Feature[i].flags = FFT_NONE;
+ Feature[i].magic_symbol = 0; // set to symbol if unchanged
+ Feature[i].map_colour = DARKGREY;
+ Feature[i].seen_colour = BLACK; // -> no special seen map handling
Feature[i].seen_em_colour = BLACK;
- Feature[i].em_colour = BLACK;
+ Feature[i].em_colour = BLACK;
switch (i)
{
@@ -3816,150 +3816,150 @@ void init_feature_table( void )
case DNGN_ROCK_WALL:
case DNGN_PERMAROCK_WALL:
- Feature[i].dchar = DCHAR_WALL;
- Feature[i].colour = EC_ROCK;
+ Feature[i].dchar = DCHAR_WALL;
+ Feature[i].colour = EC_ROCK;
Feature[i].magic_symbol = Options.char_table[ DCHAR_WALL_MAGIC ];
break;
case DNGN_STONE_WALL:
- Feature[i].dchar = DCHAR_WALL;
- Feature[i].colour = EC_STONE;
+ Feature[i].dchar = DCHAR_WALL;
+ Feature[i].colour = EC_STONE;
Feature[i].magic_symbol = Options.char_table[ DCHAR_WALL_MAGIC ];
break;
case DNGN_CLEAR_ROCK_WALL:
case DNGN_CLEAR_STONE_WALL:
case DNGN_CLEAR_PERMAROCK_WALL:
- Feature[i].dchar = DCHAR_WALL;
+ Feature[i].dchar = DCHAR_WALL;
Feature[i].magic_symbol = Options.char_table[ DCHAR_WALL_MAGIC ];
- Feature[i].colour = LIGHTCYAN;
+ Feature[i].colour = LIGHTCYAN;
break;
case DNGN_OPEN_DOOR:
- Feature[i].dchar = DCHAR_DOOR_OPEN;
+ Feature[i].dchar = DCHAR_DOOR_OPEN;
Feature[i].colour = LIGHTGREY;
break;
case DNGN_CLOSED_DOOR:
- Feature[i].dchar = DCHAR_DOOR_CLOSED;
+ Feature[i].dchar = DCHAR_DOOR_CLOSED;
Feature[i].colour = LIGHTGREY;
break;
case DNGN_METAL_WALL:
- Feature[i].dchar = DCHAR_WALL;
- Feature[i].colour = CYAN;
+ Feature[i].dchar = DCHAR_WALL;
+ Feature[i].colour = CYAN;
Feature[i].magic_symbol = Options.char_table[ DCHAR_WALL_MAGIC ];
break;
case DNGN_SECRET_DOOR:
- // Note: get_secret_door_appearance means this probably isn't used
- Feature[i].dchar = DCHAR_WALL;
- Feature[i].colour = EC_ROCK;
+ // Note: get_secret_door_appearance means this probably isn't used.
+ Feature[i].dchar = DCHAR_WALL;
+ Feature[i].colour = EC_ROCK;
Feature[i].magic_symbol = Options.char_table[ DCHAR_WALL_MAGIC ];
break;
case DNGN_GREEN_CRYSTAL_WALL:
- Feature[i].dchar = DCHAR_WALL;
- Feature[i].colour = GREEN;
+ Feature[i].dchar = DCHAR_WALL;
+ Feature[i].colour = GREEN;
Feature[i].magic_symbol = Options.char_table[ DCHAR_WALL_MAGIC ];
break;
case DNGN_ORCISH_IDOL:
- Feature[i].dchar = DCHAR_STATUE;
- Feature[i].colour = RED; // plain Orc colour
+ Feature[i].dchar = DCHAR_STATUE;
+ Feature[i].colour = LIGHTRED; // plain orc colour
break;
case DNGN_WAX_WALL:
- Feature[i].dchar = DCHAR_WALL;
- Feature[i].colour = YELLOW;
+ Feature[i].dchar = DCHAR_WALL;
+ Feature[i].colour = YELLOW;
Feature[i].magic_symbol = Options.char_table[ DCHAR_WALL_MAGIC ];
break; // wax wall
case DNGN_GRANITE_STATUE:
- Feature[i].dchar = DCHAR_STATUE;
+ Feature[i].dchar = DCHAR_STATUE;
Feature[i].colour = DARKGREY;
break;
case DNGN_LAVA:
- Feature[i].dchar = DCHAR_WAVY;
+ Feature[i].dchar = DCHAR_WAVY;
Feature[i].colour = RED;
break;
case DNGN_DEEP_WATER:
- Feature[i].dchar = DCHAR_WAVY;
+ Feature[i].dchar = DCHAR_WAVY;
Feature[i].colour = BLUE;
break;
case DNGN_SHALLOW_WATER:
- Feature[i].dchar = DCHAR_WAVY;
+ Feature[i].dchar = DCHAR_WAVY;
Feature[i].colour = CYAN;
break;
case DNGN_FLOOR:
- Feature[i].dchar = DCHAR_FLOOR;
- Feature[i].colour = EC_FLOOR;
+ Feature[i].dchar = DCHAR_FLOOR;
+ Feature[i].colour = EC_FLOOR;
Feature[i].magic_symbol = Options.char_table[ DCHAR_FLOOR_MAGIC ];
break;
case DNGN_FLOOR_SPECIAL:
- Feature[i].dchar = DCHAR_FLOOR;
- Feature[i].colour = YELLOW;
+ Feature[i].dchar = DCHAR_FLOOR;
+ Feature[i].colour = YELLOW;
Feature[i].magic_symbol = Options.char_table[ DCHAR_FLOOR_MAGIC ];
break;
case DNGN_EXIT_HELL:
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].colour = LIGHTRED;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].colour = LIGHTRED;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = LIGHTRED;
break;
case DNGN_ENTER_HELL:
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].colour = RED;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].colour = RED;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = RED;
break;
case DNGN_TRAP_MECHANICAL:
- Feature[i].colour = LIGHTCYAN;
- Feature[i].dchar = DCHAR_TRAP;
+ Feature[i].colour = LIGHTCYAN;
+ Feature[i].dchar = DCHAR_TRAP;
Feature[i].map_colour = LIGHTCYAN;
break;
case DNGN_TRAP_MAGICAL:
- Feature[i].colour = MAGENTA;
- Feature[i].dchar = DCHAR_TRAP;
+ Feature[i].colour = MAGENTA;
+ Feature[i].dchar = DCHAR_TRAP;
Feature[i].map_colour = MAGENTA;
break;
case DNGN_TRAP_NATURAL:
- Feature[i].colour = BROWN;
- Feature[i].dchar = DCHAR_TRAP;
+ Feature[i].colour = BROWN;
+ Feature[i].dchar = DCHAR_TRAP;
Feature[i].map_colour = BROWN;
break;
case DNGN_UNDISCOVERED_TRAP:
- Feature[i].dchar = DCHAR_FLOOR;
- Feature[i].colour = EC_FLOOR;
+ Feature[i].dchar = DCHAR_FLOOR;
+ Feature[i].colour = EC_FLOOR;
Feature[i].magic_symbol = Options.char_table[ DCHAR_FLOOR_MAGIC ];
break;
case DNGN_ENTER_SHOP:
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].colour = YELLOW;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].colour = YELLOW;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = YELLOW;
break;
case DNGN_ENTER_LABYRINTH:
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].colour = CYAN;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].colour = CYAN;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = CYAN;
break;
@@ -3975,8 +3975,8 @@ void init_feature_table( void )
break;
case DNGN_ESCAPE_HATCH_DOWN:
- Feature[i].dchar = DCHAR_STAIRS_DOWN;
- Feature[i].colour = BROWN;
+ Feature[i].dchar = DCHAR_STAIRS_DOWN;
+ Feature[i].colour = BROWN;
Feature[i].map_colour = BROWN;
break;
@@ -3991,93 +3991,93 @@ void init_feature_table( void )
break;
case DNGN_ESCAPE_HATCH_UP:
- Feature[i].dchar = DCHAR_STAIRS_UP;
- Feature[i].colour = BROWN;
+ Feature[i].dchar = DCHAR_STAIRS_UP;
+ Feature[i].colour = BROWN;
Feature[i].map_colour = BROWN;
break;
case DNGN_STONE_STAIRS_UP_I:
case DNGN_STONE_STAIRS_UP_II:
case DNGN_STONE_STAIRS_UP_III:
- Feature[i].dchar = DCHAR_STAIRS_UP;
- Feature[i].colour = LIGHTGREY;
- Feature[i].map_colour = GREEN;
+ Feature[i].dchar = DCHAR_STAIRS_UP;
+ Feature[i].colour = LIGHTGREY;
+ Feature[i].map_colour = GREEN;
Feature[i].em_colour = WHITE;
Feature[i].seen_em_colour = WHITE;
break;
case DNGN_ENTER_DIS:
- Feature[i].colour = CYAN;
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].colour = CYAN;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = CYAN;
break;
case DNGN_ENTER_GEHENNA:
- Feature[i].colour = RED;
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].colour = RED;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = RED;
break;
case DNGN_ENTER_COCYTUS:
- Feature[i].colour = LIGHTCYAN;
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].colour = LIGHTCYAN;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = LIGHTCYAN;
break;
case DNGN_ENTER_TARTARUS:
- Feature[i].colour = DARKGREY;
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].colour = DARKGREY;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = DARKGREY;
break;
case DNGN_ENTER_ABYSS:
- Feature[i].colour = EC_RANDOM;
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].colour = EC_RANDOM;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = EC_RANDOM;
break;
case DNGN_EXIT_ABYSS:
- Feature[i].colour = EC_RANDOM;
- Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].colour = EC_RANDOM;
+ Feature[i].dchar = DCHAR_ARCH;
Feature[i].map_colour = EC_RANDOM;
break;
case DNGN_STONE_ARCH:
- Feature[i].colour = LIGHTGREY;
- Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].colour = LIGHTGREY;
+ Feature[i].dchar = DCHAR_ARCH;
Feature[i].map_colour = LIGHTGREY;
break;
case DNGN_ENTER_PANDEMONIUM:
- Feature[i].colour = LIGHTBLUE;
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].colour = LIGHTBLUE;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = LIGHTBLUE;
break;
case DNGN_EXIT_PANDEMONIUM:
- // Note: has special handling for colouring with mutation
- Feature[i].colour = LIGHTBLUE;
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].map_colour = LIGHTGREY;
+ // Note: Has special handling for colouring with mutation.
+ Feature[i].colour = LIGHTBLUE;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = LIGHTBLUE;
break;
case DNGN_TRANSIT_PANDEMONIUM:
- Feature[i].colour = LIGHTGREEN;
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].colour = LIGHTGREEN;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = LIGHTGREEN;
break;
@@ -4097,18 +4097,18 @@ void init_feature_table( void )
case DNGN_ENTER_RESERVED_2:
case DNGN_ENTER_RESERVED_3:
case DNGN_ENTER_RESERVED_4:
- Feature[i].colour = YELLOW;
- Feature[i].dchar = DCHAR_STAIRS_DOWN;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = RED;
+ Feature[i].colour = YELLOW;
+ Feature[i].dchar = DCHAR_STAIRS_DOWN;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = RED;
Feature[i].seen_colour = YELLOW;
break;
case DNGN_ENTER_ZOT:
- Feature[i].colour = MAGENTA;
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].colour = MAGENTA;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = MAGENTA;
break;
@@ -4128,128 +4128,128 @@ void init_feature_table( void )
case DNGN_RETURN_RESERVED_2:
case DNGN_RETURN_RESERVED_3:
case DNGN_RETURN_RESERVED_4:
- Feature[i].colour = YELLOW;
- Feature[i].dchar = DCHAR_STAIRS_UP;
+ Feature[i].colour = YELLOW;
+ Feature[i].dchar = DCHAR_STAIRS_UP;
Feature[i].map_colour = GREEN;
Feature[i].seen_colour = YELLOW;
break;
case DNGN_RETURN_FROM_ZOT:
- Feature[i].colour = MAGENTA;
- Feature[i].dchar = DCHAR_ARCH;
- Feature[i].map_colour = LIGHTGREY;
+ Feature[i].colour = MAGENTA;
+ Feature[i].dchar = DCHAR_ARCH;
+ Feature[i].map_colour = LIGHTGREY;
Feature[i].seen_colour = MAGENTA;
break;
case DNGN_ALTAR_ZIN:
- Feature[i].colour = WHITE;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = WHITE;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = WHITE;
break;
case DNGN_ALTAR_SHINING_ONE:
- Feature[i].colour = YELLOW;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = YELLOW;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = YELLOW;
break;
case DNGN_ALTAR_KIKUBAAQUDGHA:
- Feature[i].colour = DARKGREY;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = DARKGREY;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = DARKGREY;
break;
case DNGN_ALTAR_YREDELEMNUL:
- Feature[i].colour = EC_UNHOLY;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = EC_UNHOLY;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = EC_UNHOLY;
break;
case DNGN_ALTAR_XOM:
- Feature[i].colour = EC_RANDOM;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = EC_RANDOM;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = EC_RANDOM;
break;
case DNGN_ALTAR_VEHUMET:
- Feature[i].colour = EC_VEHUMET;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = EC_VEHUMET;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = EC_VEHUMET;
break;
case DNGN_ALTAR_OKAWARU:
- Feature[i].colour = CYAN;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = CYAN;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = CYAN;
break;
case DNGN_ALTAR_MAKHLEB:
- Feature[i].colour = EC_FIRE;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = EC_FIRE;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = EC_FIRE;
break;
case DNGN_ALTAR_SIF_MUNA:
- Feature[i].colour = BLUE;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = BLUE;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = BLUE;
break;
case DNGN_ALTAR_TROG:
- Feature[i].colour = RED;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = RED;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = RED;
break;
case DNGN_ALTAR_NEMELEX_XOBEH:
- Feature[i].colour = LIGHTMAGENTA;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = LIGHTMAGENTA;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = LIGHTMAGENTA;
break;
case DNGN_ALTAR_ELYVILON:
- Feature[i].colour = LIGHTGREY;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = LIGHTGREY;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = LIGHTGREY;
break;
case DNGN_ALTAR_LUGONU:
- Feature[i].colour = GREEN;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = GREEN;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = GREEN;
break;
case DNGN_ALTAR_BEOGH:
- Feature[i].colour = EC_BEOGH;
- Feature[i].dchar = DCHAR_ALTAR;
- Feature[i].flags |= FFT_NOTABLE;
- Feature[i].map_colour = DARKGREY;
+ Feature[i].colour = EC_BEOGH;
+ Feature[i].dchar = DCHAR_ALTAR;
+ Feature[i].flags |= FFT_NOTABLE;
+ Feature[i].map_colour = DARKGREY;
Feature[i].seen_colour = EC_BEOGH;
break;
@@ -4273,7 +4273,7 @@ void init_feature_table( void )
case DNGN_DRY_FOUNTAIN_BLOOD:
case DNGN_PERMADRY_FOUNTAIN:
Feature[i].colour = LIGHTGREY;
- Feature[i].dchar = DCHAR_FOUNTAIN;
+ Feature[i].dchar = DCHAR_FOUNTAIN;
break;
case DNGN_INVIS_EXPOSED:
@@ -4351,7 +4351,9 @@ void init_feature_table( void )
if (i == DNGN_ENTER_ORCISH_MINES || i == DNGN_ENTER_SLIME_PITS
|| i == DNGN_ENTER_LABYRINTH)
+ {
Feature[i].flags |= FFT_EXAMINE_HINT;
+ }
if (Feature[i].dchar != NUM_DCHAR_TYPES)
Feature[i].symbol = Options.char_table[ Feature[i].dchar ];
@@ -4667,6 +4669,7 @@ void viewwindow(bool draw_it, bool do_updates)
const bool map = player_in_mappable_area();
const bool draw =
(!you.running || Options.travel_delay > -1) && !you.asleep();
+
int bufcount = 0;
int flash_colour = you.flash_colour;