summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge r7836: divine summons should drop non-summoned items on death (FRzelgadis2008-12-161-8/+37
| | | | | | | | #2424917), summoned items should vanish when dropped/fired/thrown by monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7844 c06c8d41-db1a-0410-9941-cceddc491573
* Apply more commits into 0.4 branch, again mostly by Haran:j-p-e-g2008-12-081-3/+11
| | | | | | | | | | | | | | | | | 6950, 6954, 6959, 6962, 6963, 6965, 6968, 6970 (partly), 6997, 6998, 7001, 7061, 7065, 7071, 7132 (partly), 7174, 7186, 7213, 7233, 7268, 7268, 7293, 7319, 7339, 7358, 7393 (partly) * Tweak a few monster flags. * Fix autoswapping jewellery taking longer than manual swapping. * Fix crash when attempting to create nonexisting monster in wizmode. * Make ego armour descriptions follow abbreviation guidelines. * Fixed buggy monster movement away from the player. * Disabled traps in the Abyss. * Fixed a few other minor bugs, and improves messaging. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7788 c06c8d41-db1a-0410-9941-cceddc491573
* Merge r7739 and r7740: conjugation and pluralization fixes.zelgadis2008-12-041-0/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7741 c06c8d41-db1a-0410-9941-cceddc491573
* Backport fix for monster weapon pickup, ere I forget it again...j-p-e-g2008-09-141-19/+38
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6918 c06c8d41-db1a-0410-9941-cceddc491573
* Trunk->0.4 r6819: Also fix draining / torment for vampires (jarpiain).dshaligram2008-08-151-1/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6820 c06c8d41-db1a-0410-9941-cceddc491573
* Trunk->0.4 r6817: Fixed demonspawn getting free protection from ↵dshaligram2008-08-151-1/+6
| | | | | | torment/draining (jarpiain). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6818 c06c8d41-db1a-0410-9941-cceddc491573
* Apply r6640, r6694 (both by Darshan), r6670 (Haran), r6679 and r6703j-p-e-g2008-07-281-4/+0
| | | | | | | | | | | (me) to branch. Includes TSO no longer granting permanent allies and resultant friendly pickup change, and a number of smaller changes. Also update change log. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6709 c06c8d41-db1a-0410-9941-cceddc491573
* Apply r6620, r6624, r6625, r6628 and r6632 to 0.4.j-p-e-g2008-07-241-9/+3
| | | | | | | | | | | Save existing ghosts back to bones files even for undead players. Fix HP bar blanking out when wrapping. Fix TSO regarding attacks on evil creatures as unchivalric. Fix Twisted Resurrection abominations not counting as undead. Fix monsters being generated with stacks of returning weapons. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6666 c06c8d41-db1a-0410-9941-cceddc491573
* Apply my commits r6601, r6604 and r6605 to the 0.4 branch, excludingj-p-e-g2008-07-181-2/+10
| | | | | | | purely cosmetic changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6606 c06c8d41-db1a-0410-9941-cceddc491573
* Apply Haran's fixes (r6577) to 0.4.1.j-p-e-g2008-07-171-1/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6582 c06c8d41-db1a-0410-9941-cceddc491573
* Apply my latest commits to 0.4.j-p-e-g2008-07-131-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6531 c06c8d41-db1a-0410-9941-cceddc491573
* Another clean up, and add some new weapon speech.j-p-e-g2008-07-071-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6439 c06c8d41-db1a-0410-9941-cceddc491573
* FR 2006559: fix descriptions of viewed monsters not always fitting intozelgadis2008-07-051-0/+3
| | | | | | | | | | 24 rows, like it was fixed for lookup (?/ command). Also, fixed probem with zombies and other derived monsters not having a description when viewed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6402 c06c8d41-db1a-0410-9941-cceddc491573
* Add res_rotting() method to the actor class so that the "are you the rightzelgadis2008-07-021-1/+6
| | | | | | | | type of undead to resist rotting" logic can be in just one place instead of duplicated every time the check is made. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6354 c06c8d41-db1a-0410-9941-cceddc491573
* Improve pacified monsters' routines for leaving the level again. Remove dolorous2008-07-021-1/+1
| | | | | | | | | | | death by submersion for now, since it's too specific to certain monsters, and leaving the level long enough will make them disappear anyway. Also, have monsters sometimes cycle through previously unreachable areas again, in case things change on the level to make them reachable. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6346 c06c8d41-db1a-0410-9941-cceddc491573
* Make the neutrality enchantment decay properly.dolorous2008-07-021-0/+9
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6336 c06c8d41-db1a-0410-9941-cceddc491573
* If a monster wields a non-branded launcher there is no message, so wej-p-e-g2008-07-021-2/+5
| | | | | | | | | | | *know* it is a plain one -> it is now auto-identified which enables us to autoidentify branded ammo shot from it. Fix Trolls starting out wearing bucklers and remove the stat checks during (normal) random weapon choice. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6333 c06c8d41-db1a-0410-9941-cceddc491573
* Revert the change on ammo handling for Tiles, and replace it with a morej-p-e-g2008-07-021-1/+1
| | | | | | | | | | | | | | | generic logic that uses item tiles for BEAM_MISSILE, else bolts according to flavour. Identify monster fired ammunition ego if the launcher ego is known, not that it has much of an effect because plain ammo gets no special description. In the message list the fired item as it will look to the player (i.e. "arrow of ice" for a plain arrow fired off a bow of frost), even though the item actually dropped will still be a plain one. I hope this isn't too confusing. (And if it is, it should be easy to revert. :p) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6331 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more miscellaneous minor fixes.dolorous2008-07-021-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6321 c06c8d41-db1a-0410-9941-cceddc491573
* Make berserking and non-living monsters stop retreating from Sanctuary aszelgadis2008-07-021-3/+11
| | | | | | | | | | | | soon as they leave it, since they're being forced out rather than actually afraid. Also give a "stops retreating" message for them instead of the "regaining courage" one. Remove faulty logic that was causing monsters to not notice the player as soon as they stopped fleeing Sanctuary. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6320 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-301-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6233 c06c8d41-db1a-0410-9941-cceddc491573
* Bug 2005002: Allow friendly and neutral-good monsters to cast spells while inzelgadis2008-06-291-6/+30
| | | | | | | | | sanctuary, and allow hostile and neutral monsters to cast spells once outside of sanctuary as long as it won't harm anything inside of sanctuary. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6205 c06c8d41-db1a-0410-9941-cceddc491573
* Faking falls through shaft traps for pacified monsters doesn't quite dolorous2008-06-291-1/+4
| | | | | | | | work, as it doesn't use the proper target. Fix this by not marking pacified monsters for transit if they fall through shaft traps. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6194 c06c8d41-db1a-0410-9941-cceddc491573
* After some pointers from jpeg, rework the routine for monsters' leaving dolorous2008-06-281-6/+1
| | | | | | | | | the level to use the pathfinding routines for patrolling. The monsters still sometimes disappear when near the exit instead of on it, which needs to be fixed, but it's vastly closer to working properly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6186 c06c8d41-db1a-0410-9941-cceddc491573
* Prevent monsters from zapping wands at a player in sanctuary by puttingzelgadis2008-06-281-0/+6
| | | | | | | | | a sanctuary check in mons_should_fire(). Force monster to stop fleeing before it zaps a wand at the player. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6178 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-21/+24
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Don't include inscription in a dancing weapon's name if the desc typezelgadis2008-06-241-2/+10
| | | | | | | is BASENAME, QUALNAME or DBNAME. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6091 c06c8d41-db1a-0410-9941-cceddc491573
* Fix monster emergency spells not checking for ENCH_TP, thus allowingj-p-e-g2008-06-231-7/+15
| | | | | | | | | | monsters to cancel their teleportation without meaning to. (BR 2000428) Fix the quiver not being cleared when wielding the only quiverable (and thus previously quivered) item. (Un)wielding such an item now switches nicely between "Nothing wielded" and "Nothing quivered", as it should be. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6089 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up monster pacifying a bit: don't allow it to work for stationary dolorous2008-06-231-24/+17
| | | | | | | monsters, or for monsters that aren't holy, natural, undead, or demonic. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6085 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-06-221-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6042 c06c8d41-db1a-0410-9941-cceddc491573
* Really fix compilation.dolorous2008-06-211-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6022 c06c8d41-db1a-0410-9941-cceddc491573
* Fix compilation.dolorous2008-06-211-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6021 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-06-211-14/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6020 c06c8d41-db1a-0410-9941-cceddc491573
* Improve level exit handling again.dolorous2008-06-201-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6008 c06c8d41-db1a-0410-9941-cceddc491573
* Add miscellaneous minor fixes.dolorous2008-06-201-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5994 c06c8d41-db1a-0410-9941-cceddc491573
* Update tutorial information for the 'm' and 'a' screens.j-p-e-g2008-06-191-1/+1
| | | | | | | | | Space allowing, differentiate between hydras with different numbers of heads in the monster list. (This is probably only interesting in the Swamp.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5993 c06c8d41-db1a-0410-9941-cceddc491573
* Revert another erroneous cleanup.dolorous2008-06-191-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5989 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1996837: Allow equipping spellcasters with ammunition on generation.j-p-e-g2008-06-191-17/+22
| | | | | | | Fix 1997179: Merge zombies correctly in the monster list. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5977 c06c8d41-db1a-0410-9941-cceddc491573
* Add various god gift-related cleanups.dolorous2008-06-191-11/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5966 c06c8d41-db1a-0410-9941-cceddc491573
* Fix invisible monsters being described to "burst forth from the water"j-p-e-g2008-06-181-1/+4
| | | | | | | if there's no water nearby. (BR 1994574) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5965 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify again.dolorous2008-06-181-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5957 c06c8d41-db1a-0410-9941-cceddc491573
* Add an unfinished attempt at making pacified monsters leave the level. dolorous2008-06-171-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Typo fix.dolorous2008-06-171-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5923 c06c8d41-db1a-0410-9941-cceddc491573
* Make yet more use of wrappers.dolorous2008-06-171-4/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5900 c06c8d41-db1a-0410-9941-cceddc491573
* Add yet more cleanups.dolorous2008-06-171-5/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5899 c06c8d41-db1a-0410-9941-cceddc491573
* Add miscellaneous minor fix.dolorous2008-06-161-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5897 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more cleanups.dolorous2008-06-161-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5895 c06c8d41-db1a-0410-9941-cceddc491573
* Use wrapper functions more often when checking monster behaviors.dolorous2008-06-161-0/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5891 c06c8d41-db1a-0410-9941-cceddc491573
* Add yet more miscellaneous minor fixes.dolorous2008-06-161-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5888 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up and consolidate most of the monster pacification routines.dolorous2008-06-161-2/+17
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5885 c06c8d41-db1a-0410-9941-cceddc491573