diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-02 01:43:29 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-02 01:43:29 +0000 |
commit | 3b1cbcc423f4d5bf475ce83cde8971bffb351abb (patch) | |
tree | f75474b191bae857c90ae7b736fa71029bc00188 /crawl-ref/source/beam.cc | |
parent | 9c75e7f7e8d1d8c58ac441f3b3bd77cb4d91bf24 (diff) | |
download | crawl-ref-3b1cbcc423f4d5bf475ce83cde8971bffb351abb.tar.gz crawl-ref-3b1cbcc423f4d5bf475ce83cde8971bffb351abb.zip |
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
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |