summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
Commit message (Collapse)AuthorAgeFilesLines
* Apply r6500 to 0.4.ennewalker2008-07-111-7/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6501 c06c8d41-db1a-0410-9941-cceddc491573
* Apply Abyss unlinked item fix and the changes to the starting equipmentj-p-e-g2008-07-081-2/+2
| | | | | | | to 0.4. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6456 c06c8d41-db1a-0410-9941-cceddc491573
* Apply previous fixes to 0.4.j-p-e-g2008-07-081-1/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6450 c06c8d41-db1a-0410-9941-cceddc491573
* Fix potions of decay created by mummy curse sometimes being inscribed.j-p-e-g2008-07-071-16/+17
| | | | | | | | | Change inscription prompt to work as intended by David, after all. :) Make manuals use a reading counter (plus2) that is initialized with 3 + random2(15). Once it reaches 0, the manual crumbles to dust. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6443 c06c8d41-db1a-0410-9941-cceddc491573
* Another clean up, and add some new weapon speech.j-p-e-g2008-07-071-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6439 c06c8d41-db1a-0410-9941-cceddc491573
* Remove debugging statement, minor clean up.j-p-e-g2008-07-031-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6369 c06c8d41-db1a-0410-9941-cceddc491573
* Many code cleanups, mostly involving using stack_iterator andharanp2008-07-021-12/+10
| | | | | | | radius_iterator instead of the previous setup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6347 c06c8d41-db1a-0410-9941-cceddc491573
* Added allow_self_target option, with possible values yes, no, prompt.haranp2008-07-021-3/+3
| | | | | | | Added brief documentation (could be improved.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6339 c06c8d41-db1a-0410-9941-cceddc491573
* Don't "trip and fall back down the stairs" when leaving Pandemonium, the Abysszelgadis2008-07-011-0/+1
| | | | | | | or a portal level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6271 c06c8d41-db1a-0410-9941-cceddc491573
* Add yet more miscellaneous minor fixes.dolorous2008-06-301-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6258 c06c8d41-db1a-0410-9941-cceddc491573
* Enable Chaos Knights of Lugonu starting out in the Abyss.j-p-e-g2008-06-301-7/+7
| | | | | | | | | | | | | | | | | | | I've marked these characters with GDT_GAME_START, so that * the player starts out on an altar to Lugonu * there's an exit back to the Dungeon near-by * returning into the Dungeon always places them into the entry vault on level 1 * no abyssal runes are ever generated * item generation matches that of level 1 * monster spawn rates are that of the orb run to enforce a quick return into the Dungeon Once the player returns to the Dungeon (via an exit or with Lugonu's first power) char_direction is properly set to GDT_DESCENDING and from then on the game continues as if they had started in the Dungeon. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6245 c06c8d41-db1a-0410-9941-cceddc491573
* In the attack warning prompt, do the checks for unchivalric attacks and dolorous2008-06-301-4/+4
| | | | | | | | | TSO's not minding your making unchivalric attacks in the right order. Maybe this fixes [2006092]? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6240 c06c8d41-db1a-0410-9941-cceddc491573
* In your_hand(), display "claw" instead of "hand" for the naturally dolorous2008-06-271-1/+1
| | | | | | | clawed races (trolls and ghouls) again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6171 c06c8d41-db1a-0410-9941-cceddc491573
* Fix the attack warning prompt's showing up for unchivalric attacks on dolorous2008-06-261-1/+3
| | | | | | | monsters that TSO doesn't care about unchivalric attacks on. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6152 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-10/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Finally remove the code that was preventing the coloured bars fromj-p-e-g2008-06-231-9/+1
| | | | | | | | | updating while resting in Tiles. With the overhaul of the drawing routines (already one or two months old) it's not needed anymore, and I really should have reacted to the new circumstances sooner. :P git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6088 c06c8d41-db1a-0410-9941-cceddc491573
* Move the prompt on entering a level that is marked as dangerous viaj-p-e-g2008-06-231-9/+9
| | | | | | | | annotation or exclusion *before* the delay is started, so it doesn't cost a turn. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6087 c06c8d41-db1a-0410-9941-cceddc491573
* Let a level_id be directly compared to a branch type with == and != tozelgadis2008-06-221-3/+3
| | | | | | | | determine if a level_id is (not) in BRANCH_FOO; takes care of comparing level_type to LEVEL_DUNGEON. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6034 c06c8d41-db1a-0410-9941-cceddc491573
* player_in_a_dangerous_place() can now optionally return if any hostilezelgadis2008-06-191-3/+12
| | | | | | | invisible monsters are nearby; for future use. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5967 c06c8d41-db1a-0410-9941-cceddc491573
* More cleanups and use of stack_iterator. Added operator-> to stack_iteratorharanp2008-06-161-3/+1
| | | | | | | and radius_iterator. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5876 c06c8d41-db1a-0410-9941-cceddc491573
* General code cleanups.haranp2008-06-151-17/+12
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5867 c06c8d41-db1a-0410-9941-cceddc491573
* Use radius_iterator instead of manually looping.haranp2008-06-151-25/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5866 c06c8d41-db1a-0410-9941-cceddc491573
* Fix the Vestibule having no upstairs. o_Oj-p-e-g2008-06-151-7/+7
| | | | | | | Fix fleeing monsters shooting at you. (BR 1994462) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5861 c06c8d41-db1a-0410-9941-cceddc491573
* Consolidate the checks for gods that give you permanent followers into a dolorous2008-06-141-1/+1
| | | | | | | | | function, and have it take the other good gods into account, since, if you switch from TSO to another good god, you keep all your non-daeva permanent followers. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5821 c06c8d41-db1a-0410-9941-cceddc491573
* * Add a prompt when attacking monsters with an inappropriate weapon orj-p-e-g2008-06-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | when attempting to use (controlled) berserk while wielding an inappropriate weapon. (FR 1956656) * Make monsters stop patrolling/travelling if they change levels (or are banished). * Disable the friendly pickup toggle for characters unable to use them. Currently, only worshippers of TSO and Beogh are capable of gaining allies that are permanent (not summoned), permanently friendly (not charmed) and intelligent enough to pick up stuff (no zombies). I don't know if you keep your friends if you leave TSO. If so, the toggle should be enabled while that is the case (i.e. if you're still worshipping a good god) * Re-order the wizmode commands in the help screen. They're now not listed strictly alphabetically anymore, but rather sorted into different categories that should make actually finding commands easier. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5819 c06c8d41-db1a-0410-9941-cceddc491573
* Remove #define SHUT_LABYRINTH because I don't think it's needed anymore.j-p-e-g2008-06-111-10/+2
| | | | | | | Add more information to the version command. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5729 c06c8d41-db1a-0410-9941-cceddc491573
* Modify Evaporate and Stinking Cloud to prompt when firing throughj-p-e-g2008-06-101-2/+5
| | | | | | | | allies. Note: This does still not handle the actual clouds, just the basic beam. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5701 c06c8d41-db1a-0410-9941-cceddc491573
* Moved some cloud related functions from misc.{cc,h} to cloud.{cc,h}zelgadis2008-06-091-292/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5636 c06c8d41-db1a-0410-9941-cceddc491573
* Move there_are_monsters_nearby() to misc.cc, and make it a wrapper dolorous2008-06-091-0/+9
| | | | | | | | around get_playervisible_monsters(), in order to reduce code duplication. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5630 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more miscellaneous minor fixes.dolorous2008-06-091-3/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5628 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed problem with monsters on edge of vision not being listed. Mightzelgadis2008-06-091-6/+6
| | | | | | | be bug 1946671. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5625 c06c8d41-db1a-0410-9941-cceddc491573
* Enable pathfinding for patrolling monsters who lost their patrol point.j-p-e-g2008-06-071-2/+25
| | | | | | | | | | | | | | | | | | | | | Fixed patrol definitions in maps not actually working. Tested both by teleporting the minotaur in a labyrinth. About 50 turns later it arrived back in its lair. :) Since the minotaur proved to have a high magic resistance, it had plenty of time to loot the stash at the labyrinth entrance once I'd woken it before I finally managed to teleport it away (in wizmode you can force monsters not noticing you). This resulted in "A minotaur, wielding the demon trident "Suyn Oma", and wearing a heavily runed ring mail." o_O It had also picked up a scroll and a wand. Ouch... (but cool!) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5536 c06c8d41-db1a-0410-9941-cceddc491573
* Create random blood spatter in the Abyss and Pandemonium (FR 1986241).j-p-e-g2008-06-071-6/+49
| | | | | | | | | | | | | How it works: * Pick 12 random grids on the map and make them bloody. * Recursively and with decreasing chances, allow their neighbours to get spattered as well. I think the effect is rather nice but the numbers might need to be tweaked anyway. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5533 c06c8d41-db1a-0410-9941-cceddc491573
* Fix a bug with swap_when_safe, and experimentally defaultj-p-e-g2008-06-031-2/+2
| | | | | | | | chunks_autopickup, swap_when_safe, and show_beam to true. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5457 c06c8d41-db1a-0410-9941-cceddc491573
* Fix summoned monsters spattering blood.j-p-e-g2008-06-031-0/+1
| | | | | | | Fix menu colouring giving away unknown evil items. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5456 c06c8d41-db1a-0410-9941-cceddc491573
* Fix a recent bug of mine that blocked the friendly fire prompts.j-p-e-g2008-06-021-1/+1
| | | | | | | | | | | | | | | | | | Fix 1943573: Weird message order when attacking charmed monsters. Fix 1826896: NOTE_ID could have line breaks in mid-word Modify the "This feature has more information" hint to mention mouseclicking for Tiles players rather than 'v' like for purists. Oh, and when trying to look into BR 1952908 (buggy trap in the Abyss) I found that traps can be generated in the Abyss after all. I don't know when that was changed but the last time I checked I remember seeing something like "if (level == ABYSS) return false" in a "Can there be traps here?" check. Is my memory playing tricks on me or was that really changed, and if so, was it intentional? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5445 c06c8d41-db1a-0410-9941-cceddc491573
* Fix a stupid bug I'd introduced when fixing another one.j-p-e-g2008-06-021-2/+14
| | | | | | | | | | | | | | | Fix 1939901: Weapon listing not updated right away after being cursed. Put the code to colour arbitrary substrings of a message according to the menu_colour settings into a function of its own, and use it for pick up and eating prompts (currently from floor only) as well as for the "Things that are here" listing. Could be overly spammy, thus needs testing. If all works well, we can remove the "msg =" settings in food_colouring.txt that currently don't do anything anyway, or reuse them for non-prompt messages like "You see here a green rat corpse." git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5436 c06c8d41-db1a-0410-9941-cceddc491573
* I'm not sure I actually coded anything worthwhile, though I experimentedj-p-e-g2008-06-021-2/+6
| | | | | | | | | | | | | | | | a fair bit and as usually ended up doing lots of clean-up. Oh wait, I modified eat_from_floor prompts to only force a more if there was actually a message before trying the inventory (whoops), and also modified the corpses in pack hint to take into account that a saccing player won't be interested in butchering rotten corpses. Also implemented a modified FR 1981119: when Detect Creatures only detects plants already seen before, print a different message ("You detect no further creatures."). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5435 c06c8d41-db1a-0410-9941-cceddc491573
* Fix wizard mode being unable to create monsters of nonfloor habitat.j-p-e-g2008-06-011-1/+4
| | | | | | | | | | | | | | | | Changed labyrinth handling for minotaurs: Instead of being magic mappable, labyrinths are plain mappable. Yes, that makes everything much easier, but allowing magic mapping and yet you still have to trudge along by hand (rather than use autotravel) is worse. To make up for it, we might want to boost the monster minotaur (trying to defend its home against a rival?) Or we could just remove the difference altogether... Cleaned up debug.cc a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5401 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-06-011-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5392 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up and consolidate random_uselessness(), as well as its associated dolorous2008-06-011-5/+0
| | | | | | | outsourced text. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5388 c06c8d41-db1a-0410-9941-cceddc491573
* Outsource weird sounds.dolorous2008-06-011-0/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5386 c06c8d41-db1a-0410-9941-cceddc491573
* Lowercase the last of the the miscellaneous names text, and move it out dolorous2008-06-011-18/+4
| | | | | | | of the randart name database into its own database. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5385 c06c8d41-db1a-0410-9941-cceddc491573
* Make the outsourced "weird smell" text lowercase.dolorous2008-05-311-5/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5380 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1962147: Move the comments on the food you eat at the end of DELAY_EAT.j-p-e-g2008-05-311-0/+2
| | | | | | | | | | | | | | | | Fix 1971216: Kills by confused undead use LIVING_KILLED_BY_SERVANT instead because the message ("collateral kill") fits better and, though it's basically a hack, the distinction does fit somehow. Fix 1914948: Tweak message when you resist a spell cast by an invisible monster. Fix 1946608: Print "Nothing appears to happen." if reading ?EWI when unarmed. I guess that's it, plus probably some more cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5378 c06c8d41-db1a-0410-9941-cceddc491573
* Consolidate all cases where corpses are turned into skeletons, asj-p-e-g2008-05-311-0/+24
| | | | | | | | | | | | | | | | | | suggested by dolorous in BR 1977925, and turn coloured draconian corpses into plain draconian skeletons. Same when the game attempts to create coloured draconian skeletons or simulacrums. Added autoinscription to the single inscription command ('{') - this is necessary for items with long descriptions that can't autoinscribed otherwise. Added a small hack to make death cobs (%) appear correctly in the monster list. The rest is cleanup, I believe. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5376 c06c8d41-db1a-0410-9941-cceddc491573
* Autopickup freshly bottled blood potions. j-p-e-g2008-05-301-122/+132
| | | | | | | | | | | Also, call autopickup() after a delayed weapon swap (presumably because we butchered/bottled one or more corpses before), so we can pick up all chunks/potions at the same time. Note that Vampires won't autopickup chunks, but autopickup will at least list stuff on the floor, which is also nice to have. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5347 c06c8d41-db1a-0410-9941-cceddc491573
* Autoprayer is gone.zelgadis2008-05-301-44/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5341 c06c8d41-db1a-0410-9941-cceddc491573
* Fire TUT_SEEN_TRAP when a trap is detected, in addition to when a trapzelgadis2008-05-291-0/+2
| | | | | | | | | | is triggered. Give info on avoid mechanical and natural traps by leviating or flying, and that natural and magical traps can't be disarmed. Give hint resting on up-stairs to make quick escape from monsters, and note that monsters can't follow up up unless they're right next to you. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5322 c06c8d41-db1a-0410-9941-cceddc491573
* Twelve new tutorial events, plus examining a square with a cloud orzelgadis2008-05-291-1/+4
| | | | | | | | | | | | | | | | | | | a monster submerged in shallow water will give extra info during turorial mode. Might be giving too many spoilers, especially the tips on surviving in the Abyss and saying exactly what each god likes and dislikes when covnerting. There's a bug in non-tiles build where the tutorial note on branch entrances shows the '>' symbol as light-grey instead of yellow; don't know what's causing that. Also, made player::backlit() used _get_contamination_level() to stay in sync with the rest of the code. Breaks savefile compatibilty. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5320 c06c8d41-db1a-0410-9941-cceddc491573