summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/traps.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* * Fix wizmode autoexplore (used for debugging) not nuking traps, as itj-p-e-g2009-09-201-2/+2
| | | | | | | | | claimed to do. * Fix post-berserk exhaustion not cancelling haste if not wearing the "RS. * Update change log. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10752 c06c8d41-db1a-0410-9941-cceddc491573
* A KFEAT specified trap can start out known to the player by adding "known"zelgadis2009-08-191-1/+6
| | | | | | | to the trap name. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10581 c06c8d41-db1a-0410-9941-cceddc491573
* Disallow vaults placing shaft traps if shafts are disallowed on thatj-p-e-g2009-07-271-5/+2
| | | | | | | level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10427 c06c8d41-db1a-0410-9941-cceddc491573
* Apply my previous commit to trunk: plants/fungi not triggering conducts.j-p-e-g2009-07-121-7/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10190 c06c8d41-db1a-0410-9941-cceddc491573
* First part of the merger of fixed artefacts into unrandom artefactszelgadis2009-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (further changes will be much smaller). Breaks savefile compatibility, and bumps the major savefile version up to 6. Some changes made to some tiles files, but it hasn't been tested with a tiles build. Overview of changes: * Unrand artefacts are now defined in art-data.txt and is turned into C code via util/art-data.pl. This has the dual advantage of being more readable by humans, and that if the unrand data structure changes then you can just change util/art-data.pl and regenerate the C code rather than having to change some 70 different C structs by hand. * util/art-data.pl automatically updates NO_UNRANDARTS, and also automatically generates an enumeration of all the unrands which are equal to their item.special field. * randart.cc and randart.h have been renamed to artefact.cc and artefact.h, since the files covers all types of artefacts, and the differences between randarts, unrandarts and (former) fixed arts have been minimized since the terms were introduced. Also renamed unrand.h to art-data.h * The brands and resistances of former fixed arts are now handled via artefact properties, but the rest of their special behaviours are still hardcoded. * Unrandarts are now distinguished between normal and "special", with the special ones currently just being identical to the list of the formed fixed arts. Special unrandarts are randomly generated less often than normal unrandarts, can be generated in the Abyss if they've been lost, can't be picked up by monsters, and can't be affected by Tukima's Dance. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10035 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix Xom's interest wrapping around from 0 to 255. (!!!)j-p-e-g2009-03-261-4/+11
| | | | | | | | | | | | | | | | * 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
* Remove gnomes and grey elves. (Can someone check the tiles compile?)haranp2009-03-041-1/+1
| | | | | | | Species-shifts saves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9328 c06c8d41-db1a-0410-9941-cceddc491573
* Remove all traces of TRAN_AIR and TRAN_SERPENT_OF_HELL, the latterj-p-e-g2009-02-271-6/+0
| | | | | | | together with the corresponding unused ability. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9244 c06c8d41-db1a-0410-9941-cceddc491573
* For 2089989, reallow friendlies to walk into your damaging clouds inharanp2009-02-211-1/+1
| | | | | | | some cases, regardless of god. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9145 c06c8d41-db1a-0410-9941-cceddc491573
* Clearing trapping nets moved into player::moveto() and level change.haranp2009-02-121-0/+3
| | | | | | | 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
* Add minor cosmetic fixes.dolorous2009-02-061-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8930 c06c8d41-db1a-0410-9941-cceddc491573
* Don't consider user options when deciding monster behaviour and whenharanp2009-02-041-2/+2
| | | | | | | | | giving a bonus for escaping nets due to dangerous monsters nearby. Don't give a bonus to escaping nets if nondangerous monsters (allies, plants, etc.) are nearby. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8896 c06c8d41-db1a-0410-9941-cceddc491573
* Code cleanup for traps.haranp2009-01-211-33/+27
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8648 c06c8d41-db1a-0410-9941-cceddc491573
* Fix bug #2517821: if a trap killed a monster and then tried to drop ammo itzelgadis2009-01-201-1/+5
| | | | | | | | would get a position of (0, 0) from the dead monster and place it there, leading to a debug_item_scan() warning. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8626 c06c8d41-db1a-0410-9941-cceddc491573
* Add more minor cosmetic fixes.dolorous2009-01-081-1/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8314 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2488346]: If a monster steps on an ammo-shooting trap, only dolorous2009-01-061-8/+11
| | | | | | | | poison/hurt it if the ammo actually hit it, and don't display messages like "An [ammo type] misses the [monster], but does no damage!". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8283 c06c8d41-db1a-0410-9941-cceddc491573
* In arena mode, make mons_friendly() and mons_wont_attack() always return false,zelgadis2009-01-061-1/+2
| | | | | | | | | | | | | with mons_friendly_real() and monst_wont_attack_real() having the old behaviour of ignoring arena mode. Remove all special casing of "mons_friendly(mon) && !crawl_state.arena", instead using mons_friendly_real() and mons_wont_attack_real() in the monster code which distinguishes friend from foe. Might be a bit buggy. Make Zot traps affect all monsters in arena mode, and never the player. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8255 c06c8d41-db1a-0410-9941-cceddc491573
* Adding REVISION() macro to all source files.ennewalker2009-01-041-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8217 c06c8d41-db1a-0410-9941-cceddc491573
* Changed player attribute type from unsigned char to unsigned long. Breakszelgadis2008-11-291-1/+1
| | | | | | | | | | | | | savefile compatibility. Keep track of how much gold the player has collected, spent at shops, donated, and otherwise used (like at ziggurats) and include that info in the misc section of the character dump file. Place-holder for chaos spawn monster. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7683 c06c8d41-db1a-0410-9941-cceddc491573
* Removed redundant buffer used to go from map_def to env.grid and all the ↵dshaligram2008-11-231-0/+1
| | | | | | tedious code used to mess with this pointless buffer. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7560 c06c8d41-db1a-0410-9941-cceddc491573
* More steps toward ziggurats.dshaligram2008-11-231-32/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7553 c06c8d41-db1a-0410-9941-cceddc491573
* Inform user on why a known shaft trap isn't triggered (fixes bug 2294949).zelgadis2008-11-221-10/+25
| | | | | | | | | | | Be more agressive about making shaft traps on invalid levels disappear in a puff of logic. If a wizard command creates a trap shaft on an invalid level, inform the user. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7536 c06c8d41-db1a-0410-9941-cceddc491573
* Fix spacing in death-by-trap message.dolorous2008-11-191-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7489 c06c8d41-db1a-0410-9941-cceddc491573
* FR 2046572: Don't anger allies by teleporting them. (Maybe enslaved monsters j-p-e-g2008-11-131-2/+1
| | | | | | | | | | | should be exempted from that, but for now they're not.) Make *all* allies (including zombies) avoid Zot traps known to the player, but don't let them avoid unknown ones (unless native, or highly intelligent, as usual.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7444 c06c8d41-db1a-0410-9941-cceddc491573
* Fix the ASSERT when undetected traps run out of ammo and display "Youj-p-e-g2008-11-091-8/+14
| | | | | | | | hear a click" instead of "The trap is out of ammo". Also, fix the miscolouring of the lua eating prompt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7428 c06c8d41-db1a-0410-9941-cceddc491573
* So many files? That's probably some debugging messages included,j-p-e-g2008-11-091-6/+7
| | | | | | | | | | | | | | | | | | again... Anyway, I added a check to make sure that monsters that somehow end up in deep water (confusion!) can get out of it again if not aquatic. Monsters that can drown, will still do so, of course. I also removed the drowning conditional for zombies and skeletons. They'll now slog invisibly underwater and eventually reappear in shallow water or dry land. I think this is more interesting than making them drown. That, and they've seen a lot of nerfs lately. Oh, right, and I replaced some ENCH_SUBMERGED with mons_is_submerged(), that might explain the number of modified files... git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7427 c06c8d41-db1a-0410-9941-cceddc491573
* Some more labyrinth tweaks:j-p-e-g2008-11-051-1/+2
| | | | | | | | | | * A floor now gets turned into a wall of the adjacent wall types rather than replaced by the original one (which might be a long way away). * Improve the look of the shifted labyrinth a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7389 c06c8d41-db1a-0410-9941-cceddc491573
* Add whitespace fixes.dolorous2008-10-231-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7294 c06c8d41-db1a-0410-9941-cceddc491573
* Minor messaging bug with Zot traps.haranp2008-10-131-7/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7241 c06c8d41-db1a-0410-9941-cceddc491573
* General code improvements.haranp2008-10-121-10/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7220 c06c8d41-db1a-0410-9941-cceddc491573
* Rewrite of beam.cc: put all beam data in one place. Might be buggy.haranp2008-10-091-7/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7201 c06c8d41-db1a-0410-9941-cceddc491573
* Add whitespace fixes.dolorous2008-10-071-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7182 c06c8d41-db1a-0410-9941-cceddc491573
* Expand handling of monster intelligence and zombifiability to work on dolorous2008-10-061-1/+1
| | | | | | | the level of individual monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7148 c06c8d41-db1a-0410-9941-cceddc491573
* Redid monster death idiom so that monsters::hurt can implicitlyharanp2008-10-041-6/+4
| | | | | | | | call monster_die(). (This behaviour can be overriden.) Minor code cleanups elsewhere, removal of dead code from bolt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7123 c06c8d41-db1a-0410-9941-cceddc491573
* Some cleanup (replacing you.duration[DUR_CONF] with you.confused())haranp2008-10-031-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7108 c06c8d41-db1a-0410-9941-cceddc491573
* Removed dead code.haranp2008-10-031-23/+0
| | | | | | | Unbroke tiles build (sorry...) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7104 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2144473: trap revamp permanently hid teleport traps.haranp2008-10-031-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7103 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2142643: bugs in net traps that I introduced in the trap revampharanp2008-10-021-23/+36
| | | | | | | | (noted by dolorous.) Net traps can now trigger outside of your line of sight. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7084 c06c8d41-db1a-0410-9941-cceddc491573
* Add whitespace fixes.dolorous2008-10-021-13/+13
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7078 c06c8d41-db1a-0410-9941-cceddc491573
* Reworked traps: much much cleaner now. There might be bugs, though.haranp2008-10-011-336/+595
| | | | | | | | | | 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
* In ouch(), use NON_MONSTER instead of 0 as the index for non-monster dolorous2008-09-251-2/+5
| | | | | | | attacks, so as to avoid overlap with the first monster on the level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6985 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
* Fix [2046704]: Elves shouldn't make axe or bolt traps.dolorous2008-09-111-3/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6900 c06c8d41-db1a-0410-9941-cceddc491573
* Massive overhaul to move towards coord_def().haranp2008-07-301-26/+18
| | | | | | | | | | This might have introduced some bugs: I now get intermittent crashes on startup (this might have to do with the changes to special_room.) Sorry about that - committing before I need to do any more big conflict resolutions. Fixes coming later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6732 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented monster spell miscasts. Spell miscasting is now handledzelgadis2008-07-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by the MiscastEffect class, which has helper methods to make most of the non-helper code agnostic with respect to whether the miscaster is the player or a monster. Mummy death curses now affect monsters, and Zot traps now directly affect friendly and good-neutral monsters. In wizard mode you can force the player or a monster to miscast by targeting it and pressing 'M'. Todo/issues/notes: * Clouds now have a killer_type in addition to a kill_category. * There aren't any divination monster miscast effects yet. * Many of the harmless message-only miscast effects are missing monster messages. * If a monster actually miscasts a spell (not getting a mummy death curse or setting off a Zot trap) and this kills both the monster and the player then the wrong monster will be listed in hiscore entry. Since monsters can't do true spell miscasts yet, this can wait. * There was old, non-functioning code making Zot traps heal, haste or turn invisible hostile monsters that triggered it. I fixed it and then commented it out. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6723 c06c8d41-db1a-0410-9941-cceddc491573
* Don't allow switching to autocurse weapons for butchery. [2026147]haranp2008-07-241-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6670 c06c8d41-db1a-0410-9941-cceddc491573
* More cleanups and fixes.haranp2008-07-231-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6648 c06c8d41-db1a-0410-9941-cceddc491573
* Massive change from using x and y to using coord_defs(). Not quite tested,haranp2008-07-221-40/+39
| | | | | | | | 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
* Another clean up, and add some new weapon speech.j-p-e-g2008-07-071-23/+27
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6439 c06c8d41-db1a-0410-9941-cceddc491573