summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
Commit message (Collapse)AuthorAgeFilesLines
* "Maras are frozen" -> "The Maras are frozen" (5054)Jesse Luehrs2014-08-141-2/+3
|
* Remove stuffNicholas Feinberg2014-07-291-1/+1
| | | | | | | .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!
* Remove an unused function (misc.cc)reaverb2014-07-281-17/+0
|
* Move move_stairs() from misc.cc to melee_attack.ccNicholas Feinberg2014-07-271-22/+0
| | | | The only place it was used.
* Create prompt.ccNicholas Feinberg2014-07-271-0/+1
|
* Staticify is_dragonkind() (wheals)Nicholas Feinberg2014-07-221-32/+0
|
* Move a little more code out of misc.ccNicholas Feinberg2014-07-021-134/+0
|
* Let BLOOD finally have its place in the sunNicholas Feinberg2014-07-011-249/+0
| | | | | | ...by moving bloodspatter functions into their own file. Death to misc.cc! Long live the new file hierarchy!
* Split butchering/bottling into a new fileNicholas Feinberg2014-07-011-268/+0
|
* Move blood rotting into a new fileNicholas Feinberg2014-07-011-554/+1
|
* Remove an unused argument from the items() functiongammafunk2014-06-291-1/+1
|
* Decontaminate all chunks.Shmuale Mark2014-06-271-5/+1
| | | | | | | | | | | | "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.
* Don't allow infinite kraken simulacra.Shmuale Mark2014-06-251-2/+8
| | | | Or of any other monster with M_NO_SKELETON.
* The great mon-stuff migration.Shmuale Mark2014-06-221-1/+0
| | | | | | | | | 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.
* Take the 'trap' out of web traps!Nicholas Feinberg2014-06-181-1/+1
|
* Allow temporary branding to go over a permanent brand.Shmuale Mark2014-06-121-2/+0
| | | | | | | Toting around an unbranded weapon just to be able to swap to it is no fun, and not even that much more of a difficulty; maybe it just means getting pain out takes 0.7 more turns or so. You still can't overwrite artefacts, of course.
* Remove vestiges of Simulacrum-chunk interactions.Neil Moore2014-06-091-2/+1
| | | | | Wieldability, usefulness of butchery and chunks, tile wield tip, and monster food pickup.
* Move go_berserk() out of misc.ccNicholas Feinberg2014-06-041-109/+0
|
* Don't make Chei slow you if you don't worship himNicholas Feinberg2014-06-041-16/+32
| | | | | | | ...when berserking. Should also prevent the wonderful message "No God forces you to slow down."
* Correct some doxygen blocks.Neil Moore2014-05-291-2/+2
| | | | | Some of them were missing the /** (or /*!) that makes doxygen consider the comment in the first place.
* Don't carry over sealed featured into the Abyss (#8601)Neil Moore2014-05-281-8/+1
|
* Remove player burden and carrying capacitygammafunk2014-05-261-22/+15
| | | | | | | | | | | Item inventory weights (based on item mass) generally don't lead to meaningful decisions that justify the inventory juggling and interface problems that come from having burden states. The 52-slot limit is a better system for limiting inventory and providing inventory-related decisions because it's not so fine-grained and doesn't require the player to examine weights for each slot. Work is ongoing to improve the slot system by consolidating food types and handling strategic consumables in a different way.
* SimplifyChris Campbell2014-05-221-6/+2
|
* Remove Blurry Vision's effect on trap detectionreaverb2014-05-221-2/+1
| | | | | | A) It doesn't really promote interesting decisions B) If desirable, it could be moved to a new mutation
* Remove some hard-coded 1e38s (floatingatoll, Grunt).Neil Moore2014-05-141-2/+3
| | | | And replace them with DBL_MAX, which could theoretically be as low as 1e37.
* 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).
* Remove various references to use-IDing jewellery that now identifies on equipChris Campbell2014-05-121-15/+1
| | | | There's probably a bunch more obsolete code for this still lying around.
* Replace Q cloud displacement with cloud immunity (Bloax, elliptic).Steve Melenchuk2014-05-071-1/+4
| | | | | | | Because getting trampled into your own clouds is terrible. Also disables this when under penance, which was an oversight for the former.
* Gozag wrath: the Curse of Gozag.Steve Melenchuk2014-05-071-7/+7
| | | | | | Trying to pick up a consumable while under Gozag penance occasionally turns the consumable to a small amount of gold - more likely with higher value items.
* Gozag: Call Merchant.Steve Melenchuk2014-05-071-0/+5
| | | | | | | | | Pay half the value of items in one of three randomly generated shops to generate that shop on a level that can generate shops that you haven't visited yet. This shop appears on the Overview screen with a darkened level name so you know exactly where it appeared, and is announced (and its location marked) when you arrive on the level so long as you are still following Gozag at the time.
* Remove phoenixesreaverb2014-05-061-1/+0
| | | | | They were so annoying they were removed from holy zigs, reducing their appearnces to just a few vaults.
* Auto-id jewellery on equip.Shmuale Mark2014-04-271-85/+0
| | | | | | | | | | | | In the case of rings/amulets that identified themselves when they had an effect, the player would want to try to put themselves in a position where the item would identify, which was techincally optimal but quite annoying. There were a few items that never would identify, but on the whole it's not worth keeping around the behavior just for them. The ID code is pretty confusing and it's quite possible the implementation is not ideal or there are actual bugs.
* Remove scrambling.Shmuale Mark2014-04-061-14/+1
| | | | | | | It was something that was almost never relevant but that cluttered up the code regardless. If it were to be more relevant that would not really be a good thing since a chance for instadeath is rather bad design.
* Fix blood coagulation occasionally causing a burden discrepancy.elliptic2014-03-181-1/+3
| | | | This could cause autopickup to burden the player with no prompt.
* Clean up the player hp change and calculation functionsgammafunk2014-03-181-1/+10
| | | | | | | Move calc_hp() to player.cc, and fix all but a couple instances where you.hp is changed directly to use set_hp() instead. We'll eventually just move these functions to inline methods for the player class, but this reorganization will do for now.
* Take regeneration rate into account when displaying poison level.elliptic2014-03-131-1/+1
| | | | | | | | | | | | | | Previously "lethally poisoned" often didn't actually mean the poison would be lethal if you rested it off, since it didn't take into account natural regeneration. This made a lot of the poison display useless in many situations. This commit adds functions poison_is_lethal() and poison_survival(), the latter of which returns the expected lowest that your HP will go based on your current poison level and regeneration rate. This function is occasionally off by one, hopefully always in the direction of surviving with one more HP than expected... so occasionally "lethal" poison will just leave you at 1 HP.
* Make all abyss teleports shift the Abyss (minmay).Shmuale Mark2014-03-081-1/+1
| | | | | | | | | | | | | | | | Partly this is to (somewhat) make the Abyss a little easier. Teleports still take longer than orbrun teleports to kick in on average, and in general letting the player know what an action will do is a good thing. But the main reason is that, due to maprot, same-area abyss teleports are a pretty awful interface screw. You are prevented from remembering what monsters were around (this was quite annoying when being marked was more common in the abyss), and though you can see for one second what direction you came from, immediately after the screen refreshes and you can't anymore. Possibly this could lead to improving/removing altogether maprot.
* Rename unchivalric_attack_type and friends.Shmuale Mark2014-03-061-1/+1
| | | | | | The enum values were never checked in any code relating to chivalry, except to see that a value wasn't 0 (ie it was a forbidden stab). A recent bug arose from the bad naming, too.
* Block autoexplore and such when lethally poisonedDracoOmega2014-03-061-0/+8
| | | | (And print an appropriate message)
* Don't generate racial armourChris Oelmueller2014-03-061-2/+1
| | | | | | | | [It had much the same problems as racial weapons, with only very slightly more significant effects. Some of the old effects of racial armour could potentially be rethought and made into a new armour ego. Beogh still gives a (slightly smaller than before) bonus for armour use, without the orcish requirement. -MarvinPA]
* Merge wand and gadget shops (and allow them to occasionally have rods).Steve Melenchuk2014-02-271-2/+1
| | | | Get all your evokables in once place, folks!
* Make monster pathfinding less player-centricDracoOmega2014-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Most pathfinding checks assumed that the only thing a monster would be trying to path towards was the player, even though this was frequently untrue (either hostile monsters targeting player allies or friendly monsters trying to reach other monsters). A few bugs existed as a result of this: When monsters without ranged attacks would check the reachability of their foe, they would check the reachability of the player instead, regardless of what was shooting at them or whether the player was even involved in the battle. This meant that melee-only monsters would flee from ranged attacks in the arena (where the player is understandably never reachable) and also could show up occasionally in normal play - such as retreating from an oklob fort if the player is behind water. I expect there are a few other bugs related to similar assumptions, but moreover, allowing monsters to use proper pathfinding to non-player foes likely improves ally intelligence somewhat. As always with fiddly monster behavioral code, there is a non-trivial chance that some important side-effect has been overlooked, but initial testing looks good.
* Fix to attack penance warnings.gammafunk2014-02-191-9/+4
| | | | | | | | | | | | | | | | | Currently if you melee an "object" (according to mons_is_object()) such as a conjured ball lightning, you get a penance warning if worshiping TSO. This is a "bad attack" and should give a prompt, but will not cause penance. This commit fixes this by making the necessary call to god_hates_attacking_friend() to determine if penance would occur. This also fixes the case when you attack allies/followers under beogh, which currently doesn't give a penance warning (although it does give a bad attack warning). This commit also cleans up is_unchivalric_attack() so that attacking an object is not reported as unchivalric and attacking a friend that your god doesn't hate for you attack isn't reported as UCAT_ALLY. These seem to both be technicalities at this point, but they should avoid some confusion if conducts change or new gods appear.
* Automatically identify chopped hides.Implojin2014-02-031-0/+4
| | | | | | | | Add an extra step in _create_monster_hide to automatically identify chopped dragon and troll hides. Hides are already always generated as +0 uncursed, so identifying them automatically removes both a spoiler and an unnecessary step of forcing the player to wear or ?identify dragon armours that they have created specifically to enter a trove.
* Use a regular y/n prompt for penance attacks, add message colouringChris Campbell2014-01-301-6/+2
| | | | | The full typed "yes" probably isn't necessary with the addition of the extra warning and colouring of the message.
* Make warnings against penance-causing attacks more prominent.Sage2014-01-301-16/+52
| | | | | | | | | | | | The prompt to hit an enslaved creature differs very little regardless of your god, even if it would cause penance with that god. This patch makes such attacks require yes_or_no like walking into a Zot trap instead of yesno, and explicitly states that it will cause penance with your god. For reference, only betrayal attacks under Okawaru and the good gods, attacking neutral creatures under Elyvilon or TSO, unchivalric attacks under TSO, and plant betrayal under Fedhas is affected; attacks with brands offensive to your god are not, and neither are attacks which only cause piety loss.
* Let blood scent trigger if blood would be spilled over ineligible squaresDracoOmega2014-01-281-5/+6
| | | | | | | | | | | | | Most particularly this applies to water, when cannot be bloodied. But it seems curious that sharks have a gimmick that involves reacting to blood, when combat in their native terrain can never produce anyway. Since there are good reasons not to recolor water red all the time, instead merely trigger blood scent when blood would otherwise have been created, but do not bloody the square itself. Something similar could arguably be done for Ignite Blood, though I am uncertain of the implications of creating massive clouds of steam whenever you fight over water.
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-2/+0
| | | | | Sometimes, they're there to emphasize a break between two sections of code, which is good. In a majority of cases, though, they're just inconsistent.
* Unseal stairs too when warden seal expires (#7874, #7875)Neil Moore2013-12-171-1/+8
| | | | | Games saved with a perma-seal should fix themselves on player's next turn when run_environment_effects is called.
* Don't unseal destroyed doors.Adam Borowski2013-12-171-0/+6
| | | | | This caused crashes, and was weird: a closed door would appear out of nowhere.