summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/traps.h
Commit message (Collapse)AuthorAgeFilesLines
* Move held_status() from stuff.cc to traps.ccNicholas Feinberg2014-07-271-0/+1
| | | | | Also add some comments to stuff.h, categorizing functions for later removal.
* Move a little more code out of misc.ccNicholas Feinberg2014-07-021-0/+1
|
* The great mon-stuff migration.Shmuale Mark2014-06-221-0/+1
| | | | | | | | | 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.
* Tidy up some web/net behaviourNicholas Feinberg2014-06-131-2/+2
| | | | | | | | | | Monsters should now try to escape from Arachne's ensnare immediately (on whatever incredibly rare occasions that is relevant), and shouldn't try to break out of net traps on the turn they get netted. This technically breaks save compat with the old newly_webbed prop, but in a harmless way.
* Don't let monsters get free turns when escapingNicholas Feinberg2014-06-101-0/+2
| | | | From nets & webs.
* Chance function(void) to function()reaverb2014-05-241-1/+1
|
* Clean-up shaft_known() (MarvinPA)reaverb2014-05-151-1/+0
|
* Make throwing nets do something on hit again.Steve Melenchuk2014-04-271-1/+1
|
* Remove some now-unused handling for web placementChris Campbell2014-04-091-1/+1
|
* Remove throwing net degradation, instead mulch probabilisticallyDracoOmega2014-03-121-0/+1
| | | | | | | | | | | | | | Instead of throwing nets accumulating persistent damage as monsters struggled against them (and then becoming impossible to stack in your inventory afterward), they are either outright destroyed by the struggle or remain in normal condition. This should make them a little less cumbersome to use. This commit doesn't actually touch any of the escape formulas (which are an impressive snarl that could definitely use tending to), since probably they would need rewriting from scratch and I didn't want to undertake that so close to 0.14, with various other things still in the air.
* Axe a number of unused functions.Adam Borowski2012-11-241-1/+0
|
* 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.
* Traps are never placed on a remote level, so simplify the interface.Adam Borowski2012-05-101-2/+2
|
* Merge branch 'master' into portal_branchesAdam Borowski2012-04-251-3/+0
|\
| * Axe several unused functions.Adam Borowski2012-04-221-3/+0
| |
* | Merge branch 'master' into portal_branchesAdam Borowski2012-03-261-0/+1
|\| | | | | | | | | This includes fixes for 64834896234968 places in master that add new uses of LEVEL_FOO and so on.
| * ArachneAdam Borowski2012-03-191-0/+1
| | | | | | | | | | | | | | | | | | Greek mythology has her as a mere non-sentient spider, the "spidertaur" form I used here comes later -- most of 19th century artwork shows her that way, possibly some earlier works too. She has a staff of poison, and a spell that shoots a beam that splats a web onto you.
* | Don't explicitely pass absdepth:branch in the dungeon builder.Adam Borowski2012-01-031-4/+2
|/ | | | | There's no support for producing maps for a level you're not on, around half of functions assumed this.
* Fix Zot traps' names not being capitalized, and clean up trap code a bit.David Lawrence Ramsey2011-10-211-1/+0
|
* Generate webs out of LOS during playPete Hurst2011-09-011-1/+1
|
* Forcibly detaching yourself from a web may destroy it.Adam Borowski2011-09-011-0/+1
|
* Grow more webs as time passes.Adam Borowski2011-08-311-0/+1
|
* Remove unused non-Lua fog generator code, almost unused trap generators.Adam Borowski2011-08-171-4/+0
| | | | | | | | The version we do use, placing fog generators with vaults, gives a lot better control. Per-branch trap generators were used only to block mechanical traps from generating in Slime, this can be done with a single if.
* 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.
* Merge branch 'zotdef-0.6' into zotdef-mastermark2010-11-101-0/+1
|\ | | | | | | | | | | 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.
| * Increased trap cost and shuffled around.Mark Mackey2010-11-051-0/+2
| | | | | | | | | | | | | | | | | | Made trap costs dependent on the number of traps. Possibly too high atm. Fixed zot map 3 Added zot map 4 - still needs balancing Added a small amount of randomisation to the monster pathfinding A* algorithm. Made blade traps break eventually
* | Simplify, underline statics.Adam Borowski2010-10-271-10/+0
| |
* | Remove some duplicated logic.Adam Borowski2010-10-181-8/+2
| |
* | Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-1/+1
| | | | | | | | | | | | I did review it manually to find places where they made sense (like some tables), but for a massive sed job like this there might be places that I missed.
* | Tweak feature mimics: trap mimics.Jude Brown2010-10-111-0/+9
| | | | | | | | | | | | | | Now they: * use a randomly chosen trap as their appearance (purely mechanical tough) * are now known as "<x> mimic" as opposed to "mimic".
* | get the functionality actually workingJesse Luehrs2010-09-091-0/+1
| |
* | Rename class "monsters" to "monster".Robert Vollmert2010-09-051-4/+4
| |
* | [169] Fix travel not passing trap names correctly to trapwalk.lua.Darshan Shaligram2010-06-071-0/+1
|/ | | | | | Travel no longer attempts to cache trap positions. Warn wizmode user if a trap cannot be created.
* Only place natural and magical traps in Slime.Jude Brown2009-12-071-0/+2
| | | | The jellies and acid blobs would've eaten any mechanical traps.
* Reduce dependency on travel.hMatthew Cline2009-11-291-1/+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/+1
|
* Move trap_def from externs.h to trap_def.h.Robert Vollmert2009-11-271-0/+1
|
* Shaft trap behavior modified. They now are one-time use and pre-knowledge of ↵Alex MacDonald2009-11-181-1/+1
| | | | | | 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>
* Created generic interface for detecting traps within a radius.Alex MacDonald2009-11-181-0/+1
| | | | Signed-off-by: David Ploog <dploog@users.sourceforge.net>
* Remove "called from:" comments.Vsevolod Kozlov2009-11-031-8/+0
| | | | | | These were of questionable use and freshness. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* A KFEAT specified trap can start out known to the player by adding "known"zelgadis2009-08-191-0/+2
| | | | | | | to the trap name. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10581 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix Xom's interest wrapping around from 0 to 255. (!!!)j-p-e-g2009-03-261-1/+1
| | | | | | | | | | | | | | | | * In xom_acts, if Xom was bored (and now did something bad) reroll interest. * Greatly decrease amusement derived from the player entering a new level. (However, entering a new level via escape hatch or shaft is REALLY amusing, more so the deeper the shaft.) * Xom may be amused if you are caught in a net and there are hostile monsters around. * Fix draconian tiles not showing up correctly for Detect Creatures. * Improve card descriptions output for Triple Draw/Stack Five. * In inventory, add '&' hotkey for useless (== inedible) chunks. Still needs documentation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9557 c06c8d41-db1a-0410-9941-cceddc491573
* Clearing trapping nets moved into player::moveto() and level change.haranp2009-02-121-2/+2
| | | | | | | This fixes some bugs (e.g. Portal spell and nets interact properly.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9036 c06c8d41-db1a-0410-9941-cceddc491573
* Reworked traps: much much cleaner now. There might be bugs, though.haranp2008-10-011-10/+4
| | | | | | | | | | Traps now remember how much ammo they have. The ammo quantities (from David) are rather tentative. Breaks savefiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7076 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-4/+0
| | | | | | | | | | into a file crawlhistory.txt in docs/obsolete. I used a perl script to do this under the assumption that all these change logs used the same system following the keyword "Change History". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6930 c06c8d41-db1a-0410-9941-cceddc491573
* Massive change from using x and y to using coord_defs(). Not quite tested,haranp2008-07-221-6/+6
| | | | | | | | most likely broken in some places and might break tiles. Will fix in the near future. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6636 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1996770: shafts being capable of disarming.j-p-e-g2008-06-181-0/+1
| | | | | | | Fix 1996304: the Swap card incorrectly swapping monsters/player caught in a net git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5941 c06c8d41-db1a-0410-9941-cceddc491573
* Added Water card. Might need some rebalancing.haranp2008-04-081-17/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4127 c06c8d41-db1a-0410-9941-cceddc491573
* Items can now fall through shaft traps (trap doors). The code is ratherzelgadis2007-12-031-1/+3
| | | | | | | | | | | | | | simplistic, and it's not currently possible to make a "baited" shaft; also, there is no threshold weight, so even a single dart will open up (and thus reveal) a shaft trap. Breaks savefile compatibility. Monsters which fall through a shaft now show up 100% of the time on the player's next visit to the shaft's destination level. Also, the monster is placed close to the spot where the player would end up if s/he went through the same shaft. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2988 c06c8d41-db1a-0410-9941-cceddc491573