summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/debug.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix potions of decay created by mummy curse sometimes being inscribed.j-p-e-g2008-07-071-1/+5
| | | | | | | | | Change inscription prompt to work as intended by David, after all. :) Make manuals use a reading counter (plus2) that is initialized with 3 + random2(15). Once it reaches 0, the manual crumbles to dust. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6443 c06c8d41-db1a-0410-9941-cceddc491573
* Remove some of my infamous debugging statements (I keep forgettingj-p-e-g2008-07-061-5/+5
| | | | | | | | | them!) and move the new pdf files around, renaming contact.pdf to README.pdf since it's the shorter version of readme.txt, also capitalized now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6435 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2011722: Reallow targetting beams such that you may be hit. (There'sj-p-e-g2008-07-061-18/+16
| | | | | | | | | | | | | a new prompt now, but don't prompt a second time if you already confirmed another one before.) Fix some issues when creating items in the Abyss during GDT_GAME_START. This may or may not have played a role in 2008976. Lower spawning rate in the Abyss during GDT_GAME_START (10% spawning chance instead of guaranteed spawning per 5 turns). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6434 c06c8d41-db1a-0410-9941-cceddc491573
* Remove debugging statement, minor clean up.j-p-e-g2008-07-031-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6369 c06c8d41-db1a-0410-9941-cceddc491573
* Only apply targeting via monster list to spells and such wherej-p-e-g2008-07-021-3/+5
| | | | | | | targeting monsters is actually needed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6338 c06c8d41-db1a-0410-9941-cceddc491573
* When reading a "modification scroll" (prompt: Use on which item?)j-p-e-g2008-06-301-2/+2
| | | | | | | | | | | don't list the scroll you just read as one to use it on. This fixes the ugly issue where the player, forgetting the slot of the scroll just read, uses identify on itself, thereby wasting the scroll. For enchant armour and recharging it's a moot point as they don't work on scrolls anyway, but this way you can't figure out the subtype. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6251 c06c8d41-db1a-0410-9941-cceddc491573
* Fixing compilation error.ennewalker2008-06-291-8/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6201 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cleanups.dolorous2008-06-281-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6191 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2004501: buggy ?identify; also finally properly id ?identify itselfj-p-e-g2008-06-281-9/+9
| | | | | | | | after a successful identification (if there are several). Fix 2004793: wandering mushroom flees - for real, this time (I hope). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6189 c06c8d41-db1a-0410-9941-cceddc491573
* Disallow quivering equipped items. (You can still (fi)re your wieldedj-p-e-g2008-06-261-5/+5
| | | | | | | | weapon if you insist, you just can't quiver it.) And another general clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6149 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-7/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Don't note monsters of HD <= 2. (Butterflies may be extremely rare, butj-p-e-g2008-06-211-3/+9
| | | | | | | | | | when they appear, it's not interesting enough to be noted.) Tweak wizmode monster placement to never place monsters at the player position. Rather, change one of the neighbouring square's terrain type, if need be. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6032 c06c8d41-db1a-0410-9941-cceddc491573
* Since mons_clear_trapping_net() checks if the monster is caught in a dolorous2008-06-191-8/+5
| | | | | | | | net, a separate check before calling it is redundant, so remove instances of that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5974 c06c8d41-db1a-0410-9941-cceddc491573
* For jewellery with pluses and wands, only make an ident note when thezelgadis2008-06-191-1/+1
| | | | | | | | | | | | first item of the type is identified, not when the charges/pluses of any item of the type is identified. Make sure that artefacts have nothing to do with the identification level of jewellery by making versions of set_ident_type() and get_ident_type() which accept a full item_def as a parameter. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5973 c06c8d41-db1a-0410-9941-cceddc491573
* Add an unfinished attempt at making pacified monsters leave the level. dolorous2008-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BEH_LEAVE replaces BEH_INVESTIGATE, which wasn't being used. Notes: Since leaving the level is similar to fleeing in some ways, monsters leaving the level share some behaviors with fleeing monsters: they are less likely to shoot; they are more likely to use scrolls of blinking or teleportation; and leaving eyeballs won't paralyze you or drain your MP. Leaving the level is also similar to lurking in some ways, so it won't be interrupted by noticing something, just as with lurking. Getting far enough away from a monster will make it leave the level (i.e., die with KILL_DISMISSED and MF_HARD_RESET, so it takes its stuff with it), as will getting it into a grid it can submerge in, at which time it will submerge and leave the level. Neither of these apply to monsters that can't move, of course, except for mimics, since they can teleport. Incomplete things (sorry for the mess): I still haven't figured out how to make a monster target a dungeon feature (in this case, the nearest level exit, the nearest teleportation or shaft trap, or the nearest submersible grid), so, currently, a pacified monster will just go to where its last target was and stand there until/unless one of the aforementioned level exit scenarios occurs. Pacified monsters can still cast summoning spells. Whatever they summon is neutral, just as they are, but such summons can still get in the way. (Try pacifying an orc high priest, for example.) Maybe summoning should be disabled or have its chance lowered for neutral monsters in general, unless something's in their way? Speaking of targeting, the leaving-by-submerging scenario should occur only if there's no other way to reach the target: all ways off the level are blocked, the monster's habitat is water and it's not amphibious, the monster's habitat is lava, or (possibly) the monster's habitat is rock. There should be a message if the monster leaves the level, but what about the ones that do so out of the player's LOS? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5924 c06c8d41-db1a-0410-9941-cceddc491573
* Add more cleanups.dolorous2008-06-161-11/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5894 c06c8d41-db1a-0410-9941-cceddc491573
* Fix the Vestibule having no upstairs. o_Oj-p-e-g2008-06-151-4/+0
| | | | | | | Fix fleeing monsters shooting at you. (BR 1994462) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5861 c06c8d41-db1a-0410-9941-cceddc491573
* Add more minor cosmetic fixes.dolorous2008-06-141-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5817 c06c8d41-db1a-0410-9941-cceddc491573
* Fix warning.dolorous2008-06-131-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5779 c06c8d41-db1a-0410-9941-cceddc491573
* Remove unneeded methods (including the old resistance screen), renamej-p-e-g2008-06-121-91/+48
| | | | | | | debugging functions, and some other clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5757 c06c8d41-db1a-0410-9941-cceddc491573
* Recalculate permanent mutations when changing species, but leave non-permanentzelgadis2008-06-121-7/+93
| | | | | | | mutations in place. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5753 c06c8d41-db1a-0410-9941-cceddc491573
* Overhaul god gift handling again so that we can tell which god sent dolorous2008-06-121-2/+3
| | | | | | | | | | | which gift. There was an unused god parameter in the monsters struct, which was probably intended to hold which god a monster worshipped. I've used it as an indicator of which god sent the monster, under the assumption that gods would send their own worshippers as gifts. (I hope this isn't an abuse of it.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5748 c06c8d41-db1a-0410-9941-cceddc491573
* Clean-up (renaming static methods and comments) in a number of files.j-p-e-g2008-06-101-15/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5703 c06c8d41-db1a-0410-9941-cceddc491573
* Yikes, so many files! And all I did was add more item evaluationj-p-e-g2008-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | functions for menu colouring and pickup... Added: emergency_item, good_item, dangerous_item, bad_item, and useless_item, all taking into account player species and mutations, so e.g. =see invisible is useless for Naga, and !poison is always bad but only useless if you don't know Evaporate. Never autopickup useless, dangerous (e.g. ?immolation) or inedible items, and simplify the item colour/pickup options accordingly. I'll have to see if pickup.lua is still even needed after this. Removed the menu_colour_prefix_id option as I can't see any reason to turn it off. Oh, and fixed a bug where Kenku were unable to stop levitating if they gained level 15 while levitating. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5658 c06c8d41-db1a-0410-9941-cceddc491573
* Remove useless debugging statement from _sort_monster_list()zelgadis2008-06-071-5/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5532 c06c8d41-db1a-0410-9941-cceddc491573
* Organize and condense the monster list printed by the list monsterszelgadis2008-06-071-2/+58
| | | | | | | wizard command (&"). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5531 c06c8d41-db1a-0410-9941-cceddc491573
* Add a line on good gods disapproving of certain items to theirj-p-e-g2008-06-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | description (evil_item). Same for evil_eating. In another step on the way to monster pathfinding, take the shortest path and extract a vector of waypoints out of it. When experimenting with ways to do this I noticed that grid_see_grid is not symmetrical (A may see B but not vice versa); I'm not sure what effects that could have. It won't directly affect the player as the checks for monster sees player and player sees monster both use the player LoS, but it could have an effect on friendly monsters fighting enemy ones, I guess. Also, I don't think num_feats_between needs the shortest beam available (called with false now). In fact, that seemed to hurt visibility a bit, probably because of attempting to take vision obstructing shortcuts. If this reasoning is wrong, please speak up and/or correct it. (I sure hope not because the shortest beam calculation has some more overhead that can be avoided this way.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5501 c06c8d41-db1a-0410-9941-cceddc491573
* When creating a corpse via wizard command make the item's orig_monnumzelgadis2008-06-061-9/+13
| | | | | | | | reflect the monster's type rather than the wizmode acquirement type, since orig_monnum is used for things like the Animate Dead spell. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5497 c06c8d41-db1a-0410-9941-cceddc491573
* Fix mimics not teleporting when attacked by reaching or airstrike, and aj-p-e-g2008-06-051-3/+8
| | | | | | | few (really) minor adjustments on monster pathfinding. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5487 c06c8d41-db1a-0410-9941-cceddc491573
* Implement pathfinding for monsters, using the A* algorithm.j-p-e-g2008-06-041-1/+33
| | | | | | | | | | | | | | | | It's not actually used anywhere yet, but I've implemented a wizmode testing function (x on monster, then 'w') that calculates the shortest path to any playerchosen destination on the level, and it seems to work quite well. The monsters tend to take zigzag paths but that should be easy enough to smooth out and in any case doesn't matter all that much since the player usually won't witness this. Oh, and though I tested the whole thing in a labyrinth, it went ridiculously fast! I'd rather doubted that but Darshan was completely right, as usually. :p Please don't remove the debugging output yet, I still need them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5476 c06c8d41-db1a-0410-9941-cceddc491573
* I'm not sure I actually coded anything worthwhile, though I experimentedj-p-e-g2008-06-021-1/+0
| | | | | | | | | | | | | | | | a fair bit and as usually ended up doing lots of clean-up. Oh wait, I modified eat_from_floor prompts to only force a more if there was actually a message before trying the inventory (whoops), and also modified the corpses in pack hint to take into account that a saccing player won't be interested in butchering rotten corpses. Also implemented a modified FR 1981119: when Detect Creatures only detects plants already seen before, print a different message ("You detect no further creatures."). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5435 c06c8d41-db1a-0410-9941-cceddc491573
* The wizard "tweak item" command can now alter randart properties.zelgadis2008-06-021-2/+169
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5429 c06c8d41-db1a-0410-9941-cceddc491573
* If create_spec_object() is given the name of a spellbook which doesn'tzelgadis2008-06-021-0/+25
| | | | | | | | exist, treat the name as a spell name and try to find a spellbook containing that spell. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5425 c06c8d41-db1a-0410-9941-cceddc491573
* Add new wizard targeting command 'm', to move monsters around (or tozelgadis2008-06-021-0/+79
| | | | | | | | | | move the player like wizard blink if there's no monster at the chosen square). Two monsters can be made to swap positions, and unseen monsters/squares can be targeted. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5423 c06c8d41-db1a-0410-9941-cceddc491573
* Commit a few changes, mostly clean-up.j-p-e-g2008-06-011-2/+2
| | | | | | | | | | | | | * Modify tile_show_items setting in tutorial to (hopefully) show corpses again. * Change skill_exp_needed to use the level input rather than decreasing the passed in parameter, esp. when it was mostly called in the form skill_exp_needed(x + 1) anyway. I was trying to find out what went wrong in BR 1929156 but I can't work out the formula. :( git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5421 c06c8d41-db1a-0410-9941-cceddc491573
* Add another comment fix.dolorous2008-06-011-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5418 c06c8d41-db1a-0410-9941-cceddc491573
* Fix wizard mode being unable to create monsters of nonfloor habitat.j-p-e-g2008-06-011-166/+174
| | | | | | | | | | | | | | | | Changed labyrinth handling for minotaurs: Instead of being magic mappable, labyrinths are plain mappable. Yes, that makes everything much easier, but allowing magic mapping and yet you still have to trudge along by hand (rather than use autotravel) is worse. To make up for it, we might want to boost the monster minotaur (trying to defend its home against a rival?) Or we could just remove the difference altogether... Cleaned up debug.cc a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5401 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1937489: Remove map markers overwritten by lakes or rivers, as wasj-p-e-g2008-06-011-4/+8
| | | | | | | | | | | | | already done for vaults. Modify monster speech to make the beast only use some selected shouts (i.e. not "You hear an irritating whine") and NEVER do the demon taunts since it cannot speak. Demon lords can use almost the whole array of speaking verbs except for "buzz" and "whine". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5400 c06c8d41-db1a-0410-9941-cceddc491573
* Autopickup freshly bottled blood potions. j-p-e-g2008-05-301-1/+14
| | | | | | | | | | | Also, call autopickup() after a delayed weapon swap (presumably because we butchered/bottled one or more corpses before), so we can pick up all chunks/potions at the same time. Note that Vampires won't autopickup chunks, but autopickup will at least list stuff on the floor, which is also nice to have. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5347 c06c8d41-db1a-0410-9941-cceddc491573
* Another use for patrolling:j-p-e-g2008-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Hostile monsters wandering across a grid they consider "interesting" may note it down as patrolling point to return to. There's currently no way of deleting such a patrol point short of enslaving the monster. As before, patrolling only applies while wandering. Other behaviour modes (chasing the player etc.) take precedence. For now interesting grids are: * altar to one of the good gods for holy beings * altar to Beogh, or entrance to/return from Orcish Mines for orcs * entrance to/return from Elven Halls for elves * entrance to the Hive for killer bees To test these changes, I've modified the stealth checks for wizard mode: If you set the Stealth skill to a value greater than 27 (possible in wizmode) hostile monsters will ignore you, i.e. not set MHITYOU if you are nearby. Noises will still wake monsters, and they'll hit you if they walk into you (or vice versa), but they won't target you. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5313 c06c8d41-db1a-0410-9941-cceddc491573
* Yet another session of comment/whitespace cleanups.j-p-e-g2008-05-271-7/+16
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5291 c06c8d41-db1a-0410-9941-cceddc491573
* Added "error" channel for runtime errors, and changed error messages thatzelgadis2008-05-271-12/+12
| | | | | | | | | used the "danger" or "warning" channels to use that. Sending an error message to the error channel has the side effect of interrupting all activity. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5276 c06c8d41-db1a-0410-9941-cceddc491573
* Handle the good neutral attitude properly in debugging information and dolorous2008-05-191-4/+5
| | | | | | | the wizard mode attitude toggle. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5133 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up monster generation functions, separate monster zombie type from ↵dshaligram2008-05-051-7/+15
| | | | | | | | | monster number. May be buggy. Allow hydra zombies (they currently do not get the right number of heads). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4872 c06c8d41-db1a-0410-9941-cceddc491573
* First attempt at making vampire feeding interruptible. It doesn't workj-p-e-g2008-05-051-4/+1
| | | | | | | | | | | yet (I had "You stop feeding" followed by "You continue feeding" including full effects), but it's probably better to commit now anyway. Known potions of blood or porridge cannot be quaffed when engorged (alive). Also clean up blood potions check. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4871 c06c8d41-db1a-0410-9941-cceddc491573
* [1956565] Fix issues with monster names.dshaligram2008-05-041-1/+1
| | | | | | | | | Monster names are now stored in the monster struct and saved. Changed some monster-finding functions to return monsters* instead of monster index for type-safety. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4859 c06c8d41-db1a-0410-9941-cceddc491573
* Add a failMsg parameter for delete_mutation().dolorous2008-05-011-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4796 c06c8d41-db1a-0410-9941-cceddc491573
* Add a random bad mutation type.dolorous2008-05-011-2/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4793 c06c8d41-db1a-0410-9941-cceddc491573
* Add various undead-related fixes.dolorous2008-04-281-4/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4754 c06c8d41-db1a-0410-9941-cceddc491573
* After some thought, revert previous change. If the mutation resistance dolorous2008-04-281-1/+1
| | | | | | | mutation is hard to remove, it should be hard to get, god gift or not. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4746 c06c8d41-db1a-0410-9941-cceddc491573