summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-06 19:09:12 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-06 19:09:12 +0000
commit9d9efc7fd96b37de17094f6f7cff8abb43a1e8a2 (patch)
treea12c56aab56fb877e73b9b6e9e290ec543be56b6 /crawl-ref/source/mon-util.cc
parentf442b6f700fe5e6a588c802fbcab1b5bd0097627 (diff)
downloadcrawl-ref-9d9efc7fd96b37de17094f6f7cff8abb43a1e8a2.tar.gz
crawl-ref-9d9efc7fd96b37de17094f6f7cff8abb43a1e8a2.zip
Add a line on good gods disapproving of certain items to their
description (evil_item). Same for evil_eating. In another step on the way to monster pathfinding, take the shortest path and extract a vector of waypoints out of it. When experimenting with ways to do this I noticed that grid_see_grid is not symmetrical (A may see B but not vice versa); I'm not sure what effects that could have. It won't directly affect the player as the checks for monster sees player and player sees monster both use the player LoS, but it could have an effect on friendly monsters fighting enemy ones, I guess. Also, I don't think num_feats_between needs the shortest beam available (called with false now). In fact, that seemed to hurt visibility a bit, probably because of attempting to take vision obstructing shortcuts. If this reasoning is wrong, please speak up and/or correct it. (I sure hope not because the shortest beam calculation has some more overhead that can be avoided this way.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5501 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 9d5f0a755f..4742f0a1fe 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1269,7 +1269,7 @@ bool mons_amphibious(int mc)
return mons_class_flag(mc, M_AMPHIBIOUS);
}
-// this nice routine we keep in exactly the way it was
+// This nice routine we keep in exactly the way it was-
int hit_points(int hit_dice, int min_hp, int rand_hp)
{
int hrolled = 0;
@@ -1281,11 +1281,11 @@ int hit_points(int hit_dice, int min_hp, int rand_hp)
}
return (hrolled);
-} // end hit_points()
+}
// This function returns the standard number of hit dice for a type
// of monster, not a pacticular monsters current hit dice. -- bwr
-// XXX: rename to mons_class_* to be like the rest
+// XXX: Rename to mons_class_* to be like the rest.
int mons_type_hit_dice( int type )
{
struct monsterentry *mon_class = get_monster_data( type );
@@ -6079,8 +6079,8 @@ void monsters::react_to_damage(int damage)
}
}
- const bool needs_message =
- spawned && mons_near(this) && player_monster_visible(this);
+ const bool needs_message = spawned && mons_near(this)
+ && player_monster_visible(this);
if (needs_message)
{
@@ -6089,6 +6089,7 @@ void monsters::react_to_damage(int damage)
spawned >= 5 ? " alarmingly" :
spawned >= 3 ? " violently" :
spawned > 1 ? " vigorously" : "");
+
if (spawned == 1)
mprf("%s spits out another jelly.", monnam.c_str());
else