summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/delay.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add a few comments.j-p-e-g2008-07-071-2/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6438 c06c8d41-db1a-0410-9941-cceddc491573
* Fix the old issue of switching to the butchering tool before actuallyj-p-e-g2008-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | deciding on which corpse to butcher. Now, if there's no eligible tool to automatically switch to (or the autoswitch option is false) you get prompted at the beginning of the butchering routine but you don't actually switch weapons or take off your gloves until right before you start butchering. Obviously, the same applies when autoswitching. This means you don't lose a turn anymore if you change your mind in-between. I really hope I haven't introduced other bugs this way but a fix was badly in need since I'd changed the automatic weapon swap to take a turn just as the manual swap does. Also fix swap_when_safe so that it also working when the real weapon is on slot 'a' (== 0) which will probably be the norm rather than an exception. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6437 c06c8d41-db1a-0410-9941-cceddc491573
* Disallow vampires from draining summoned creatures to be consistent withj-p-e-g2008-07-041-9/+6
| | | | | | | | | | | | | summoned creatures being incapable of bleeding on the floor. This makes things more difficult for Vampires; on the other hand there was a (more or less) recent change that lets them regain 1 hp *per turn* when draining corpses. We might also increase the duration of blood potions... Apart from that, various clean-ups. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6393 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1999363: Vampire eating issues.j-p-e-g2008-07-031-16/+33
| | | | | | | | | Tidy up the new lines item descriptions a bit, so you don't get three free lines in some cases (non-randart, non-special description items) and one or two in other cases. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6370 c06c8d41-db1a-0410-9941-cceddc491573
* Change butchering prompt to hopefully be less confusing (BR 2009022).j-p-e-g2008-07-031-2/+2
| | | | | | | | | | | | | | | Also add a key to some kind of butchering help (may need tweaking) and 'b' is yet another synonym for 'c' but will allow Vampires to butcher a corpse they'd otherwise bottle. This only works while the prompt is given, i.e. if always_confirm_butcher is false Vampires will automatically attempt to bottle the blood in a single corpse (unless that is impossible, in which case they'll butcher it instead). Also fix corpses sometimes not being destroyed when drained by a Vampire. (Big oops!) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6366 c06c8d41-db1a-0410-9941-cceddc491573
* Make the neutrality enchantment decay properly.dolorous2008-07-021-3/+11
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6336 c06c8d41-db1a-0410-9941-cceddc491573
* [2005155] Don't print "start butchering" message if the item is no longer valid.ennewalker2008-06-281-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6185 c06c8d41-db1a-0410-9941-cceddc491573
* Disallow quivering equipped items. (You can still (fi)re your wieldedj-p-e-g2008-06-261-6/+5
| | | | | | | | weapon if you insist, you just can't quiver it.) And another general clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6149 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* If a visible monster interupts a delay by opening a door then say thatzelgadis2008-06-261-1/+3
| | | | | | | | | | | | it opens the door rather than "comes into view". If a visible monster opens a door when the player isn't delayed then give a message about it. Include secret doors in multi-door gates when a monster opens a door. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6145 c06c8d41-db1a-0410-9941-cceddc491573
* For functions that return char*'s, don't return a c_str() of an dolorous2008-06-251-6/+6
| | | | | | | | | | | | | | | std::string, since as soon as the function returns, the std::string goes out of scope, and the c_str() becomes a dangling pointer, which usually points to the same area as before, but occasionally points to garbage. Instead, make them return std::string's, and call c_str() on the return value outside the functions. Among other things, this should fix [1999515]. Note that I've only fixed direct c_str() returns for now. There might be some indirect ones that I missed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6139 c06c8d41-db1a-0410-9941-cceddc491573
* Change quiver output to that of the next item actually fired. Currentlyj-p-e-g2008-06-241-4/+4
| | | | | | | updates correctly on firing and dropping quivered items. May be buggy. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6107 c06c8d41-db1a-0410-9941-cceddc491573
* When pacifying, check holiness in the right places.dolorous2008-06-231-2/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6086 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up monster pacifying a bit: don't allow it to work for stationary dolorous2008-06-231-9/+8
| | | | | | | monsters, or for monsters that aren't holy, natural, undead, or demonic. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6085 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up some more.dolorous2008-06-161-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5886 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up and consolidate most of the monster pacification routines.dolorous2008-06-161-10/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5885 c06c8d41-db1a-0410-9941-cceddc491573
* Added several new tutorial triggers including information on being caughtj-p-e-g2008-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | in a net, specific skills, magic resistance, and which stat to choose. In a given game you'll only ever see a small fraction of all tutorial events (we're at 71 now, and some of them are exclusive). In fact, a lot of the information is so generally useful (esp. on gods, skills and items) that I'm seriously considering opening up the general information (How do I use item x? What does Spellcasting do?) to a wider selection of characters. I don't think we'll want to explain the intricacies of Mummies, Ghouls, or Vampires, but a lot of this stuff even applies to them... (If we overhaul the tutorial, it's certainly not a 0.4 target, though.) Resetting the tutorial version to 8 as we somehow switched from digital version to binary and back to digital. It will take some time until we actually reach 110, and by then, I am sure the base files won't be save compatible anymore. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5777 c06c8d41-db1a-0410-9941-cceddc491573
* Remove unneeded methods (including the old resistance screen), renamej-p-e-g2008-06-121-10/+10
| | | | | | | debugging functions, and some other clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5757 c06c8d41-db1a-0410-9941-cceddc491573
* In all cases of a monster suddenly coming into view use the phrasezelgadis2008-06-111-1/+1
| | | | | | | "appears out of thin air!" git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5736 c06c8d41-db1a-0410-9941-cceddc491573
* Increase efficiency for pathfinding around glass structures by loweringj-p-e-g2008-06-111-9/+24
| | | | | | | | | | | | | | | the chance to "try again" if the last time we were unsuccessful. Also, if a monster tries to find a path to the player (not directly reachable) and fails, mark all surrounding monsters of the same species within a radius of 2 as having been unsuccessful. This includes monsters that are currently out of los of the player or that are targetting a different monster. Once they target the player, there'll either be a direct path which they can use, or there won't, in which case there's a low chance of using path finding; otherwise they'll simply advance the traditional way as close as they can get. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5733 c06c8d41-db1a-0410-9941-cceddc491573
* Clean-up (renaming static methods and comments) in a number of files.j-p-e-g2008-06-101-75/+78
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5703 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pickup.lua.j-p-e-g2008-06-091-1/+2
| | | | | | | | | Make menu_colour_item_prefix also apply for autopickup_exceptions, so you can exclude, for example, all evil_eating at once. Fix Vampires "continuing draining" after having "stopped". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5666 c06c8d41-db1a-0410-9941-cceddc491573
* BR 1972213: Move "Corpse x no longer valid!" into #DEBUG_DIAGNOSTICSj-p-e-g2008-06-061-15/+25
| | | | | | | | | | | | | and print "The corpse you are butchering rises to attack you." where that is the case. BR 1945387: Don't allow summoning earth elementals from walls near the edge of the map (that can't get destroyed that way). Just seems more consistent. There's an error message, but it doesn't cost a turn. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5505 c06c8d41-db1a-0410-9941-cceddc491573
* Fix a bug with swap_when_safe, and experimentally defaultj-p-e-g2008-06-031-2/+9
| | | | | | | | 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
* Don't need to handle food chunk autopickup, since its already done inzelgadis2008-06-031-4/+0
| | | | | | | switch_weapon() in food.cc git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5451 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-1/+3
| | | | | | | | | | | | | | | | 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-11/+6
| | | | | | | | | | | | | | | | | | 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
* If butchering with a swapped weapon is interrupted, then switch backzelgadis2008-05-311-7/+26
| | | | | | | | | | | | to the non-butchering weapon as soon as the player is safe again. Enabled by setting option "swap_when_safe" to true. Also, fixed a bug where "not switching back" message wasn't always being given when butchering was interrupted. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5354 c06c8d41-db1a-0410-9941-cceddc491573
* Autopickup freshly bottled blood potions. j-p-e-g2008-05-301-19/+31
| | | | | | | | | | | 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
* Just for kicks, reuse monster property mname to name zombies/skeletonsj-p-e-g2008-05-301-1/+1
| | | | | | | | | | | | raised from unique monster's corpses. The unique number is stored in orig_monnum, so this doesn't apply to orcish followers. I thought it would be cool to have Sigmund the human zombie in your ranks, or to fight againt Blork the orc skeleton. The corpses are currently not differentiated (just "human corpse", "orc skeleton"), just the resulting undead. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5343 c06c8d41-db1a-0410-9941-cceddc491573
* Autoprayer is gone.zelgadis2008-05-301-17/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5341 c06c8d41-db1a-0410-9941-cceddc491573
* Added two new options, rest_wait_both and chunks_autopickup, both defaultingzelgadis2008-05-301-4/+45
| | | | | | | | | | | | | | | | | to false. If rest_wait_both is true then resting will only stop when both HP and MP are both fully restored, not when only one or the other is restored. If chunks_autopickup is true then flesh chunks generated from butchering will automatically be picked up (respecting the other autopickup settings). My implementation of rest_wait_both has a few side effects. I got rid of check_hp() and check_mp() from the runrest class, since player AI interruption code seems to be able to take care of that. I also added a rather kuldgey block_interruptions() so that the activity interrupts code could use mpr() without going into infinite recursion because of AI_MESSAGE interrutps. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5337 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-05-291-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5329 c06c8d41-db1a-0410-9941-cceddc491573
* Twelve new tutorial events, plus examining a square with a cloud orzelgadis2008-05-291-5/+0
| | | | | | | | | | | | | | | | | | | 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
* Modify num_feats_between to return early if a feature has beenj-p-e-g2008-05-271-2/+1
| | | | | | | | encountered and we're only interested in whether the path is clear or not. Also, more whitespace/comment changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5298 c06c8d41-db1a-0410-9941-cceddc491573
* Yet another session of comment/whitespace cleanups.j-p-e-g2008-05-271-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5291 c06c8d41-db1a-0410-9941-cceddc491573
* Added "error" channel for runtime errors, and changed error messages thatzelgadis2008-05-271-1/+1
| | | | | | | | | used the "danger" or "warning" channels to use that. Sending an error message to the error channel has the side effect of interrupting all activity. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5276 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1971173: don't interrupt interlevel travel for monsters coming intozelgadis2008-05-261-0/+8
| | | | | | | | | view if you're already going up or down stairs. Also, only interrupt for HP or MP being fully restored when resting. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5250 c06c8d41-db1a-0410-9941-cceddc491573
* Mention named orcs' base type in the monster descriptions.j-p-e-g2008-05-251-4/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5231 c06c8d41-db1a-0410-9941-cceddc491573
* Properly disallow bottling blood from rotten corpses, as doing so causes dolorous2008-05-221-1/+1
| | | | | | | | an assertion failure in wizard mode. Also, don't display "What a waste." if we've just butchered a rotten corpse. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5180 c06c8d41-db1a-0410-9941-cceddc491573
* A few message tweaks for delayed butchering.j-p-e-g2008-05-161-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5076 c06c8d41-db1a-0410-9941-cceddc491573
* Fix the remaining (known) issues with butchering all corpses in a stash:j-p-e-g2008-05-161-45/+72
| | | | | | | | | | | | | | | * You should now get the "not swapping back" warning also for sac sessions and chained butchery. * Vampires choosing (a)ll from a "Bottle this corpse?" prompt will only attempt to bottle corpses that actually contain blood (so they no longer will be autobutchering bloodless corpses in the stash). Also changed Vampire spell hunger reduction to Thirsty, Very Thirsty: 50% Near Starving, Starving: None git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5075 c06c8d41-db1a-0410-9941-cceddc491573
* Implement FR 1936340: add a shortcut for butchering (a)ll corpses in aj-p-e-g2008-05-151-35/+113
| | | | | | | | | | stack. Does not yet differentiate between butchering and bottling (for Vampires), and if several butcher/sacrifice delays have been chained and are now interrupted, you only get the "not switching back to xyz" message if the interruption happens while butchering the last corpse. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5068 c06c8d41-db1a-0410-9941-cceddc491573
* Add a tutorial hint for encountering an invisible monster and offer a j-p-e-g2008-05-151-0/+8
| | | | | | | | | | | different healing message if you recently met an invisible monster, as suggested in FR 1964267. Killing an invisible monster does not yet reset the counter, though I guess it should. Also, disallow randart weapons to be named after Sif Muna. (Vehumet, too, maybe?) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5052 c06c8d41-db1a-0410-9941-cceddc491573
* Experimentally switch back to glyph colours light red, yellow, andj-p-e-g2008-05-101-2/+2
| | | | | | | | | | | | red, respectively, for orcs, orc warriors, and Urug. I don't play ASCII, so this is solely based on player complaints. (But I figure yellow works as a "lighter" version of orange = light red, possibly better than the standard pair brown/yellow.) Also, add gila monsters to the new colour scheme: they're always magenta now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4989 c06c8d41-db1a-0410-9941-cceddc491573
* Tweak neutrality messages for Zin's Recite.dolorous2008-05-091-2/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4952 c06c8d41-db1a-0410-9941-cceddc491573
* Properly amuse Xom when vampires lose corpses while draining them.dolorous2008-05-051-1/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4875 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-05-051-3/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4874 c06c8d41-db1a-0410-9941-cceddc491573
* First attempt at making vampire feeding interruptible. It doesn't workj-p-e-g2008-05-051-14/+94
| | | | | | | | | | | yet (I had "You stop feeding" followed by "You continue feeding" including full effects), but it's probably better to commit now anyway. Known potions of blood or porridge cannot be quaffed when engorged (alive). Also clean up blood potions check. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4871 c06c8d41-db1a-0410-9941-cceddc491573
* Removed randomised messages for "already seen" monsters. Randomised messages ↵dshaligram2008-05-041-33/+2
| | | | | | for frequent events => message spam that's hard to block. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4861 c06c8d41-db1a-0410-9941-cceddc491573