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/effects.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/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index f45762c9b9..b3dfc3fbeb 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -2018,6 +2018,16 @@ void yell(bool force) return; } + if (env.sanctuary_time > 0) + { + if (!yesno("An ally attacking under your orders might violate " + "sanctuary; order anyways?", false, 'n')) + { + canned_msg(MSG_OK); + return; + } + } + mpr("Gang up on whom?", MSGCH_PROMPT); direction( targ, DIR_TARGET, TARG_ENEMY, -1, false, false ); |