summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--crawl-ref/source/fight.cc2
-rw-r--r--crawl-ref/source/monstuff.cc31
-rw-r--r--crawl-ref/source/output.cc7
-rw-r--r--crawl-ref/source/religion.cc14
-rw-r--r--crawl-ref/source/view.cc1
5 files changed, 31 insertions, 24 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index c27f32abd9..0864f666bc 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -20,7 +20,7 @@
* <5> 8/08/99 BWR Reduced power of EV/shields
* <4> 6/22/99 BWR Changes to stabbing code, made
* most gods not care about the
- * deathes of summoned monsters
+ * deaths of summoned monsters
* <3> 5/21/99 BWR Upped learning of armour skill
* in combat slightly.
* <2> 5/12/99 BWR Fixed a bug where burdened
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
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index a3eadda080..aaa206bd50 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -1272,7 +1272,11 @@ void monster_pane_info::to_string( int count, std::string& desc,
if (count == 1)
{
if (!mons_is_mimic(m_mon->type))
+ {
out << m_mon->name(DESC_PLAIN);
+ if (!(m_mon->mname).empty())
+ out << " the " << mons_type_name(m_mon->type, DESC_PLAIN);
+ }
else
out << mons_type_name(m_mon->type, DESC_PLAIN);
}
@@ -1282,7 +1286,8 @@ void monster_pane_info::to_string( int count, std::string& desc,
// of different types.
if (m_fullname
&& m_mon->type != MONS_DANCING_WEAPON
- && !mons_is_mimic(m_mon->type))
+ && !mons_is_mimic(m_mon->type)
+ && m_mon->mname.empty())
{
out << count << " "
<< pluralise(m_mon->name(DESC_PLAIN));
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 10ae714886..28861f3f46 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -765,11 +765,11 @@ static void _inc_penance(god_type god, int val)
take_note(Note(NOTE_PENANCE, god));
- // orcish bonuses don't apply under penance
+ // Orcish bonuses don't apply under penance.
if (god == GOD_BEOGH)
you.redraw_armour_class = true;
- // neither does Zin's vitalisation chaining, divine robustness,
- // or divine stamina
+ // Neither does Zin's vitalisation chaining, divine robustness,
+ // or divine stamina.
else if (god == GOD_ZIN)
{
if (you.duration[DUR_VITALISATION_CHAIN])
@@ -3297,7 +3297,7 @@ void lose_piety(int pgn)
const int old_piety = you.piety;
- // Apply hysteresis
+ // Apply hysteresis.
{
const int old_hysteresis = you.piety_hysteresis;
you.piety_hysteresis = (unsigned char)std::min<int>(
@@ -3358,9 +3358,9 @@ void lose_piety(int pgn)
if (you.piety > 0 && you.piety <= 5)
learned_something_new(TUT_GOD_DISPLEASED);
- if ( you.religion == GOD_BEOGH )
+ if (you.religion == GOD_BEOGH)
{
- // every piety level change also affects AC from orcish gear
+ // Every piety level change also affects AC from orcish gear.
you.redraw_armour_class = true;
}
}
@@ -4620,7 +4620,7 @@ static bool _beogh_followers_abandon_you()
return (false);
}
-// currently only used when orcish idols have been destroyed
+// Currently only used when orcish idols have been destroyed.
static std::string _get_beogh_speech(const std::string key)
{
std::string result = getSpeakString("Beogh " + key);
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 3f8c65f2eb..2a4176acc1 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -833,6 +833,7 @@ void beogh_follower_convert(monsters *monster, bool orc_hit)
if (you.religion == GOD_BEOGH
&& monster->foe == MHITYOU
&& mons_species(monster->type) == MONS_ORC
+ && !mons_is_summoned(monster)
&& !testbits(monster->flags, MF_ATT_CHANGE_ATTEMPT)
&& !mons_friendly(monster)
&& mons_player_visible(monster) && !mons_is_sleeping(monster)