summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/show.cc
Commit message (Collapse)AuthorAgeFilesLines
* Make Doxygen @returns "@return" for consistancy.reaverb2014-06-051-1/+1
|
* Melt away lava orcs.Steve Melenchuk2014-05-141-0/+2
| | | | | | | | | | | | | | | | When you strip away the fundamentally broken tension mechanic, you're left with a species that is essentially "Hill Orcs WITH FIRE". No effort has come forward with code to fix either aspect of them despite the length of time they've been around in trunk, and the code is littered with a very large number of special cases in their presence. Current lava orcs should be able to finish their games fine, but new starts are disallowed. There are a couple of bits I've left present but which will have no function for the moment, mostly related to interactions with lava (as there are a couple of species proposals floating around that benefit from having those interactions).
* Formatting fixes (add braces).Neil Moore2014-05-121-0/+2
| | | | This fixes all the instances caught by unbrace.
* Fix "if(" and friends.Neil Moore2014-05-121-1/+1
|
* Allow Qazlalites to displace their own clouds.Steve Melenchuk2014-05-071-1/+2
| | | | Should address some of the residual autoexplore issues.
* Gozag: Gold sense.Steve Melenchuk2014-05-071-3/+7
| | | | You passively detect gold on entering a level.
* Gozag: gold lust.Steve Melenchuk2014-05-071-0/+3
| | | | | Fighting near the gold piles of recently-defeated enemies boosts your skills.
* Remove the clean_map option.Shmuale Mark2014-04-171-4/+3
| | | | | | | It didn't have a very clear use case and if you really want to reproduce it, you can press ^C every so often. Also clean up the options documentation a bit.
* Formatting fixes.Neil Moore2014-03-191-2/+0
|
* Make invisible monster indicators from stealth checks always accurate.gammafunk2014-03-141-45/+25
| | | | | | | | We were intentionally placing indicators adjacent to the invisible monster occasionally if the monster failed a secondary check. These were confusing, especially if the monster was adjacent or close to the player, who often knew exactly where the monster actually was. We now only ever place accurate indicators. Resolves #8270 (tedric).
* Use the correct radius when sensing invisible monsters in LOS (MarvinPA).gammafunk2014-03-131-1/+2
| | | | | | | | Before we were letting the player detect all invisible enemies in LOS if they had antennae, regardless of mutation level, and were not checking either Ashenzari's detection radius nor that from the boots of the assassin at all. This commit also cleans up and documents a few related functions.
* Fix the monster list is WebTiles and unbreak Arena.gammafunk2014-03-061-24/+30
| | | | | | | | | | | | | The invis fix in 4a7354f5 causes problems with how WebTiles displays the monster list for reasons that aren't clear. It would display empty tiles where monsters had died in the monster list and have an incorrect monster count. This commit fixes the problem by restoring the tiles cell draw order so it happens after the map knowledge is determined for each cell instead of in a final loop after map knowledge updates are finished. This commit also fixes Arena, which was broken in the same commit so that it didn't draw non-terrain cells at all.
* Fix various issues with invisible monster indicators.gammafunk2014-03-061-71/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if a monster enters LOS and goes invisible on the same turn, it can disappear from the screen before the player has a proper indication of where it was. This commit makes the following changes: 1. Fixes invisible monster indicators so that they can reliably be set in the monster map knowledge update code at locations that of the current monster being processed in this loop. The previous code tried to set this indicator, but due to how the old loop cleared all flags other than MAP_SEEN_FLAG and did tiles cell draws in the same pass as map knowledge updates, these wouldn't work. This commit adds a MAP_INVISIBLE_UPDATE flag to help retain MAP_INVISIBLE_MONSTER when necessary, as well as a second loop in show_init that loops over a vector of the updated cells found in the radius_iterator loop. This second loop should be fast enough that it doesn't significantly affect performance. 2. Add 'bool went_unseen_this_turn' and 'coord_def unseen_pos' to the monster class (with the necessary save compat code) to allow monsters that go invisible in LOS to always get an invisible indicator. The code prefers to use indicators arising from the monster failing stealth checks if those occur; they are based on the monster's true position and hence are usually more accurate. 3. Somewhat simplify the stealth check code for invis indicators, and only ever allow one invis indicator per monster. The stealth check logic perhaps could be simplified further (there are multiple checks), but I've preserved the existing checks for now. Also turned a coinflip() in one of the secondary checks into a seeded/hashed coinflip so it won't change over screen updates. This commit lets players with antennae always see the location of an invisible monster through an invis indicator, and sets the invis indicator on the monster's last position whenever a monster becomes unseen (e.g. going invis or already being invis but the player removes sinv). If the monster fails a stealth check, that potentially more accurate information is favored over the unseen position.
* More formatting fixes for return (...);Neil Moore2013-11-151-1/+1
|
* Drop unnecessary parentheses from return statements.Adam Borowski2013-11-151-4/+4
|
* Remove moths of suppressionChris Campbell2013-11-111-3/+0
| | | | | | | | | | | Suppression is a hugely complicated and inconsistent mechanic. Its original purpose was to be a way of overriding rPois in Spider but there are now plenty of monsters that do this effectively (and much more simply). [1KB: I moved this to trunk, as it made an already extremely hard to review branch massively more so. There's nothing but a single enum to preserve, so compat break doesn't make this removal any easier or harder.]
* Re-implement xray vision.Adam Borowski2013-11-051-1/+1
|
* Update the whole arena.Adam Borowski2013-11-051-0/+8
| | | | It was the only user of non-standard get_los().
* Get rid of all external uses of get_los().Adam Borowski2013-11-051-1/+1
| | | | | This also fixes a bunch of "act through glass" or "doesn't obey nightstalker/ lantern of shadows" bugs.
* Axe a buttload of useless #includes.Adam Borowski2013-11-031-1/+0
| | | | | Can't test Android, MSVC or Mac, but a very brief glance at the diff suggests it's unlikely they're affected.
* Get rid of grid_appearance().Adam Borowski2013-10-111-1/+3
|
* Short-circuit another sighting of slimy walls.Adam Borowski2013-10-111-1/+1
|
* Fix some typosChris Oelmueller2013-08-081-1/+1
|
* More padding fixes for ternary operatorChris Oelmueller2013-08-031-1/+1
|
* Give runes their own default glyph (φ for now)Samuel Bronson2013-07-011-1/+5
|
* Merge branch 'master' into lava_orcsAdam Borowski2013-05-291-3/+5
|\
| * Make invisible allies fully visible to the player (elliott)Chris Campbell2013-05-041-2/+1
| | | | | | | | | | | | Since in practice you already know for sure exactly where they are and exactly what they are, just making them fully visible fixes a lot of interface annoyances.
| * Add a comment where we flub antennae detecting invisible monstersSamuel Bronson2013-04-281-1/+1
| |
| * Fungus FormBrendan Hickey2013-03-151-0/+3
| | | | | | | | | | | | A bad_form that turns you into a wandering mushroom. Player gains confusing touch, a large stealth bonus, and the inability to move when under hostile observation.
* | Give lava orcs a heat halo that causes fire damage to nearby enemies.Eronarn Palazzo2013-01-081-0/+3
|/
* Indentation fixes.Adam Borowski2012-12-051-8/+8
|
* Add formatting fixes.David Lawrence Ramsey2012-11-171-2/+1
|
* Shorten MAP_DISJUNCTION_HALOED to MAP_DISJUNCT.Adam Borowski2012-11-181-1/+1
| | | | | DISJOINT would be more correct, but I picked DISJUNCT as it's more readable, easier to connect with the spell.
* DisjunctionBrendan Hickey2012-11-181-0/+4
| | | | | | | | | Level 8 translocation spell. Blinks away everything with diminishing probability with: P(~blink) = 0.8^(1/(dist+1)/(dist-1)) Over 10 ticks, a monster adjacent to the caster will blink with probability 0.9. Monsters may be blinked repeatedly.
* Remove unnecessary includes from header files.Jay3.14152012-10-231-0/+1
| | | | | | | | | | 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.
* Fix monsters not being removed from the monster list (#6129).Florian Diebold2012-09-121-0/+3
| | | | | Because the cell didn't get marked dirty when the monster was killed, the change was never sent to the client.
* Rename hash(), it conflicts with std::hash in C++11.Adam Borowski2012-08-271-1/+1
|
* Use std namespace.Raphael Langella2012-08-261-2/+2
| | | | | | | | | | | | | 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.
* QUAD DAMAGE emits an Orb-style glow while in effect.Steve Melenchuk2012-08-151-0/+3
| | | | It's the same radius, only all blue instead of mutagenic.
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-22/+22
|
* Use mid rather than mindex for constriction.Neil Moore2012-07-041-1/+1
| | | | | | | | | | | | actor::constricting is now a pointer to a map from mids to durations; if the actor is not constricting anything, we use a NULL pointer rather than an empty map to save memory. Save compatibility: Because constrictees might be loaded after constrictors (and vice versa), we cannot convert the old constriction arrays (which use mindex) until all the monsters have been loaded. Instead, save the constriction data temporarily, and create the maps at the end of tag_read_level_monsters().
* Make staves and rods separate object classes.Adam Borowski2012-06-121-0/+1
| | | | | | | | | | | | They have about no overlap, more than both being usable as weapons. A vast majority of uses immediately checked item_is_rod()/item_is_staff(). I kept them shared for acquirement, for now. Also, eliminate rods of smiting -- hardly ever used, problematic theme-wise as they use "divine providence" without worship. Keeping rods of striking for now, could be used to fix artificer problems. Adding/removing rod enums is a mess due to tile handling, renaming ROD_SMITING to ROD_LIGHTNING for now.
* 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.
* Show the location of invisible monsters you're constrictingChris Campbell2012-04-051-4/+6
| | | | (In case you started constricting them before they went invisible).
* Moth of Suppression, preliminary codingBen Striegel2012-03-211-0/+3
|
* Fix #5111: Items under a plant aren't indicated [in tiles].Florian Diebold2012-01-101-32/+15
| | | | | | | | | | | | The problem was that tile picking happened concurrently to the show update, i.e. while the map cell was being built. This meant that when placing the plant tile, the item wasn't yet in map_knowledge, so no indicator was added. I've refactored the code so that all tile picking happens at the end of show_update_at. I fear this may lead to new bugs, but the alternative (going back to directly accessing igrd) would have been hacky and would likely have caused new (if small) information leaks.
* Fix console compilation.Florian Diebold2011-12-151-1/+1
| | | | I should check if I've added all changes before pushing...
* Add the cloud override tile to cloud_info in console games, too.Florian Diebold2011-12-151-2/+0
|
* Fix console compilation.Florian Diebold2011-12-021-1/+1
|
* Add more cloud data to map_knowledge; make tilepick.cc use it instead of the ↵Florian Diebold2011-12-011-4/+32
| | | | | | | | | | | | actual cloud_struct. This adds the cloud tile and the value of cloud.decay/20, clipped to the range 0-3, to the map_knowledge, and organizes all cloud-related data into a new cloud_info struct. Both of these are required for the tile picking code. (Doesn't introduce a new minor tag, so saves from the previous commit will crash.)