summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/map_knowledge.h
Commit message (Collapse)AuthorAgeFilesLines
* Chance function(void) to function()reaverb2014-05-241-1/+1
|
* Paper over a crash (#8587).Steve Melenchuk2014-05-231-1/+8
| | | | This gets the game to load, but the underlying issue is still at large.
* 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).
* Allow Qazlalites to displace their own clouds.Steve Melenchuk2014-05-071-3/+6
| | | | Should address some of the residual autoexplore issues.
* Gozag: gold lust.Steve Melenchuk2014-05-071-0/+1
| | | | | Fighting near the gold piles of recently-defeated enemies boosts your skills.
* Fix various issues with invisible monster indicators.gammafunk2014-03-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove moths of suppressionChris Campbell2013-11-111-1/+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.]
* Move set_terrain_changed() away from map_knowledge.ccAdam Borowski2013-11-031-1/+0
| | | | It hardly deals with remembered map.
* Shave some words off a few datatypes.Samuel Bronson2013-10-171-3/+2
| | | | (I wonder if this saves even one kilobyte?)
* Avoid an MSVC crash on dry fountains etc (xFleury)Neil Moore2013-10-171-1/+4
| | | | | | | | | | | | | | | | map_cell has a bit field "dungeon_feature_type _feat:8", which MSVC makes signed. However, some dungeon_feature_type enumerators are greater than 127 (beginning with DNGN_DRY_FOUNTAIN = 128). That results in some bounds errors when encountering one of those features. According to the C++ standard, 8 bits should be large enough to hold the enum (§7.2 [dcl.enum] paragraph 7), so the values in the bit field should compare equal to the corresponding enumerators (§9.6 [class.bit] paragraph 4). So it sounds like MSVC is in the wrong. Still, work around it by casting to uint8_t and then to the full enum type. At this point maybe we should just use a uint8_t instead of a bit field (since we have to cast anyway). However, that doesn't look as nice in gdb...
* Don't en-/de-capsulate coord_def over and over in set_terrain_*()Adam Borowski2013-10-081-18/+4
| | | | All callers, and all but one internal use, want it as a struct.
* Merge branch 'master' into lava_orcsAdam Borowski2013-05-291-5/+0
|\
| * Remove an #ifdef applying to old MSVC versionsPete Hurst2013-05-191-5/+0
| |
* | Give lava orcs a heat halo that causes fire damage to nearby enemies.Eronarn Palazzo2013-01-081-0/+1
|/
* Indentation fixes.Adam Borowski2012-12-051-1/+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/+1
| | | | | | | | | 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-1/+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.
* QUAD DAMAGE emits an Orb-style glow while in effect.Steve Melenchuk2012-08-151-0/+1
| | | | It's the same radius, only all blue instead of mutagenic.
* Make inline functions static.Adam Borowski2012-08-091-3/+3
| | | | | | | | | This avoids unnecessary non-inlined copies. Also, we had a few large functions that had no reason for inlining, let's have them be regular ones. I also made "static inline" always use the same order, for easier grepping.
* Some more return deparenthesization.Adam Borowski2012-07-051-2/+2
|
* Don't clear known items from the map with the Dowsing card effectChris Campbell2012-03-261-1/+1
|
* Moth of Suppression, preliminary codingBen Striegel2012-03-211-0/+1
|
* Let Ctrl+C clear clouds that are out of LOSChris Campbell2012-03-181-0/+9
|
* Make a bunch of functions static or non-existant.Adam Borowski2012-03-151-1/+0
|
* Declare an explicit type for colours.Adam Borowski2012-03-131-3/+3
| | | | | | | | | | An imperial buttload of places assumes these to be 8 bits, which makes it impossible to add support for 256 (or more!) colours. This commit tries to allow expanding it in the future; sadly, it is badly incomplete. At least, new code can use the new type. Also, beware of "branded" colours which use bits above 8 for inverse, underline, etc.
* Fix a memory leak.Adam Borowski2012-02-111-0/+2
|
* Merge branch 'tiles-monster-info'Florian Diebold2011-12-151-9/+43
|\
| * Fix console compilation.Florian Diebold2011-12-021-2/+2
| |
| * Add more cloud data to map_knowledge; make tilepick.cc use it instead of the ↵Florian Diebold2011-12-011-8/+42
| | | | | | | | | | | | | | | | | | | | | | | | 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.)
| * Use map_knowledge in tileidx_feature.Florian Diebold2011-11-231-1/+1
| |
* | An bunch of missspelings.Adam Borowski2011-12-011-1/+1
|/
* Webtiles: Move the minimap feature decision to the server side.Florian Diebold2011-11-171-0/+2
| | | | | There's just too much information necessary to do this right, which is not available to the client at the moment.
* Fix inverted logic in clear_map().Raphael Langella2011-11-171-1/+1
| | | | | Also change the default so that it doesn't clear detected items (unlikely to move), only detected monsters.
* s/antihalo/umbra/g in the code as well, to match the new user-visible name.Adam Borowski2011-09-071-1/+1
|
* Eronarn's profane servitors and antihaloesChris Campbell2011-09-031-0/+1
| | | | | | | | | | | | | | | | | | | | Profane servitor: An angel twisted into an undead monster by Yredelemnul. He gifts these as a new tier above bone dragons. They are in Yred's elemental colors, generated wielding a demon whip, probably slightly better than a bone dragon in melee, and have res holy instead of holy vuln like most undead. It also generates an umbra. Only Yred gifts spawn them currently though they'd be great for some vaults. umbra: An 'antihalo' composed of flickering darkness, which is the opposite of a halo. Creatures in an umbra are harder to hit with both ranged/melee, but get a stealth bonus. Currently only profane servitors generate an umbra. Demons, undead, and worshipers of Yredelemnul (at **+ for players, but all monsters) aren't harmed by an umbra but still get the stealth boost. The patch also changes the "Glow" status light to "Contam", and displays "Glow" when actually backlit (for whatever reason: halo, sticky flame, corona).
* First stab at Orb glow.Adam Borowski2011-08-251-0/+1
| | | | | No tiles yet, fixed radius and an ugly random colour scheme. Pushing so we can play with variants.
* enum size error in map knowledge for MSVCHurcan Solter2011-07-261-0/+5
| | | | | enum members of map_cell assumes the enum value fits in 8bits which is not the case for dungeon_feature_type in MSVC.
* Adjust some whitespace and formatting.Adam Borowski2011-07-081-3/+6
|
* Make cppcheck a bit happier.Adam Borowski2011-07-051-0/+2
|
* Put fields of struct map_cell together so the alignment is more readable.Adam Borowski2011-06-211-2/+2
|
* Remember the trap type in map_knowledge.Adam Borowski2011-05-171-5/+14
| | | | This fixes information leaks when a trap runs out of ammo out of LOS.
* Make detected monsters work in tiles.Adam Borowski2011-01-181-1/+2
| | | | This might be totally wrong, though.
* Use a full monsterinfo structure for detected ones rather than a flag.Adam Borowski2011-01-181-28/+18
|
* New spell: Leda's Liquefaction.Jude Brown2010-12-281-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | This one's gone through a couple of iterations during discussions. Finally, though, we have this: an area of effect slowing. It's a circle around you that slows you and anyone not insubstantial and not flying who crosses into that circle. The slowing effect is implemented as though it were ponderousness (well, slightly more than ponderousness), rather than as ENCH_SLOW. For monsters, when cast by the player, it counts as a slightly less speed malus than standard ENCH_SLOW. Reasoning: the monster casting it has more stability for being at the centre of the effect. Currently, I've stolen the colouring from KiloByte's _etc_tornado. It's implemented using areas, which I've written some additional code for that finds the "centre" of an area from a coordinate within that area. Greensnark had a quick look over it for me earlier, but I'd appreciate further checks for quickness, saneness, etc. It appears in the Book of the Earth. Finally: no tile (yet). I attempted to do one up, spent an hour or so tweaking it, and then compared it to our current spell tiles and decided that I can't make spell tiles. :-)
* Remove special casing for detected items.Adam Borowski2010-10-201-7/+1
|
* Fake an item to fix tiles crash on Xom's/Ashenzari's item detection.Adam Borowski2010-10-201-0/+2
| | | | | | A simpler way would be to show the unseen tile when item_info is 0, but that would prevent us from having different classes of detected items in the future.
* Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-5/+5
| | | | | | I did review it manually to find places where they made sense (like some tables), but for a massive sed job like this there might be places that I missed.
* Fix missing initialization of map_cell::_cloud_colour.Robert Vollmert2010-09-061-1/+1
|
* Fix new map_knowledge not handling cloud colours properly.Robert Vollmert2010-09-021-1/+8
|