summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/arena.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove stuffNicholas Feinberg2014-07-291-0/+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-1/+1
|
* Remove the show_gold_turns option.Shmuale Mark2014-07-021-2/+0
| | | | | | There's really no reason not to show the line; in other options, having the default always be the case can be annoying, but if you don't want to look at the gold/turns display, you can just not.
* Rename 'mesclr()' to 'clear_messages()'reaverb2014-06-221-3/+3
|
* The great mon-stuff migration.Shmuale Mark2014-06-221-1/+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.
* Move mon death stuff from mon-stuff.cc to mon-death.cc.Shmuale Mark2014-04-121-0/+1
| | | | | | | Touches a lot of files since their #includes have to be edited. (Pushing now since it shouldn't break anything and keeping it updated is nasty.)
* Make arena_delay available outside of arena as view_delay.Steve Melenchuk2014-02-271-4/+4
| | | | | | | | | | So, if you're running a bot or you're generally annoyed by ranged/magical animations, you can set this to an appropriately low value. This also condenses a lot of code duplication related to arena_delay; a new function called scaled_delay is used for functions that should be impacted by this.
* Automated brace removal.Adam Borowski2013-11-291-4/+0
|
* Replace `mpr(s, ch)` with `mprf(ch, s)`Adam Borowski2013-11-291-14/+11
| | | | | | | | | 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.
* Refactor ASSERT(a && b) againBrendan Hickey2013-11-151-1/+2
| | | | | | This commit converts ASSERT(a && b) to ASSERT(a); ASSERT(b); Assertions of the form !(a && b) are left intact, since there isn't an obvious readability gain over (!a || !b).
* More formatting fixes for return (...);Neil Moore2013-11-151-3/+3
|
* 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-2/+2
| | | | | | | | | | | | 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-2/+2
| | | | | Seriously, even preparing this commit gave me a pain in the triangle between the thumb and index finger's bases and the wrist.
* Rewrite monster_iterator.Adam Borowski2013-10-311-1/+1
| | | | | It degenerated to a simple loop over menv, hardly worth any syntactic sugar. I kept it for now, though.
* Drop an untrue comment.Adam Borowski2013-10-271-3/+0
| | | | | | | | | When the last monster is being dismissed, almost surely its side has been marked as a victor. We can mark it as a tie, but it's a debatable situation so it doesn't really matter. One typical scenario is when miscasts are on, and the last monster gets banished.
* Don't consider a hard_reset dismissal on the arena to be an error.Adam Borowski2013-10-271-1/+4
|
* Rebase hunger values at 0 (from 100).Adam Borowski2013-10-271-1/+2
| | | | | | | | Also, get rid of a number (but not all) literal values, replacing them with defines. No compensation is given for proportional costs (Zin's wrath, hungry ghost melee).
* Fix an arena bookkeeping crash when a slime creature/mass splits.Adam Borowski2013-10-251-1/+4
| | | | This requires working around a hack in mgen_data.
* Put the Generating_Level global into crawl_state.Adam Borowski2013-10-031-1/+1
| | | | Also, drop the caps.
* A new throwing missile, tentantively named "tomahawk".Adam Borowski2013-09-221-0/+1
| | | | | | | | | | The name is somewhat problematic, as real tomahawks were fit for melee (just like hand axes...). It's mostly because a few bailey_axe vaults want something that resembles an axe, but I'd rather axe or redesign those vaults than have them block better alternatives. The balance purpose is to have something between darts (damage 2) and javelins (damage 10), for use by orcs, orc warriors and merfolk.
* Cancel an american speling.Adam Borowski2013-08-241-5/+5
| | | | | | Looks like, unlike "target[t]ing" where a single t is used by many brits and even some aussies, "cancel[l]ing" has double l even for a good deal of americans.
* Fix lots of typosChris Oelmueller2013-07-231-1/+1
|
* Fix arena across restart_after_game (#2962)Neil Moore2013-06-171-0/+10
| | | | | The score and number of rounds, the "was cancelled" state, the unique list, and various arena options were not being reset.
* New mcros ASSERT_IN_BOUNDS{,_OR_ORIGIN}().Neil Moore2013-06-091-1/+1
| | | | | These print the out-of-bounds coordinate as part of the assertion message.
* Clean up tentacle/tentacle segment handling somewhat.David Lawrence Ramsey2013-05-271-5/+5
| | | | | | | | | | | mons_is_tentacle() now returns true only for actual tentacles, which makes mons_is_tentacle_end() redundant. mons_is_tentacle_or_tentacle_segment() does what mons_is_tentacle() used to do, and is used properly on both sides of Mislead. Handling of child tentacles (everything other than eldritch ones) is now handled more generically, in case more types of them are added.
* Get rid of a misplaced prototype, adjust includes.Adam Borowski2013-04-101-1/+1
|
* Use FixedBitArray instead of large arrays of bools.Adam Borowski2013-04-091-2/+2
| | | | | The only cost is having assignments be a function, as you can't overload operator[] to have separate bits be lvalues.
* An ugly hack: exempt tentacles from arena faction calculations.Adam Borowski2013-04-071-8/+10
| | | | | | | This commit causes problems with freestanding tentacles: if they're the only members of a side, the fight ends -- but that's certainly better than a crash. Such tentacles don't exist except for manual requests, being normally ever spawned by the spell.
* Purge unused code for the arena.Adam Borowski2013-04-051-34/+0
| | | | (Committing separately, in case something was supposed to serve some purpose.)
* Make non-public arena stuff static.Adam Borowski2013-04-051-67/+67
|
* Merge branch 'mon-pick'Adam Borowski2013-03-211-15/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The behaviour should be preserved exactly or almost exactly, only the code changes from totally, utterly unreadable to merely hard to read. Actual differences: * strong OODs in shallow branches would degenerate into picking a monster randomly from the whole branch, now they pick from the bottom level (or so-called OOD cap of Elf:7, Tomb:5, D:31 and Vaults:15). * Zot no longer replaces requests for Zot:5 by Zot:4, and proper hells, $(HELL):4-7 by $(HELL):3. * this means hell monster sets need fixing! * zombie size doesn't affect their spawning * zombie selection obeys the depth passed * which makes zombie sets pretty limited -- needs review/redesign? The new format is: { 9, 19, 826, SEMI, MONS_YAK }, which means: yaks can spawn on D:9-19, with _linear_ rarity 826 in the middle of the range. A "SEMI" distribution means that at the edges, D:9 and D:19, the effective rarity is half that, 413. Distributions: FLAT 100% 100% 100% SEMI 50% 100% 50% PEAK 0% 100% 0% UP 0% 50% 100% DOWN 100% 50% 0% That "0%" doesn't mean the monster won't spawn on the top/bottom level (D:9 and D:19 for yaks), the range is fudged so D:8 receives 0% chance, D:9 16.6%, linearly up to 100% on D:14. Yes, this sounds and is complex, but at least the complexity is not strewn around obscure code anymore, and a number of limitations have been lifted. ZotDef still uses the old code via an emulation layer.
| * Rewrite zombifiable monster requests.Adam Borowski2013-03-181-1/+0
| | | | | | | | | | Probably would be good to handle skeletons/simulacra/spectrals here as well, instead of relying on zombies.
| * Merge branch 'master' into mon-pickAdam Borowski2013-01-091-1/+1
| |\
| * \ Merge branch 'master' into mon-pickAdam Borowski2012-11-041-47/+46
| |\ \ | | | | | | | | | | | | | | | | Merge commits instead of rerere suck, but not being able to comfortably use the test rig sucks even more.
| * | | Get rid of a crapload of uselessly passed level_number.Adam Borowski2012-11-041-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, get rid of one of three copies of '8'/'9' logic. Also, fix the depth of place: not being heeded for some purposes. Technically, there is one actual change: shallow items in Ziggurats had a fixed level of 27, they now use 27 + depth in Zig. Not noticeable as most nearby items use level 351 anyway.
| * | | Don't go through inappropriate monsters during arena selection.Adam Borowski2012-08-271-9/+5
| | | |
| * | | Don't pretend mons_{rarity,level}() use anything but place.branch.Adam Borowski2012-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | We'd want them to, but that code is getting overhauled anyway, so let's not cloud things.
* | | | Simplify handling of version info.Adam Borowski2013-03-141-1/+1
| |_|/ |/| | | | | | | | | | | They're static strings, there's no point in having functions just to malloc and pass them around.
* | | Fix prompts asking for 'I' in Turkish locales.Adam Borowski2012-11-221-1/+1
| |/ |/| | | | | | | | | | | They have I<->ı and İ<->i. Fortunately, people are quite unlikely to type capital letters in response to prompts, perhaps save for the stat gain one.
* | Remove unnecessary includes from header files.Jay3.14152012-10-231-0/+2
| | | | | | | | | | | | | | | | | | | | For most header files, this only saves on having to recompile a small number of source files, but there are also a few headers where small changes would now take significantly less time. This is most obvious for the Tiles build for which the dependencies have been greatly reduced, so that the only additional includes when compared to console are strictly library or tile related.
* | Use std namespace.Raphael Langella2012-08-261-47/+44
|/ | | | | | | | | | | | | 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.
* Massive style fix (braces, indentation, etc.)Neil Moore2012-08-011-0/+12
|
* Some more return deparenthesization.Adam Borowski2012-07-051-1/+1
|
* String scalars are scalars, too.Adam Borowski2012-07-051-1/+1
|
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-13/+13
|
* Change 'clobber' to 'check_collision' in _build_secondary_vault and things ↵Vsevolod Kozlov2012-05-241-1/+1
| | | | | | that call it. To make it consistent with the functions called by it.
* Remove a good deal of header inclusion.Adam Borowski2012-05-231-2/+0
| | | | | | | | | These accumulate but never get removed; no wonder compilation times keep rising. The includes.sh script has lots of false negatives (and positives...), and can't check .h files which cause the biggest slowdown, it'd be nice to run multidelta on those somehow.
* Merge branch 'master' into portal_branchesAdam Borowski2012-04-251-1/+1
|\
| * Mindexicide: behaviour_event().Adam Borowski2012-04-211-1/+1
| | | | | | | | | | This also reveals how bad the beam blaming code is, need to rewrite that soon -- mostly because of problems with reflection.