From 3b1cbcc423f4d5bf475ce83cde8971bffb351abb Mon Sep 17 00:00:00 2001 From: zelgadis Date: Wed, 2 Jul 2008 01:43:29 +0000 Subject: When laying down Sanctuary make all pets inside it stop attacking and move towards you. You can get them to attack while inside Sanctuary by giving them an order to attack a specific monster, and if they do attack and violate Sanctuary then it will be removed. Attempting to give such an order will give a warning that it might violate Sanctuary. Prevent confused and berserking pets from violating Sanctuary, since you can't order them not to. Prevent monsters fleeing Sanctuary from attacking monsters which are blocking their flight path. The player attacking him/her-self because of confusion no longer vilates Sanctuary. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6312 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 8cc5e0ca6a..e52c26d624 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -2038,10 +2038,12 @@ void fire_beam(bolt &pbolt, item_def *item, bool drop_item) else if (pbolt.foe_helped > 0 && pbolt.fr_helped == 0) xom_is_stimulated(128); - // Allow friendlies to react to projectiles. + // Allow friendlies to react to projectiles, except when in + // Sanctuary when pet_target can only be explictly changed + // by the player. const monsters *mon = &menv[pbolt.beam_source]; if (pbolt.foe_hurt > 0 && !mons_wont_attack(mon) - && you.pet_target == MHITNOT) + && you.pet_target == MHITNOT && env.sanctuary_time <= 0) { you.pet_target = pbolt.beam_source; } -- cgit v1.2.3-54-g00ecf