summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/delay.h
Commit message (Collapse)AuthorAgeFilesLines
* Simplify butchery handlingChris Campbell2013-12-061-4/+1
| | | | | | Butchery is always allowed except in a few forms (bat, wisp, fungus). Removes a lot of unnecessary/unused code for swapping weapons and removing equipment when butchering.
* Use std namespace.Raphael Langella2012-08-261-4/+4
| | | | | | | | | | | | | 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.
* Change seen_context from strings to enums, slightly untangle it.Adam Borowski2011-12-051-7/+7
| | | | | | | | | | It's still a terrible mess. I didn't manage to understand it well enough so all[1] functionality is preserved, at the cost of clarity. I unified some values that are functionally identical, but not yet all. [1]. The context is reported only as a number in crash dumps, a minor regression but 1. saves speed, 2. it'd be a matter of copying the enum names if someone actually needs this.
* Better butchering messages.Raphael Langella2011-04-291-3/+3
| | | | | | | | | Pass the butchering tool into the delay. Had to increase the number of delay parameters to 3. There's no more switching messages. Only: "You start butchering the foo corpse with your bar." and: "You finish ripping/chopping the foo corpse into pieces."
* Auto-eat while travelling.Raphael Langella2011-04-221-0/+1
| | | | | If you set the easy_eat_chunks option and are carrying an edible chunk it will be automatically eaten without interrupting travel, run or rest.
* Revert Ashenzari curses exceptions.Raphael Langella2011-04-111-2/+1
| | | | | They made some sense (gameplay-wise) with the skill boost, but with the current design, they are not necessary and hurt the flavour (#3792).
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-4/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Allow ashenzarites to butcher when wielding a cursed blunt weapon.Raphael Langella2011-03-281-1/+2
| | | | | If you're interrupted, you're not prompted and forced to switch back to your cursed weapon. Thus, this exception doesn't work with a monster in sight.
* Fix no wielding prompt when butchering is interrupted by an invisible.Raphael Langella2011-03-281-1/+1
| | | | In some cases, you're not prompted to switch back.
* Better messages for monsters coming into view.Raphael Langella2011-03-141-1/+1
| | | | | | | | | | | | | | When more than one monster come into view at once, there's a single message listing the various monster types. If there is more than 4 types, we list genera (which is the correct plural of genus :). If there's more than 4 genera, we fall back to "x monsters come into view." Examples: 4 orcs, an orc wizard, a troll and Psyche come into view. 3 dragons and 6 draconians come into view. This is commit is also a preparation for the futur Ash ability of identifying monster equipment.
* Don't keep drinking from a corpse after it's raised!valrus2011-01-281-0/+1
|
* Reduce spam of 'foo comes into view' messagesArxale2010-12-081-1/+2
| | | | Signed-off-by: Raphael Langella <raphael.langella@gmail.com>
* Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-4/+4
| | | | | | 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.
* Make several functions static.Adam Borowski2010-10-131-1/+0
|
* Rename class "monsters" to "monster".Robert Vollmert2010-09-051-2/+2
|
* s/is_run_delay/delay_is_run/, use delay_type instead of int.Darshan Shaligram2010-07-011-1/+1
|
* Bring sanity to enums by making them diffable/patchable.Adam Borowski2010-06-081-1/+1
|
* Move non-delay-related Recite functions from delay.cc to godabil.cc.David Lawrence Ramsey2010-06-021-4/+0
|
* Reorder the Recite parameters so that it can calculate its own power.David Lawrence Ramsey2010-06-021-1/+1
|
* Make Recite effects available in a public function.David Lawrence Ramsey2010-06-021-0/+2
|
* Implement Zin's Recite ability.David Lawrence Ramsey2010-05-191-0/+1
| | | | | | | | | | | | Note that it's a bit crude in some ways. Also, there are minor issues: * The check for whether a monster can be imprisoned is currently identical to the check for whether Recite will work on it. * Recite effects are not applied to the imprisoned monster yet. * The ability costs are roughly a midpoint between Vitalisation and Sanctuary. * The documentation has been updated to mention Imprison, but it could probably be improved.
* Collect equip and unequip effects in player-equip.cc.Robert Vollmert2010-05-121-2/+0
|
* Concentrate equipping/unequipping in player-equip.cc.Robert Vollmert2010-03-131-1/+1
| | | | | The various equipping effects should eventually move there; for now, they should only be called throuh (un)equip_item.
* Don't let friendlies animate corpses being butchered, or while hungry.Jude Brown2010-02-261-0/+1
| | | | | | | | | This prevents allies from using animate dead while the player is less than satiated (this check could be improved to investigate herbivoreness, etc; found in _animate_dead_okay in mon-cast.cc), or if the player is currently butchering a corpse. This does not alter enemy behaviour at all.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Fix multiple mouseclicks causing the same spell to be memorised severalj-p-e-g2009-09-141-0/+1
| | | | | | | times. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10676 c06c8d41-db1a-0410-9941-cceddc491573
* Fix gloved butchery, using part of evktalo's patch plus a minor hack to dolorous2009-07-151-0/+1
| | | | | | | ensure that the gloves are removed exactly when they should be. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10224 c06c8d41-db1a-0410-9941-cceddc491573
* * Automate all the notetaking I always do when testing Xom.j-p-e-g2009-04-121-0/+1
| | | | | | | | | | | | | NOTE_DEBUG_XOM might be a tiny bit technical or spoily, but at the same time I like the results and think this flag could actually be turned into an option to autonote all Xom effects, so I've left it on in this commit, in case someone else is playtesting Xom. * Fix a monster polymorphing into an (invisible) unseen horror naming it. * Reactivate autopickup if you kill an invisible monster or see an invisible monster become visible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9598 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix 2744875 (mutation screen assert).j-p-e-g2009-04-111-0/+1
| | | | | | | | | | * Rename KeymapContext KC_* -> KMC_* to avoid overlap with kill_category KC_*. * Increase odds for chaos brands mimicking brands that hurt the defender. * Tweak chaos_affects_attacker(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9595 c06c8d41-db1a-0410-9941-cceddc491573
* Xom again:j-p-e-g2009-03-281-5/+6
| | | | | | | | | | * tweak values for tension and amusement * Xom only laughs about "funny" deaths * gift_timeout rerolling after a bad act depends on its severity * replace the blink effect with position swapping git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9561 c06c8d41-db1a-0410-9941-cceddc491573
* * Tweak FAQ as suggested in FR 2472030.j-p-e-g2009-01-171-1/+2
| | | | | | | | | | * Fix 2515108: stash tracker not being initialized at game start. * Fix 2514024: melded armour hindering melee. * Fix 2512301: =regeneration described as useless for Mummies. * Fix weapon swap prompt when untransforming with monsters in view. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8503 c06c8d41-db1a-0410-9941-cceddc491573
* Changed interrupted butchering behaviour as per Johanna'szelgadis2008-12-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | suggestions/observations: 1) Get rid of option swap_when_safe and its behaviour. 2) If auto-swap butchery is interrupted by teleportation or chagning levels (banishment) then auto-swap back if there's no monsters nearby. 2b) Do the same if butchery is interrupted and then later a large position change happens. 3) If auto-swap butchery is interrupted by something like poison damage, if the butchery is resumed and finished then swap back. 4) If auto-swap butchery is interrupted by a monster, then if the new option prompt_for_swap is set the game will ask if you wish to swap back from your butchering tool. 4b) Do the same if butchery is interrupted and then later a large position change lands you near some hostile monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7717 c06c8d41-db1a-0410-9941-cceddc491573
* Added crawl.process_keys to user Lua API to allow a Lua macro to ask Crawl ↵dshaligram2008-11-121-0/+1
| | | | | | to process keystrokes immediately, i.e., not wait until the macro has finished running. Also removed player EV penalty during run/rest/travel. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7443 c06c8d41-db1a-0410-9941-cceddc491573
* Implement FR 1894211: All transformations will now cause your equipmentj-p-e-g2008-10-261-0/+2
| | | | | | | | | | | | | | | | | | to meld into your body than rather than being removed, so that when untransforming you don't have to put everything on again. * Wielded stuff cannot be melded, and does not yet use the autoswap function. * As before, the low-level transformation spells refuse to work with cursed equipment. * The messages are unnecessarily spammy if you change forms while already transformed (first everything is re-equipped, then unequipped again). Conversely, on simply untransforming the lack of messages might be confusing. * Might be buggy, feedback welcome! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7300 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-4/+0
| | | | | | | | | | into a file crawlhistory.txt in docs/obsolete. I used a perl script to do this under the assumption that all these change logs used the same system following the keyword "Change History". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6930 c06c8d41-db1a-0410-9941-cceddc491573
* Remove unneeded methods (including the old resistance screen), renamej-p-e-g2008-06-121-3/+0
| | | | | | | 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
* BR 1972213: Move "Corpse x no longer valid!" into #DEBUG_DIAGNOSTICSj-p-e-g2008-06-061-1/+1
| | | | | | | | | | | | | 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
* Added two new options, rest_wait_both and chunks_autopickup, both defaultingzelgadis2008-05-301-0/+1
| | | | | | | | | | | | | | | | | 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
* First attempt at making vampire feeding interruptible. It doesn't workj-p-e-g2008-05-051-6/+7
| | | | | | | | | | | 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
* Batch of tiny changes for MSVC compiles.pauldubois2008-03-101-1/+1
| | | | | | | | | | | | | | | Most of these fall into the category: - don't use struct to refer to a class, and vice versa - msvc doesn't like unistd.h or dirent.h Doesn't fix all the struct/class problems; I think I'll silence those for now and move on because it's not all that important. Tested on OS X. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3571 c06c8d41-db1a-0410-9941-cceddc491573
* Make being caught in a net interrupt the stair delay, and disallow beholding j-p-e-g2008-02-021-1/+1
| | | | | | | | | | attempts (mermaid) while the player is taking some stairs. Also add a message for wielding a weapon of distortion. (I'm afraid there already used to be one that I've accidentally removed.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3385 c06c8d41-db1a-0410-9941-cceddc491573
* Improved recite. It now directly compares power (calculated using Invocationsj-p-e-g2008-01-301-1/+1
| | | | | | | | | | | | | | | | and piety) with monsters' magic resistance. If the latter exceeds the former or you get a bad roll, the bad effects (haste or berserk) will happen. Otherwise you get one of a number of good effects the choice of which depends on your power again. This is probably still too strict, but much better than the older system. Unfortunately I had to cut the influene of the number of attempts as apply_area_visible currently only transfers power. So it's a clear 50% chance of "nothing happens" each turn, leaving us at 12.5% of nothing happening during 3 turns, plus a saving throw from bad effects. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3379 c06c8d41-db1a-0410-9941-cceddc491573
* Remove GLAMOUR, and introduce RECITE (new Zin invocation)j-p-e-g2008-01-241-0/+1
| | | | | | | | | | | | | | | | | | The latter is a work in progress and may have strange results. It is intended as a multiturn invocation that is interrupted by large hp losses. IMHO, reciting things is an action that needs to take several turns. Each turn an attempt at influencing intelligent monsters is made. They usually fall asleep, are confused or turn berserk. The delay gets cancelled when the player is heavily wounded or when there are no impressionable monsters around anymore. I think the power formula will have to be tweaked. Comments welcome! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3321 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+56
| | | | | | | | | | | | | crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573
* Stop butcher delays when blade hands wears off (Eva).dshaligram2007-07-081-3/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1801 c06c8d41-db1a-0410-9941-cceddc491573
* [1625227] animate_dead will not affect corpses being butchered.dshaligram2007-01-091-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@811 c06c8d41-db1a-0410-9941-cceddc491573
* Better explore-stop messages.dshaligram2006-12-121-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@619 c06c8d41-db1a-0410-9941-cceddc491573
* Merged stone_soup r15:451 into trunk.dshaligram2006-11-221-0/+16
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up a mistake in the SVN import.nlanza2006-08-131-0/+19
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10 c06c8d41-db1a-0410-9941-cceddc491573