summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/traps.cc
Commit message (Collapse)AuthorAgeFilesLines
* Trim unnecessary #includes.Adam Borowski2010-01-131-1/+0
|
* Rename transfor.{cc,h} to transform.{cc,h}.Adam Borowski2010-01-071-1/+1
|
* A few spacing changes.Johanna Ploog2009-12-281-5/+5
|
* Untie disarm confirmations from autotravel settings (Mantis 254).Adam Borowski2009-12-271-11/+26
| | | | | | | | Since it is done only on an explicit request, copious safety margins are not needed. I didn't provide an alternate way to disable the confirmation, but since the danger is now always real, I don't think that's needed.
* Reduce code duplication in trap_def::shot_damage.Vsevolod Kozlov2009-12-271-26/+16
|
* Replace long debug message calls with dprf(), except for cases where a dumb ↵Adam Borowski2009-12-201-3/+1
| | | | | | compiler could call unnecessary functions. For paranoia, I left even any uses of std::string.
* Rehide triggered shaft traps.Robert Vollmert2009-12-151-2/+4
| | | | | | This should fix shaft milestones not being reported (bug #157), and also make the shaft destination logic work as apparently intended.
* Add missing include to fix my previous commit.Johanna Ploog2009-12-131-0/+1
|
* Use the trap_prompt option to decide whether disarming traps prompts you.Johanna Ploog2009-12-131-1/+2
|
* Prompt when trying to disarm traps with hp < specified for trapwalk.lua.Johanna Ploog2009-12-131-1/+22
|
* Only place natural and magical traps in Slime.Jude Brown2009-12-071-0/+19
| | | | The jellies and acid blobs would've eaten any mechanical traps.
* Reduce dependency on travel.hMatthew Cline2009-11-291-0/+1
| | | | | | | | Removed inclusion of travel.h from most .h files to reduce the number of .cc files dependant on it. This involved moving the level_pos declaration to externs.h, moving the flood_find template to it's own header file, and moving two typedefs from travel.h to travel_defs.h because typedefs can't be forward declared (argh).
* Give shafts in corridor ends a good chance of being preknown.Robert Vollmert2009-11-271-0/+13
|
* Make early undiscovered shaft traps a little milder.Robert Vollmert2009-11-271-2/+2
| | | | | | | As per FR 2905062, the drop you at most 1 level from D:1 or 2 levels from D:2. Considering the steep difficulty increase in the early dungeon, this seems like a good idea, even once they become as rare as intended.
* Don't update map knowledge when revealing traps.Robert Vollmert2009-11-271-3/+1
| | | | | | | | | For "Detect Traps", map knowledge is already update by reveal_traps, and if a trap is in view, it will be copied to env.map_knowledge from env.show already. Fixes #78, which was caused by pre-known shaft traps changing map knowledge through trap_def::reveal.
* Remove unnecessary header-header includes.Robert Vollmert2009-11-271-0/+1
|
* Move trap_def from externs.h to trap_def.h.Robert Vollmert2009-11-271-1/+1
|
* Add formatting fixes.David Lawrence Ramsey2009-11-211-2/+2
| | | | This mostly puts && and || on the proper lines, per the style guide.
* Move silenced(pos) to areas.cc.Robert Vollmert2009-11-211-0/+1
|
* Test branch flags against BFLAG not LFLAG.Robert Vollmert2009-11-201-1/+1
|
* Shaft trap behavior modified. They now are one-time use and pre-knowledge of ↵Alex MacDonald2009-11-181-50/+36
| | | | | | shaft traps (i.e. using them intentionally) will improve the chances of the player landing fewer levels away. Shaft traps also now randomly determine their destination. Monsters cannot follow the player through shaft traps. Signed-off-by: David Ploog <dploog@users.sourceforge.net>
* Change shaft generation behavior: Escape hatches are not generated by ↵Alex MacDonald2009-11-181-4/+5
| | | | | | _builder_basic. Instead, there is a chance for a trail to be created with a shaft at the end. Shaft generation rate upped from ~2% of all traps to ~5%. Shafts have 50% chance of being created as revealed, this chance decreases as dungeon depth increases. Signed-off-by: David Ploog <dploog@users.sourceforge.net>
* Created generic interface for detecting traps within a radius.Alex MacDonald2009-11-181-0/+23
| | | | Signed-off-by: David Ploog <dploog@users.sourceforge.net>
* Delay adjustments for ring of fireCharles Otto2009-11-151-1/+3
| | | | | Update ring of fire's duration, also fix one use of DUR_REPEL I missed previously.
* Move mtransit to mon-transit.Vsevolod Kozlov2009-11-141-1/+1
|
* Remove obsoleted los.h includes.Robert Vollmert2009-11-131-1/+0
|
* Replace observe_cell by you.see_cell.Robert Vollmert2009-11-131-4/+4
|
* Rename monspeak/monplace/monstuff to mon-speak/place/stuff.Jude Brown2009-11-121-1/+1
| | | | | 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.
* Split shouting and stealth code from view.cc.Robert Vollmert2009-11-101-0/+1
|
* Replace mons_wont_attack with monsters::wont_attack.Vsevolod Kozlov2009-11-091-2/+2
|
* Split map knowledge and FPROPs.Robert Vollmert2009-11-081-2/+3
| | | | | | | | 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 uses of player_AC with player::armour_class.Vsevolod Kozlov2009-11-081-1/+1
|
* Replace mons_is_summoned with monsters::is_summoned.Vsevolod Kozlov2009-11-071-1/+1
| | | | Signed-off-by: Charles Otto <ottochar@gmail.com>
* Replace global see_cell by observe_cell and disambiguate old uses.Robert Vollmert2009-11-061-4/+4
| | | | | | | 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-3/+3
|
* Move mons_is_friendly to monsters::friendly.Vsevolod Kozlov2009-11-061-1/+1
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Rename is_valid_item to item_def::is_valid.Vsevolod Kozlov2009-11-061-1/+1
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Replace mons_is_caught with monsters::caught.Vsevolod Kozlov2009-11-051-2/+2
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Replace mons_is_paralysed with monsters::paralysed.Vsevolod Kozlov2009-11-051-1/+1
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Split up view.cc.Robert Vollmert2009-11-041-0/+1
|
* Splitting up stuff.cc.Robert Vollmert2009-10-301-0/+1
| | | | New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
* Convert some ints to monster_type.Robert Vollmert2009-10-271-1/+1
| | | | | | | | | There's a whole lot of places that pass monster_type as int, often with varying meanings for the value -1. This moves some of these to monster_type, introducing MONS_NO_MONSTER and MONS_PLAYER as new invalid special values. Also improve on the autoexclude descriptions.
* Get rid of player_monster_visible.Robert Vollmert2009-10-221-7/+7
| | | | | | The special casing for drowning monsters appears to have been obsoloted by checking ENCH_SUBMERGED instead of calling mons_is_submerged.
* Don't disturb monsters witth their own soundMatthew Cline2009-10-211-2/+8
| | | | | | | | | | A monster making noise was causing an ME_DISTURB behaviour_event() for itself, possibly causing it to get a new foe, which could cause strange results if it switched foes during the middle of spell-casting when it made noise from chanting. Now noisy() can accept a "who" parameter, in which case the monster which caused the noise will ignore the noise. This is done in all cases except for when a monster of animal or lower intelligence sets off an alarm trap or does a spell miscast.
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Limit alarm traps to 1-3 charges.Adam Borowski2009-10-181-1/+12
|
* Globally replace see_grid by see_cell.Robert Vollmert2009-10-171-4/+4
|
* Remove a lot of unneccessary includes.Robert Vollmert2009-10-091-3/+0
| | | | | | | The console version still compiles on Linux; both console and tiles version compile in OS X. I haven't been able to test the DOS and Windows compiles -- please fix or tell me about any errors that show up.
* Split LOS code from view.cc.Robert Vollmert2009-10-081-0/+1
| | | | | | | | | los.cc: basic raycasting algorithm; losight(), see_grid() etc. ray.cc: ray_def implementation. mon-los.cc: monster_los This includes adding a bunch of #includes; there's probably some obsolete includes of view.h now.