summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-12 10:33:27 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-12 10:33:27 +0000
commit6ca3547c0ecc01c06b930f7c0bea23171cb45b2e (patch)
tree1f62a24c6bcc00caf0cce7c4c2f971b010edf084
parent964dc6d60780f90a6f890facbeff43eaae83be57 (diff)
downloadcrawl-ref-6ca3547c0ecc01c06b930f7c0bea23171cb45b2e.tar.gz
crawl-ref-6ca3547c0ecc01c06b930f7c0bea23171cb45b2e.zip
Backport a number of small fixes and improvements, among others:
* display for silenced grids * mummy monsters drinking potions * stationary monsters floundering in shallow water * replacing post-explosion more() with delay(150) * fixing debug armour acquirement statistics * DS Troggies don't get Channeling anymore git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10522 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/beam.cc4
-rw-r--r--crawl-ref/source/debug.cc8
-rw-r--r--crawl-ref/source/describe.cc2
-rw-r--r--crawl-ref/source/directn.cc7
-rw-r--r--crawl-ref/source/effects.cc2
-rw-r--r--crawl-ref/source/mon-util.cc9
-rw-r--r--crawl-ref/source/mutation.cc9
-rw-r--r--crawl-ref/source/spells1.cc2
-rw-r--r--crawl-ref/source/tilepick.cc3
-rw-r--r--crawl-ref/source/view.cc12
10 files changed, 39 insertions, 19 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 43cee85094..569fc49a7d 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -5345,9 +5345,9 @@ bool bolt::explode(bool show_more, bool hole_in_the_middle)
set_buffering(oldValue);
#endif
- // Pause after entire explosion has been drawn.
+ // Delay after entire explosion has been drawn.
if (!is_tracer && cells_seen > 0 && show_more)
- more();
+ delay(150);
return (cells_seen > 0);
}
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 4f0d65189a..27f8c4bf7a 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -3301,11 +3301,12 @@ static void _debug_acquirement_stats(FILE *ostat)
if (is_artefact(item))
num_arts++;
+ else if (type == OBJ_ARMOUR) // Exclude artefacts when counting egos.
+ ego_quants[get_armour_ego_type(item)]++;
+ // Include artefacts for weapon brands.
if (type == OBJ_WEAPONS)
ego_quants[get_weapon_brand(item)]++;
- else if (type == OBJ_ARMOUR)
- ego_quants[get_armour_ego_type(item)]++;
destroy_item(item_index, true);
@@ -3445,6 +3446,8 @@ static void _debug_acquirement_stats(FILE *ostat)
(float) subtype_quants[i] * 100.0 / (float) total_quant);
}
fprintf(ostat, "----------------------\n");
+
+ mpr("Results written into 'items.stat'.");
}
static void _debug_rap_stats(FILE *ostat)
@@ -3666,6 +3669,7 @@ static void _debug_rap_stats(FILE *ostat)
}
fprintf(ostat, "\n-----------------------------------------\n\n");
+ mpr("Results written into 'items.stat'.");
}
void debug_item_statistics( void )
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index d88c604a3b..b1497cc744 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2022,7 +2022,7 @@ std::string get_item_description( const item_def &item, bool verbose,
"$Damage rating: 7 Accuracy rating: +6 "
"Attack delay: 120%";
- description << "$$It falls into the 'staves' category.";
+ description << "$$It falls into the 'Staves' category.";
}
break;
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index fad93b9af9..f5fdee5767 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -3411,7 +3411,12 @@ static void _describe_cell(const coord_def& where, bool in_range)
#endif
if (is_sanctuary(where))
- mpr("This square lies inside a sanctuary.");
+ {
+ mprf("This square lies inside a sanctuary%s.",
+ silenced(where) ? ", and is shrouded in silence" : "");
+ }
+ else if (silenced(where))
+ mpr("This square is shrouded in silence.");
if (env.cgrid(where) != EMPTY_CLOUD)
{
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index b7898e8d47..e65b82c918 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -660,7 +660,7 @@ bool lose_stat(unsigned char which_stat, unsigned char stat_loss, bool force,
// finish outputting message: {dlb}
msg += ".";
- mpr(msg.c_str());
+ mpr(msg.c_str(), statLowered ? MSGCH_WARN : MSGCH_PLAIN);
if (newValue < 1)
{
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index aae15df3dc..d2996b26e8 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -437,8 +437,6 @@ static int _scan_mon_inv_items(const monsters *mon,
static bool _mons_has_undrinkable_potion(const monsters *mon)
{
- bool ret = false;
-
if (mons_itemuse(mon) >= MONUSE_STARTING_EQUIPMENT)
{
const int potion = mon->inv[MSLOT_POTION];
@@ -449,11 +447,11 @@ static bool _mons_has_undrinkable_potion(const monsters *mon)
static_cast<potion_type>(mitm[potion].sub_type);
if (!mon->can_drink_potion(ptype))
- ret = true;
+ return (true);
}
}
- return (ret);
+ return (false);
}
int mons_unusable_items(const monsters *mon)
@@ -3615,6 +3613,7 @@ bool monsters::floundering() const
{
const dungeon_feature_type grid = grd(pos());
return (grid_is_water(grid)
+ && !cannot_fight()
// Can't use monster_habitable_grid() because that'll return
// true for non-water monsters in shallow water.
&& mons_primary_habitat(this) != HT_WATER
@@ -8039,7 +8038,7 @@ bool monsters::can_drink_potion(potion_type ptype) const
if (mons_itemuse(this) >= MONUSE_STARTING_EQUIPMENT)
{
if (mons_is_skeletal(type) || mons_is_insubstantial(type)
- || mons_species() == MONS_LICH || mons_species() == MONS_MUMMY)
+ || mons_species() == MONS_LICH || mons_genus(type) == MONS_MUMMY)
{
return (false);
}
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index 5c006e94ee..da633db58b 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -2606,8 +2606,7 @@ std::string mutation_name(mutation_type mut, int level, bool colour)
return (result);
}
-// Use an attribute counter for how many demonic mutations a demonspawn
-// has.
+// Use an attribute counter for how many demonic mutations a demonspawn has.
void demonspawn()
{
mutation_type whichm = NUM_MUTATIONS;
@@ -2710,7 +2709,11 @@ void demonspawn()
howm = 1;
}
- if (you.religion != GOD_SIF_MUNA && one_chance_in(11))
+ // Theoretically, you could use this with Trog (for rods and
+ // some misc. items), but in general it's going to be much more
+ // useful for someone capable of casting spells.
+ if (you.religion != GOD_TROG
+ && you.religion != GOD_SIF_MUNA && one_chance_in(11))
{
whichm = MUT_CHANNEL_HELL;
howm = 1;
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 0aee0067d1..10eab39f57 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -774,7 +774,7 @@ static int _healing_spell(int healed, bool divine_ability,
if (pgain > 0)
simple_god_message(" approves of your offer of peace.");
else
- simple_god_message(" supports your offer of peace.");
+ mpr("Elyvilon supports your offer of peace.");
if (is_holy)
good_god_holy_attitude_change(monster);
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 243e4afcbd..844433d715 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -2680,7 +2680,8 @@ int tileidx_bolt(const bolt &bolt)
int tileidx_zap(int colour)
{
- int col = colour;
+ int col = (colour == ETC_MAGIC ? element_colour(ETC_MAGIC) : colour);
+
if (col > 8)
col -= 8;
if (col < 1)
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index b6e4b4b4ed..7902389c47 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -521,11 +521,19 @@ static void _get_symbol( const coord_def& where,
}
}
- if (object < NUM_REAL_FEATURES && inside_halo(where)
+ if (object < NUM_REAL_FEATURES
&& (object >= DNGN_FLOOR_MIN && object <= DNGN_FLOOR_MAX
|| object == DNGN_UNDISCOVERED_TRAP))
{
- *colour = YELLOW | colmask;
+ if (inside_halo(where))
+ {
+ if (silenced(where))
+ *colour = LIGHTCYAN | colmask;
+ else
+ *colour = YELLOW | colmask;
+ }
+ else if (silenced(where))
+ *colour = CYAN | colmask;
}
}