summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-act.h
Commit message (Collapse)AuthorAgeFilesLines
* Let wandering mushrooms swap with toadstools.Sage2014-02-251-0/+1
| | | | | | | | ...And not block your exit when you are swapping through toadstools. Addresses annoyances while playing Fedhasites, after praying in corridors and blocking off allied mushrooms, or getting blocked in by mushrooms in a hole in a wall. Other allies are still blocked by toadstools.
* Implement Portal Projectile for marksnagas in place of Leda's.Steve Melenchuk2014-01-281-0/+4
| | | | | | | | | | | | For whatever reason, extra-stable footing doesn't apply to liquefied ground, so that part of the original rationale fails; the new replacement is partly motivated by my observation that in a lot of scenarios where marksnagas turn up, the rest of the nagas in the pack tend to block their lines of fire - so this helps make them effective even in those scenarios. This is a variation of the implementation I've had floating around for a while (20f9716) updated for more modern Crawl.
* Correct a major timing issue with monster battlespheresDracoOmega2013-06-261-0/+2
| | | | | | | | | | | | | | | | | | | Since the change to how monster turns are ordered (being interleaved based on speed/energy instead of consecutively based on index), monster battlesphere are no longer nearly guaranteed to act after their caster. This meant that, from the player's perspective, the battlesphere would fire one turn AFTER the spell that triggered it. Worse, it would be aimed at where the player was standing that turn, so it was possible to dodge by moving. I have addressed this by making monster battlesphere triggering reset the battlesphere to a full turn's worth of energy, and then reinsert it into the monster action queue. (This reinsertion is necessary since it is quite likely it would not be otherwise examined until the following turn, no matter how much energy it had.) I do not think that cases where two copies of the same monster end up in the queue at once will have any effect, as popped monsters with unsufficient or modified action energy are simply ignored.
* Let fulminant prisms and ball lightnings blow up instead of crashing (#6946).Steve Melenchuk2013-04-221-1/+0
|
* Have monsters act in order of speed_increment values.Steve Melenchuk2013-04-211-0/+10
| | | | | | | | | | | | This means that monsters only get consecutive actions if they are much faster than anything around them, and that fineffs fire once per monster action (fixing #6936). A good way to illustrate this change is to generate a pack of centaurs with perm_ench:haste. Previously, one centaur would fire off as many shots as it could take, then the next centaur, etc. - they were nice and took turns in order. Now, you'll get consecutive volleys - they all seem like they are firing simultaneously.
* Use std namespace.Raphael Langella2012-08-261-1/+1
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Move handle_noattack_constrictions to actor.ccRaphael Langella2012-07-041-1/+0
| | | | | | Since it works for both monster and player. And rename it handle_constriction. Also remove has_constricted_this_turn it's simpler to just deal damage at the end of the turn.
* Merge player/monster noattack constriction code.Neil Moore2011-12-271-0/+1
| | | | | Also, properly attribute constriction kills by confused monsters; and fix a warning when compiling without diagnostics.
* 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.
* Fix a bug with Hibernation.elliptic2011-02-191-1/+1
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Better movement AI for ranged attackers.Raphael Langella2011-01-191-0/+2
| | | | | | | | | | | | | | | | | | When you leave the LOS of a monster with ranged attacks, it will try to regain a line of fire instead of coming straight after you. This is the end of the "duck behind a corner" strategy. Next CDO update is going to be fun ;) This is of course going to make all monsters with ranged attacks more dangerous, especially to melee. On the other hand, they are a bit easier to escape from (if too easy, reduce ideal_range to 3). To balance it we can make scrolls of fog more frequent and/or more effective. As it is my first time messing with monster AI, the code probably needs some review. I have cleared firing_pos in several places to be safe, but some may be useless. Also, the _set_firing_pos function is maybe a bit expensive, but it shouldn't be too much of an issue, as it is not called very often.
* Make aquatic monster chase instead of submerging if they can. (#2530)Robert Vollmert2010-09-121-0/+2
| | | | | This explicitly doesn't affect fleeing monsters since I'm not sure what they're supposed to do.
* Rename class "monsters" to "monster".Robert Vollmert2010-09-051-1/+1
|
* Export handle_monster_move for debug access.Robert Vollmert2010-02-131-0/+1
|
* Split up monstuff.ccMatthew Cline2009-11-011-0/+14
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.