Skip to content

Commit b5dbd88

Browse files
Restrict blessings to currently-friendly followers
Weird to heal an ally that's currenlty hostile, edge case though that is.
1 parent 64bc322 commit b5dbd88

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

crawl-ref/source/godblessing.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,11 @@ static bool _tso_bless_follower(monster* follower, bool force)
816816
return true;
817817
}
818818

819+
static bool _is_friendly_follower(const monster& mon)
820+
{
821+
return mon.friendly() && is_follower(mon);
822+
}
823+
819824
// Bless the follower indicated in follower, if any. If there isn't
820825
// one, bless a random follower within sight of the player, if any, or
821826
// any follower on the level.
@@ -835,14 +840,14 @@ bool bless_follower(monster* follower,
835840
{
836841
// Choose a random follower in LOS, preferably a named or
837842
// priestly one.
838-
follower = choose_random_nearby_monster(0, is_follower,
843+
follower = choose_random_nearby_monster(0, _is_friendly_follower,
839844
god == GOD_BEOGH);
840845
}
841846

842847
// Try *again*, on the entire level
843848
if (!follower)
844849
{
845-
follower = choose_random_monster_on_level(0, is_follower,
850+
follower = choose_random_monster_on_level(0, _is_friendly_follower,
846851
god == GOD_BEOGH);
847852
}
848853

0 commit comments

Comments
 (0)