diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-17 18:30:45 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-17 18:30:45 +0000 |
commit | 94410e34844eacecadec9c0f3b8e96b2833d16e6 (patch) | |
tree | 801d9dfbafb11f404ac732d304923b74a9ed1141 /crawl-ref/source/mon-util.h | |
parent | 73466105efd4afd0b5317668be0109395e931659 (diff) | |
download | crawl-ref-94410e34844eacecadec9c0f3b8e96b2833d16e6.tar.gz crawl-ref-94410e34844eacecadec9c0f3b8e96b2833d16e6.zip |
Add an unfinished attempt at making pacified monsters leave the level.
BEH_LEAVE replaces BEH_INVESTIGATE, which wasn't being used.
Notes:
Since leaving the level is similar to fleeing in some ways, monsters
leaving the level share some behaviors with fleeing monsters: they are
less likely to shoot; they are more likely to use scrolls of blinking or
teleportation; and leaving eyeballs won't paralyze you or drain your MP.
Leaving the level is also similar to lurking in some ways, so it won't
be interrupted by noticing something, just as with lurking.
Getting far enough away from a monster will make it leave the level
(i.e., die with KILL_DISMISSED and MF_HARD_RESET, so it takes its stuff
with it), as will getting it into a grid it can submerge in, at which
time it will submerge and leave the level. Neither of these apply to
monsters that can't move, of course, except for mimics, since they can
teleport.
Incomplete things (sorry for the mess):
I still haven't figured out how to make a monster target a dungeon
feature (in this case, the nearest level exit, the nearest teleportation
or shaft trap, or the nearest submersible grid), so, currently, a
pacified monster will just go to where its last target was and stand
there until/unless one of the aforementioned level exit scenarios
occurs.
Pacified monsters can still cast summoning spells. Whatever they summon
is neutral, just as they are, but such summons can still get in the way.
(Try pacifying an orc high priest, for example.) Maybe summoning should
be disabled or have its chance lowered for neutral monsters in general,
unless something's in their way?
Speaking of targeting, the leaving-by-submerging scenario should occur
only if there's no other way to reach the target: all ways off the level
are blocked, the monster's habitat is water and it's not amphibious, the
monster's habitat is lava, or (possibly) the monster's habitat is rock.
There should be a message if the monster leaves the level, but what
about the ones that do so out of the player's LOS?
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5924 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.h')
-rw-r--r-- | crawl-ref/source/mon-util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h index 7914e5f360..7b00dee43e 100644 --- a/crawl-ref/source/mon-util.h +++ b/crawl-ref/source/mon-util.h @@ -639,6 +639,7 @@ size_type mons_size(const monsters *m); bool mons_friendly(const monsters *m); bool mons_neutral(const monsters *m); bool mons_good_neutral(const monsters *m); +bool mons_is_pacified(const monsters *m); bool mons_wont_attack(const monsters *m); bool mons_att_wont_attack(mon_attitude_type fr); mon_attitude_type mons_attitude(const monsters *m); @@ -657,6 +658,7 @@ bool mons_is_seeking(const monsters *m); bool mons_is_fleeing(const monsters *m); bool mons_is_panicking(const monsters *m); bool mons_is_cornered(const monsters *m); +bool mons_is_leaving(const monsters *m); bool mons_is_lurking(const monsters *m); bool mons_is_batty(const monsters *m); bool mons_was_seen(const monsters *m); @@ -681,6 +683,7 @@ bool mons_class_is_confusable(int mc); bool mons_class_is_slowable(int mc); bool mons_class_is_stationary(int mc); bool mons_is_stationary(const monsters *mon); +bool mons_is_truly_stationary(const monsters *mon); bool mons_is_wall_shielded(int mc); bool mons_is_insubstantial(int mc); bool mons_has_blood(int mc); |