summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-behv.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix allies making a beeline for the map origin when out of LOSCharles Otto2010-01-171-2/+9
| | | | | | | | | | Fix a bug introduced in commit 8e49c668 which caused the movement target of friendly monsters outside the players LOS to be set to (0,0). monsters::get_foe() returns NULL for friendly monsters with foe equal to MHITYOU, so it was not being used correctly in handle_behaviour (since this part of it is just concerned with where monsters are trying to move rather than what they will actually attack).
* Trim unnecessary #includes.Adam Borowski2010-01-131-3/+0
|
* Don't make monsters seek projectiles. That's, uhm, unhealthy.Adam Borowski2009-12-271-0/+1
|
* Short-circuit behaviour_event(), projectiles are not supposed to behave.Adam Borowski2009-12-211-0/+2
|
* Remove unnecessary header-header includes.Robert Vollmert2009-11-271-0/+1
|
* Fix wandering monsters always targetting the player if in sight.Robert Vollmert2009-11-241-3/+5
|
* Move some pathfinding code from mon-behv.cc to mon-movetarget.cc.Robert Vollmert2009-11-161-963/+10
|
* Split monster_pathfind out into mon-pathfind.cc.Robert Vollmert2009-11-161-0/+1
|
* _guess_invis_foe_pos(): fix radius_iteratorMatthew Cline2009-11-151-1/+1
| | | | | Use the radius_iterator constructor whihc doesn't depend upon the player's LOS.
* Make test-spawners work properly again.Matthew Cline2009-11-151-0/+17
|
* handle_behaviour(): fix infinite loop.Matthew Cline2009-11-151-7/+20
|
* handle_behaviour(): guess pos of invis foesMatthew Cline2009-11-151-0/+35
| | | | | | | | If a monster didn't know the position of an unseen but nearby foe, then casting a spell against the foe would cause an assert. So now the monster tries to guess the position of the foe: a random square within radius 3 of the foe, or radius 2 if the monster can sense invisible. This algorithm no doubt needs improvement.
* Fix some arena asserts.Matthew Cline2009-11-151-1/+4
|
* Change arena foe check to assert.Robert Vollmert2009-11-131-2/+1
|
* Remove arena AI forcing option.Robert Vollmert2009-11-131-100/+3
| | | | | | | It's not strictly necessary anymore to have sensible fights with recent AI changes, and could easily be restored if required. Better to improve non-arena AI, however.
* Move trans_wall_blocking into player.Robert Vollmert2009-11-131-1/+1
|
* Replace observe_cell by you.see_cell.Robert Vollmert2009-11-131-1/+1
|
* Replace monster_index with monsters::mindex.Vsevolod Kozlov2009-11-131-2/+2
|
* More monster_iterator conversions.Robert Vollmert2009-11-121-5/+6
|
* Rename monspeak/monplace/monstuff to mon-speak/place/stuff.Jude Brown2009-11-121-2/+2
| | | | | I'm pretty sure I've managed to replace every instance of a reference to these files, so I hopefully haven't missed anything.
* Remove a few obsolete includes.Robert Vollmert2009-11-101-1/+0
| | | | Also add a few previously indirect includes.
* Remove inside_level_bounds.Robert Vollmert2009-11-101-1/+1
| | | | | This was a weird mix of in_bounds and map_bounds (exclusive top-left, inclusive top-right). Replaced with in_bounds.
* Split shouting and stealth code from view.cc.Robert Vollmert2009-11-101-0/+1
|
* Fix a genus check for blink frogs, and species checks for giant spores.David Lawrence Ramsey2009-11-091-4/+6
|
* Allied giant spore behavior tweaksCharles Otto2009-11-091-1/+6
| | | | | | Make allied spores consistently ignore 't' commands, also make them wander unless they spot an enemy (instead of following you around until they find an enemy).
* Replace mons_is_pacified with monsters::pacified.Vsevolod Kozlov2009-11-091-3/+3
|
* Replace mons_wont_attack with monsters::wont_attack.Vsevolod Kozlov2009-11-091-6/+6
|
* Rename FeawnCharles Otto2009-11-081-1/+1
| | | | | In most places Feawn is now referred to as "Fedhas," its long name (used in the religion screen) is "Fedhas Madash"
* Remove dead code.Robert Vollmert2009-11-081-3/+0
|
* Get rid of a few uses of mon_see_cell.Robert Vollmert2009-11-081-1/+1
|
* Split map knowledge and FPROPs.Robert Vollmert2009-11-081-5/+6
| | | | | | | | map_cell no longer has the field "properties", which has been replaced by the unsigned long array env.pgrid. env.map has been renamed to env.map_knowledge. It should really be moved into player.
* Replace bounds_func with circle_def.Robert Vollmert2009-11-081-1/+2
| | | | | | | The various LOS objects and functions now accept a circle_def instead of a bounds_func. This is a little less generic, but should eventually help with iterating over coordinates in any los_def.
* Replace mons_strict_neutral with monsters::strict_neutral.Vsevolod Kozlov2009-11-071-1/+1
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Replace mons_neutral with monsters::neutral.Vsevolod Kozlov2009-11-071-4/+4
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Replace global see_cell by observe_cell and disambiguate old uses.Robert Vollmert2009-11-061-2/+2
| | | | | | | Calls to plain see_cell(pos) were replaced with either observe_cell(pos) or you.see_cell(pos). observe_cell where related to drawing the interface and messaging, you.see_cell for game mechanics, and one or the other in less clear cases (targetting, say).
* Move checks for the berserk state into actor::berserk().David Lawrence Ramsey2009-11-061-5/+5
|
* Move mons_is_friendly to monsters::friendly.Vsevolod Kozlov2009-11-061-12/+12
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Simplify.David Lawrence Ramsey2009-11-061-5/+5
|
* Remove mons_friendly_real and mons_wont_attack_real.Vsevolod Kozlov2009-11-061-5/+5
| | | | | | They were the same as non-_real functions. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Unify mesmerisation code.Robert Vollmert2009-11-051-1/+1
| | | | | | | | There were several places that had copies of the same code, checking whether mesmerisation blocked movement to a given target. The various mesmerisation functions have become methods of player and were moved into behold.cc.
* Split up view.cc.Robert Vollmert2009-11-041-0/+1
|
* Get rid of multiple-meaning "int object" in env.show.Robert Vollmert2009-11-041-14/+11
| | | | | | | | | | | | | env.show is now a class show_def that stores tagged unions of type show_type. For the moment, there's also env.show_los for use in LOS determination, but that should become an array of boolean at some point. This breaks save compatibility. Tiles and console version build and appear to work fine, but this kind of change is likely to have some side-effects.
* Split game_options from externs.h into options.h.Robert Vollmert2009-11-041-0/+1
|
* Split up monstuff.ccMatthew Cline2009-11-011-0/+1928
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.