summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add minor cosmetic fixes.dolorous2008-07-071-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6441 c06c8d41-db1a-0410-9941-cceddc491573
* Another clean up, and add some new weapon speech.j-p-e-g2008-07-071-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6439 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2011722: Reallow targetting beams such that you may be hit. (There'sj-p-e-g2008-07-061-1/+1
| | | | | | | | | | | | | a new prompt now, but don't prompt a second time if you already confirmed another one before.) Fix some issues when creating items in the Abyss during GDT_GAME_START. This may or may not have played a role in 2008976. Lower spawning rate in the Abyss during GDT_GAME_START (10% spawning chance instead of guaranteed spawning per 5 turns). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6434 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1945389: Detect Creatures not clearing monsters detected on changedj-p-e-g2008-07-061-10/+11
| | | | | | | terrain. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6419 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2011201: Disallow summoned orcs from joining a worshipper of Beogh.j-p-e-g2008-07-051-15/+16
| | | | | | | | Fix 2011258: Consolidate named orcs correctly in the monster list. Fix 2010542: Patrolling monsters forgetting the player too quickly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6408 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2009377]: In _handle_behaviour(), initialize e_index to -1, so that dolorous2008-07-031-1/+1
| | | | | | | we don't try to access a nonexistent stored level exit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6362 c06c8d41-db1a-0410-9941-cceddc491573
* Fix pacified monsters' leaving the level when the player gets far enough dolorous2008-07-031-1/+1
| | | | | | | away. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6361 c06c8d41-db1a-0410-9941-cceddc491573
* Mark unreachable areas for pacified monsters in the right place.dolorous2008-07-031-18/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6360 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-07-021-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6357 c06c8d41-db1a-0410-9941-cceddc491573
* And tweak it again.dolorous2008-07-021-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6351 c06c8d41-db1a-0410-9941-cceddc491573
* Really fix pacified monsters' finding ways to blocked-off exits. As dolorous2008-07-021-2/+5
| | | | | | | | part of this, put the random wandering around the target back in for now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6350 c06c8d41-db1a-0410-9941-cceddc491573
* And clean up the previous improvements.dolorous2008-07-021-13/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6348 c06c8d41-db1a-0410-9941-cceddc491573
* Improve pacified monsters' routines for leaving the level again. Remove dolorous2008-07-021-21/+21
| | | | | | | | | | | 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
* Add more minor cosmetic fixes.dolorous2008-07-021-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6345 c06c8d41-db1a-0410-9941-cceddc491573
* Pacified monsters leaving the level shouldn't go out of their way to dolorous2008-07-021-1/+2
| | | | | | | attack other monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6344 c06c8d41-db1a-0410-9941-cceddc491573
* Actually handle cases of unreachable exits for pacified monsters leaving dolorous2008-07-021-19/+20
| | | | | | | the level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6342 c06c8d41-db1a-0410-9941-cceddc491573
* Tweak numbers again.dolorous2008-07-021-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6340 c06c8d41-db1a-0410-9941-cceddc491573
* Let pacified monsters wander again, although less often than other dolorous2008-07-021-1/+1
| | | | | | | | monsters, in case the way to the exit is blocked and they need to find another way there. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6337 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fixes.dolorous2008-07-021-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6335 c06c8d41-db1a-0410-9941-cceddc491573
* Oops, don't let pets swap or be swapped with other monsters if thezelgadis2008-07-021-0/+8
| | | | | | | player explictly told them to attack monsters in spite of sanctuary. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6330 c06c8d41-db1a-0410-9941-cceddc491573
* Don't let the player swap places with stationary monsters.zelgadis2008-07-021-1/+66
| | | | | | | | Let monsters inside sanctuary swap places if they're (probably) going in opposite directions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6329 c06c8d41-db1a-0410-9941-cceddc491573
* Make berserking and non-living monsters stop retreating from Sanctuary aszelgadis2008-07-021-10/+8
| | | | | | | | | | | | 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
* When laying down Sanctuary make all pets inside it stop attacking and movezelgadis2008-07-021-6/+18
| | | | | | | | | | | | | | | | | | | 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
* Per jpeg's suggestion, don't make pacified monsters wander around their dolorous2008-07-011-1/+1
| | | | | | | | target so often by ignoring the 1/20 chance of their doing so (unless the monster in question is batty). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6306 c06c8d41-db1a-0410-9941-cceddc491573
* Stationary monsters can't flee, even from sanctuary.zelgadis2008-07-011-0/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6285 c06c8d41-db1a-0410-9941-cceddc491573
* Make sure pacified monsters don't use emergency spells that harm the dolorous2008-06-301-4/+12
| | | | | | | | area (i.e. torment). Spells that harm targets are still okay, since pacified monsters are also allowed to harm targets via melee. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6236 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify again.dolorous2008-06-301-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6235 c06c8d41-db1a-0410-9941-cceddc491573
* Fix good random secondary choices during character selection.j-p-e-g2008-06-291-1/+2
| | | | | | | | Re-enable quivering with '(' - still buggy, and I'm trying to work out why, but at least it works for some ammo now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6218 c06c8d41-db1a-0410-9941-cceddc491573
* Don't behold and and un-behold the player in the same instant if a mermaidzelgadis2008-06-291-1/+11
| | | | | | | | is behind a transparent wall, but instead give a message about being unable to hear the mermaid. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6215 c06c8d41-db1a-0410-9941-cceddc491573
* Force berserking and non-living monsters to flee sanctuary.zelgadis2008-06-291-4/+11
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6212 c06c8d41-db1a-0410-9941-cceddc491573
* Only place a newly created monster (summons) on a sanctuary square if itzelgadis2008-06-291-3/+6
| | | | | | | | | | | | | | | is friendly. Only allow friendly and neutral-good monsters to blink or teleport onto a sanctuary square. Don't allow corpses on sanctuary squares to be rotted or animated. Restrict monster cantrip messages to self-buff types if the player is in sanctuary. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6211 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-291-6/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6207 c06c8d41-db1a-0410-9941-cceddc491573
* Bug 2005002: Allow friendly and neutral-good monsters to cast spells while inzelgadis2008-06-291-14/+13
| | | | | | | | | 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
* Comment fixes.dolorous2008-06-291-2/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6200 c06c8d41-db1a-0410-9941-cceddc491573
* Fix calculation of how far away a pacified monster is from the player.dolorous2008-06-291-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6199 c06c8d41-db1a-0410-9941-cceddc491573
* Enable pacified monsters' traveling to teleportation traps again. They dolorous2008-06-291-4/+6
| | | | | | | | won't make monsters leave the level, but they may teleport them far enough away that they might leave anyway. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6198 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-06-291-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6197 c06c8d41-db1a-0410-9941-cceddc491573
* Display the proper message when a pacified monster leaves the level.dolorous2008-06-291-6/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6196 c06c8d41-db1a-0410-9941-cceddc491573
* Remove erroneous routine for faking pacified monsters' falls through dolorous2008-06-291-10/+0
| | | | | | | shaft traps. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6195 c06c8d41-db1a-0410-9941-cceddc491573
* Faking falls through shaft traps for pacified monsters doesn't quite dolorous2008-06-291-9/+2
| | | | | | | | 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
* Fix tests for pacified monsters' leaving the level again.dolorous2008-06-291-20/+20
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6193 c06c8d41-db1a-0410-9941-cceddc491573
* Fix ME_ALERT handling for pacified monsters.dolorous2008-06-291-4/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6192 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cleanups.dolorous2008-06-281-4/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6191 c06c8d41-db1a-0410-9941-cceddc491573
* In response to BR 2005224 (TSO penance from shooting unseen underwaterj-p-e-g2008-06-281-4/+2
| | | | | | | | | | enemies) use player_visible_monster() as parameter known when setting conducts in beam.cc, so the player isn't punished for attacking monsters he didn't know were there, or if he did, had no idea about their current behaviour (fleeing perhaps?) Might be too nice, again, but I think it's okay. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6190 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2004501: buggy ?identify; also finally properly id ?identify itselfj-p-e-g2008-06-281-2/+14
| | | | | | | | after a successful identification (if there are several). Fix 2004793: wandering mushroom flees - for real, this time (I hope). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6189 c06c8d41-db1a-0410-9941-cceddc491573
* Properly handle it when a pacified monster can't find a level exit.dolorous2008-06-281-6/+11
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6187 c06c8d41-db1a-0410-9941-cceddc491573
* After some pointers from jpeg, rework the routine for monsters' leaving dolorous2008-06-281-227/+102
| | | | | | | | | 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
* Make sanctuary prevent giant eyeball and eye of draining stares, pluszelgadis2008-06-281-30/+19
| | | | | | | | | | moth of wrath goading/inciting. In monstuff.cc put "either monster or player in sanctuary" checks into convenience function. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6180 c06c8d41-db1a-0410-9941-cceddc491573
* Prevent monsters from zapping wands at a player in sanctuary by puttingzelgadis2008-06-281-24/+3
| | | | | | | | | 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
* Enable the currently unfinished routine to make pacified monsters leave dolorous2008-06-271-4/+0
| | | | | | | the level, as an aid to testing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6173 c06c8d41-db1a-0410-9941-cceddc491573