summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-behv.h
Commit message (Collapse)AuthorAgeFilesLines
* The great mon-stuff migration.Shmuale Mark2014-06-221-0/+4
| | | | | | | | | A good deal of functions move to the two new files, mon-poly and mon-message. Of the others, some go to where they are used, some to mon-util, and a few are made member methods of monster. This probably breaks Xcode compilation, and I'm not able to test the changes I made to MSVC that will (hopefully) keep it working.
* Move mon death stuff from mon-stuff.cc to mon-death.cc.Shmuale Mark2014-04-121-0/+11
| | | | | | | Touches a lot of files since their #includes have to be edited. (Pushing now since it shouldn't break anything and keeping it updated is nasty.)
* Allow nearly created allies to automatically choose appropriate foesDracoOmega2014-02-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having to repeatedly pause to tw after summoning new allies in a battle-in-progress (lest they simply stand around doing nothing) makes the pure summoner playstyle a bit more tedious than necessary. Also, it is not always intuitive to new players why allied monsters will sometimes appear to engage on their own and other times ignore obvious threats (say, if those threats simply missed you with their attacks on the previous turn). This adds the capacity for newly created summons to automatically choose valid nearby foes similar to if tw had been used just after making them. If there are no valid nearby foes, they will simply follow alongside the player as normal (no change to their general AI behavior has been made). (I did this by repurposing the apparently unused M_PLAYER_MADE flag. Hopefully there wasn't some reason for its existence that was not clear to me.) There is one caveat that is slightly different from tw: they will choose only foes that the player is also in los of (so as to not run off after monsters the player is not yet even aware of) and will even choose a foe that they are not in los of, but the player is, if no other one is available). This last property is particularly because often summons will be created slightly more distant from a monster you are fighting than the player is, and it is often very unclear that the monster cannot actually see the target from that spot. So when they do not engage and simply stand around the player, it appears moreso that the AI has failed to work properly, rather than the monster cannot see any target. We will assume that the player passes along some indication of its foes' positions that allies can use - in practice, the fact that this is even happening is not obvious; things simply just appear to move towards obvious enemies.
* Have monsters lose clairvoyance on the player's location if you reenter a ↵DracoOmega2012-12-121-0/+2
| | | | | | | | level via new stairs. Previously, even if you exited a level and reentered it using a different staircase, monsters could still retain knowledge of exactly where you were on the level for a considerable number of turns (100+), which sometimes led to the odd situation of a whole pack making a bee line for your new location on the other side of the map. Monsters will now also lose tracking on other monsters they're targeting, if those monsters get teleported across the level.
* Prevent friendly summons from attacking out of LOS.Raphael Langella2012-08-291-0/+4
| | | | | | | | | For a summon to be able to attack a target (by whatever mean), both it and its target needs to be in LOS of the player. It doesn't have to be actually visible, but it cannot be behind glass (the check is cell_see_cell_no_trans). Aditionally, wandering friendly summons will try to stay in sight of the player.
* Mindexicide: behaviour_event().Adam Borowski2012-04-211-1/+1
| | | | | This also reveals how bad the beam blaming code is, need to rewrite that soon -- mostly because of problems with reflection.
* Trigger the fleeing check when monster takes damage from any source.Raphael Langella2011-10-201-0/+1
| | | | Not just physical attacks.
* Cache position of the Orb.Adam Borowski2011-08-251-6/+2
| | | | It is referenced many times for every monster per turn in ZotDef.
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Further formatting fixes (and a few minor regular ones).Adam Borowski2010-11-301-1/+1
|
* Merge branch 'zotdef-0.6' into zotdef-mastermark2010-11-101-0/+8
|\ | | | | | | | | | | Much manual merging, and a few fixes for changes in the code (particularly monsters->monster and the like). Now compiles and seems to work. Zot Def added to start menu.
| * Merge of the original myzotdef branch into the Crawl 0.6Mark Mackey2010-05-051-0/+8
| | | | | | | | release branch. Quite a few edits required...
* | Clean up and fix monster cloud handling.Robert Vollmert2010-09-121-8/+0
| | | | | | | | | | | | | | | | Submerging now generally avoids damage from clouds, not just if the monster doesn't care. Cloud avoiding submergers don't cut short the monster action loop, so they don't build up a big energy pool. (#2199)
* | Rename class "monsters" to "monster".Robert Vollmert2010-09-051-9/+9
| |
* | Rename variables named "monster" to "mons" or similar.Robert Vollmert2010-09-051-3/+3
| |
* | Bring sanity to enums by making them diffable/patchable.Adam Borowski2010-06-081-1/+1
|/
* Merge Firing and Aim lines, per dcss:messagespam.Haran Pilpel2010-01-151-2/+0
|
* Split up monstuff.ccMatthew Cline2009-11-011-0/+52
A lot of monstuff.cc was moved into mon-abil.cc (monster abilities), mon-act.cc (the main monster loop), mon-behv.cc (monster behaviour) and mon-cast.cc (monster spells). mstuff2.cc was completely merged into other files.