summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dbg-scan.cc
Commit message (Collapse)AuthorAgeFilesLines
* allow iterating over branches in a non-enum order (8742)Jesse Luehrs2014-08-021-4/+4
| | | | | | | | | | | | This allows us to have a consistent and logical ordering of branches without requiring the branch enum itself to be reordered (which could have save compatibility implications). The new ordering of branches just moves Depths to the place in the ordering that it already is planned to go on the next major save compat bump, but other changes are possible, if desired. All places in the code that iterate over branches have been updated to use the new iterator except for code dealing with save files, which still uses enum order, so that we can change the display ordering without affecting saves.
* Remove stuffNicholas Feinberg2014-07-291-1/+2
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Add end.ccNicholas Feinberg2014-07-281-0/+1
|
* Don't use scientific notation for objstat brand reportinggammafunk2014-07-151-0/+1
|
* Clean up the failure handling of mapstat and objstatgammafunk2014-07-151-4/+3
|
* Add min, max, and standard deviation to objstat number fieldsgammafunk2014-07-151-113/+271
| | | | | For the basic counting field of each item and monster type, find the minimum, maximum, and sample standard deviation over the iterations.
* Remove an unneeded objstat fieldgammafunk2014-07-151-5/+2
| | | | | Since contaminated chunks are gone, chunk nutrition is the same for everyone.
* Separate 'permanent' and 'temporary' monster hit diceNicholas Feinberg2014-07-131-1/+1
| | | | As part of a wider scheme to make draining temporary.
* Indicate the summarized levels in objstat outputgammafunk2014-07-131-4/+11
| | | | Also clean up some newlines in the output.
* Add an objstat item field for the number held by a monster.gammafunk2014-07-121-14/+35
| | | | For the relevant item types, how many were held by a monster.
* Split butchering/bottling into a new fileNicholas Feinberg2014-07-011-1/+1
|
* Decontaminate all chunks.Shmuale Mark2014-06-271-8/+0
| | | | | | | | | | | | "This chunk gives you less nutrition" is not a very interesting effects, and most of the time the only real effect is that you have to press 'e' a few more times. If chunks on the whole are too common (which in the current food environment is very hard to define) monsters in general can give fewer chunks, or chunks can be less nutritious; no reason to make some monsters special. A good deal of code is still around because of the other less-nutrition case, non-ghoul saprovores eating rotten chunks.
* Simplify and improve some initialization macros.Neil Moore2014-06-271-45/+40
| | | | | | | | | | | | | | | Make SET_FIELDS safer by using a do { } while(0) block, which also gives us a scope, so we don't have to take the name of the intermediate array variable as a parameter. Rename it to INIT_VEC (it only works on vectors of strings, but whatever). While we're at it, also make sure we evaluate the argument only once. Also, use an array of const char *s instead of strings, make that array static and const, and use the ARRAYSZ macro. Then, replace most of the uses of INIT_VEC née SET_FIELDS with a wrapper macro ITEM_FILEDS that shortens things a bit. Finally, move the macro definiton outside the function, and reformat.
* Clean up objstat value formattinggammafunk2014-06-261-1/+2
| | | | | Use a fixed decimal point istead of scientific notation, and reduce precision to 2.
* Clean up function and variable names for objstatgammafunk2014-06-251-426/+424
| | | | | | | | | We now consistently use objstat_ as a prefix for non-static functions and don't use prefixes for static functions and variables. Various enums, classes, and defines have also been renamed to more clearly reflect their function. I also added command-line help documentation for mapstat and objstat
* Fix objstats for rods, misc. items, corpseless monsters, and mimicsgammafunk2014-06-251-31/+39
| | | | | | | Display the correct properties for the first two, and report 0 chunks/nutrition for monsters that don't leave a corpse. Mimics are now revealed after the level is generated so that the mimic monster is created, and we don't count the mimic items towards item statistics.
* Write object statistics in one file per branchgammafunk2014-06-251-466/+429
| | | | | | All output in a single file was difficult to view and work with. Each file uses a common prefix of "objstat_", and the file names are printed to stdout.
* objstat: Item and monster generation statisticsgammafunk2014-06-251-1/+1109
| | | | | | | | The -objstat command-line option will generate iterations of the given levels, compiling stats on every item and monster generated, and average the results over the iterations. It's only available in debug builds and uses the same map specification format as -mapstat. The default number of iterations is 100.
* Chance function(void) to function()reaverb2014-05-241-1/+1
|
* Let Orb run spawns generate in all non-abyss locationsgammafunk2014-03-271-4/+8
| | | | | | | | | | | | | | Players have been picking up the Orb and entering a Zig only to discover that Orb spawns don't generate, thus depriving them of HUGE GUTS to RIP AND TEAR. Their complaints have been overwhelming, so now Orb run spawns generate in Pan and all portals. We don't generate the spawns in the Abyss, since the player can be banished there on the ascension, whereas entering other places with the Orb is voluntary. This commit also fixes the monster spawn rate when starting in the abyss with Lucy, which was being set to the orb run spawn rate instead of once per five turns as intended, and cleans up and documents some functions.
* Don't crash on debug scan when an exit feature is covered.Neil Moore2014-01-311-2/+6
| | | | | See !lm EightySix fofi crash -log for an example. Now we also check the terrain change markers for the desired feature.
* Purge away HT_ROCK and HT_INCORPOREAL.Adam Borowski2014-01-021-2/+1
|
* Revert "Don't check monster validity when loading a level."Adam Borowski2013-12-311-3/+2
| | | | | | | A good part of bogosity comes from invalid monsters, so we do want to assert on them. This reverts commit b80bb099385e7d0e70b058492140caa7afc4abbc.
* Don't check monster validity when loading a level.Neil Moore2013-12-301-2/+3
| | | | | During a level excursion, the player's position isn't correct, so they might appear to be standing on top of a monster.
* Don't check for missing portals while ascending (#7941)Neil Moore2013-12-301-1/+1
|
* Replace `mpr(s, ch)` with `mprf(ch, s)`Adam Borowski2013-11-291-10/+9
| | | | | | | | | Also simplify quite a few cases. It turns out in >90% cases of non-literals the argument had .c_str(), which meant it was pointlessly malloc()ed and converted from and to std::string. I believe a sprintf is faster, so even the argument of miniscule speed-up doesn't apply.
* Revert "Replace `mprf(ch, s)` with `mpr(s, ch)`"Adam Borowski2013-11-291-1/+1
| | | | | | | | It trades readability and consistency for an utterly negligible bit of speed. With the amount of further processing mpr() does, a single sprintf is nothing. This reverts commit d9dfa8fc9755fb0a4e8954c7eb94f32fe97b82e0.
* Replace `mprf(ch, s)` with `mpr(s, ch)`Chris Oelmueller2013-11-281-1/+1
| | | | Scripted, then manually reviewed.
* Make a few mid cache asserts more informative.Adam Borowski2013-11-211-3/+10
|
* Drop unnecessary parentheses from return statements.Adam Borowski2013-11-151-2/+2
|
* Transform the lower half of D into a new branch: the Depths.Steve Melenchuk2013-11-121-4/+4
| | | | | | | | | | | | D is now 16 levels (the unsealed part was 14 levels previously), and the Depths are six levels. Vaults is enterable from Depths:2-5; Abyss, Hell, and Pan portals are available for the entire length of the branch. Right now the monster set is identical to Vaults except for the absence of Vaults-specific humans. D's monster set has also been truncated, mainly on the out-of-depth front. It's my intent that this serve as a starting point for figuring out what monsters we want to split between the two branches.
* Shorten branch enums.Adam Borowski2013-11-031-1/+1
| | | | | Seriously, even preparing this commit gave me a pain in the triangle between the thumb and index finger's bases and the wrist.
* Point out the location of monsters in wall if DEBUG_FATAL is set.Adam Borowski2013-10-281-0/+4
| | | | Although the "highlight" consisting of a mere '?' is hard to find.
* Put the Generating_Level global into crawl_state.Adam Borowski2013-10-031-2/+2
| | | | Also, drop the caps.
* List the vault[s] that placed a monster in a wall.Adam Borowski2013-10-031-2/+28
|
* Look for monsters in wall during dbg_scan.Adam Borowski2013-10-021-0/+9
| | | | | This doesn't check habitability, because being in deep water is somewhat more complex.
* Fix a reversed debug message.Adam Borowski2013-09-151-2/+2
| | | | It still fails just the same...
* Check for constriction out of sync for monsters too.Adam Borowski2013-09-101-4/+16
|
* Make dbg-scan look for a constriction problem.Adam Borowski2013-09-091-0/+7
| | | | Too bad, the save I got has it already corrupted.
* Use MSGCH_ERROR for a scan failure.Adam Borowski2013-09-071-1/+1
| | | | Should probably assert-out immediately, it often leads to crashes.
* Look for bogus monster types in dbg-scan.ccAdam Borowski2013-09-031-0/+6
|
* Check for monsters invading a player's personal space.Adam Borowski2013-09-011-0/+9
|
* Fix a crash if the player constricts anyone.Adam Borowski2013-08-291-1/+1
| | | | Oops. I still need to find out what causes disappearing constrictors, though.
* Let dbg_scan look for missing constrictors.Adam Borowski2013-08-281-0/+6
|
* Don't crash when the branch exit has a kmaskNeil Moore2013-06-211-1/+1
|
* Assert that $BRANCH:1 always has an exit.Adam Borowski2013-06-211-1/+31
|
* Brace fixes.Adam Borowski2013-06-081-2/+0
|
* Turn pairs of assertions with x > min, x <= max into ASSERT_RANGE.Adam Borowski2013-06-081-2/+1
| | | | | The perl regexp to do so is: s&ASSERT\(([^\n]+) >= ([^\n]+)\);\s*ASSERT\(\1 < ([^\n]+)\);&ASSERT_RANGE($1, $2, $3);&sg;
* Don't test missile enchantment values.Adam Borowski2013-05-091-5/+0
|
* Use 30 for sanity caps of all item enchantment types.Adam Borowski2013-05-091-2/+2
| | | | It was 30 for weapons, 25 for armour, which caused spam with Lear's.