summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-05 13:27:28 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-05 13:27:28 +0000
commit086e548103eed62bf4d1bb806e2bec88562fbfe6 (patch)
tree26eefe5832d5be81387b3222338fdc6765efa31b /crawl-ref/source/monstuff.cc
parent9905c3fa45641105522041cb9cf4bfa6625845d5 (diff)
downloadcrawl-ref-086e548103eed62bf4d1bb806e2bec88562fbfe6.tar.gz
crawl-ref-086e548103eed62bf4d1bb806e2bec88562fbfe6.zip
Fix 2011201: Disallow summoned orcs from joining a worshipper of Beogh.
Fix 2011258: Consolidate named orcs correctly in the monster list. Fix 2010542: Patrolling monsters forgetting the player too quickly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6408 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc31
1 files changed, 16 insertions, 15 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 2fd9b03ada..1b513cf5cd 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -586,7 +586,7 @@ static bool _monster_avoided_death(monsters *monster, killer_type killer, int i)
if (you.religion == GOD_BEOGH
&& mons_species(monster->type) == MONS_ORC
&& !player_under_penance() && you.piety >= piety_breakpoint(2)
- && mons_near(monster))
+ && mons_near(monster) && !mons_is_summoned(monster))
{
if (YOU_KILL(killer))
convert = true;
@@ -2282,7 +2282,7 @@ static bool _choose_random_patrol_target_grid(monsters *mon)
return (count_grids);
}
-//#define DEBUG_PATHFIND
+#define DEBUG_PATHFIND
// Check all grids in LoS and mark lava and/or water as seen if the
// appropriate grids are encountered, so we later only need to do the
@@ -2701,18 +2701,19 @@ static void _handle_behaviour(monsters *mon)
break;
}
- if (patrolling)
- {
- new_foe = MHITNOT;
- new_beh = BEH_WANDER;
- break;
- }
-
if (isFriendly)
{
- new_foe = MHITYOU;
- mon->target_x = foe_x;
- mon->target_y = foe_y;
+ if (patrolling)
+ {
+ new_foe = MHITNOT;
+ new_beh = BEH_WANDER;
+ }
+ else
+ {
+ new_foe = MHITYOU;
+ mon->target_x = foe_x;
+ mon->target_y = foe_y;
+ }
break;
}
@@ -3098,7 +3099,7 @@ static void _handle_behaviour(monsters *mon)
// wandering monsters at least appear to have some sort of
// attention span. -- bwr
if (mon->x == mon->target_x && mon->y == mon->target_y
- || mons_is_batty(mon) || (!isPacified && one_chance_in(20)))
+ || mons_is_batty(mon) || !isPacified && one_chance_in(20))
{
bool need_target = true;
if (travelling)
@@ -3326,8 +3327,8 @@ static void _handle_behaviour(monsters *mon)
// also eventually switch the place from which they want to
// leave the level, in case their current choice is blocked.
if (!proxFoe && mon->foe != MHITNOT
- && one_chance_in(isSmart ? 60 : 20)
- || isPacified && one_chance_in(isSmart ? 40 : 120))
+ && one_chance_in(isSmart ? 60 : 20)
+ || isPacified && one_chance_in(isSmart ? 40 : 120))
{
new_foe = MHITNOT;
if (travelling && mon->travel_target != MTRAV_PATROL