summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stuff.h
Commit message (Collapse)AuthorAgeFilesLines
* Plug a couple of memory holes. Unfortunately, between libSDL andj-p-e-g2009-06-151-0/+1
| | | | | | | libfreetype there's loads of leakage that I can't do anything about. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@9983 c06c8d41-db1a-0410-9941-cceddc491573
* Add more minor cosmetic fixes.dolorous2009-03-111-5/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9411 c06c8d41-db1a-0410-9941-cceddc491573
* Book acquirement again:j-p-e-g2009-02-181-2/+4
| | | | | | | | | | * Weigh magic skills stronger to bias against manuals. * Fall through to randart (theme) books if all spells are known. * Allow spell school combinations (Conj/Fire) in naming randarts after hell lords and others. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9122 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up Animate Dead. Also fix messaging.haranp2009-01-301-1/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8853 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more minor cosmetic fixes.dolorous2009-01-261-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8796 c06c8d41-db1a-0410-9941-cceddc491573
* Fix bounds checks for monsters' moving off the map to use map_bounds().dolorous2009-01-261-0/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8793 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify monster_random_space().dolorous2009-01-261-3/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8790 c06c8d41-db1a-0410-9941-cceddc491573
* [2468791] Reduce distinction between minivaults and floating vaults. All ↵dshaligram2009-01-031-0/+7
| | | | | | vaults are now handled by _build_vaults. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8169 c06c8d41-db1a-0410-9941-cceddc491573
* Complete rewrite of the beam code, making it considerably saner.haranp2008-12-251-0/+1
| | | | | | | However, there might be quite a few bugs lurking in this rewrite. Sorry. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7975 c06c8d41-db1a-0410-9941-cceddc491573
* Make enslaved souls the EC_UNHOLY color, and make zombies shovable.dolorous2008-12-231-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7916 c06c8d41-db1a-0410-9941-cceddc491573
* Changed weights of the brands a chaos weapon might simulate and the weight ofzelgadis2008-12-101-1/+7
| | | | | | | | | | | | | | | | | | | the various chaos effects, to make chaos brand less powerful. Added berserk and miscast effects for chaos effects, plus chaos weapons will occasionally give a message-only miscast effect if it would otherwise have done nothing. Added several effects that have a chance of happening to an attacker every time it uses a chaos brand/AF_CHAOS: dropping through temporary a shaft, having the stairs move out from under them, the weapon making a loud noise. Monsters killed by a chaos weapon/AF_CHAOS have a chance of immediately turning into a zombie (assuming the monster didn't leave a corpse; chaos effects don't (yet) use up corpses). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7804 c06c8d41-db1a-0410-9941-cceddc491573
* Breaks savefile compatibility.zelgadis2008-12-071-1/+7
| | | | | | | | | | | | | | | | | | | | Re-arranged book_type so that books you might find on the floor come first, then books only given out by certain gods, and so on. Added book types BOOK_RANDART_LEVEL, BOOK_RANDART_THEME and BOOK_CARD_EFFECT. Can now get randart books both from acquirement and shops/floor. Acquirement books have a chance of being a manual with a spell discipline skill. Randart books have their own appearances now, and fixed level books their own naming scheme. Needs more entries. Randart books aren't hilited in the menu like other randarts are; don't know why. Added some assertions to choose_random_weighted(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7761 c06c8d41-db1a-0410-9941-cceddc491573
* Redid monster death idiom so that monsters::hurt can implicitlyharanp2008-10-041-2/+0
| | | | | | | | call monster_die(). (This behaviour can be overriden.) Minor code cleanups elsewhere, removal of dead code from bolt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7123 c06c8d41-db1a-0410-9941-cceddc491573
* Add whitespace fixes.dolorous2008-09-281-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7054 c06c8d41-db1a-0410-9941-cceddc491573
* Add miscellaneous minor cleanups to prepare for the introduction of dolorous2008-09-251-0/+2
| | | | | | | | | | | Yred's injury mirroring: move the routine to make a visible monster flash a particular color into its own function, add an integer-based square root function based on Newton's method to stuff.cc, and adjust prayer lengths for Zin (1 turn), Yred (20 turns), Ely (same as Yred), and all gods who ignore prayers (same as Zin). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6982 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-6/+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
* More cleanups.haranp2008-07-241-9/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6669 c06c8d41-db1a-0410-9941-cceddc491573
* More cleanups and fixes.haranp2008-07-231-2/+28
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6648 c06c8d41-db1a-0410-9941-cceddc491573
* Massive change from using x and y to using coord_defs(). Not quite tested,haranp2008-07-221-1/+1
| | | | | | | | most likely broken in some places and might break tiles. Will fix in the near future. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6636 c06c8d41-db1a-0410-9941-cceddc491573
* Various code cleanups. Moving towards using coord_def()haranp2008-07-211-0/+1
| | | | | | | instead of x and y where possible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6630 c06c8d41-db1a-0410-9941-cceddc491573
* Add a function x_chance_in_y(x,y) to replace the variousj-p-e-g2008-07-061-0/+1
| | | | | | | | random2(y) < x checks, e.g. x_chance_in_y(weight, totalweight). This should make things a bit more readable. Apply it to a number of files. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6428 c06c8d41-db1a-0410-9941-cceddc491573
* Many code cleanups, mostly involving using stack_iterator andharanp2008-07-021-0/+1
| | | | | | | 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
* Fix typo.dolorous2008-06-181-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5932 c06c8d41-db1a-0410-9941-cceddc491573
* Add more miscellaneous minor fixes.dolorous2008-06-181-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5931 c06c8d41-db1a-0410-9941-cceddc491573
* More cleanups and use of stack_iterator. Added operator-> to stack_iteratorharanp2008-06-161-0/+2
| | | | | | | and radius_iterator. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5876 c06c8d41-db1a-0410-9941-cceddc491573
* Finally implemented stack_iterator(), a way to iterate over objects inharanp2008-06-161-0/+21
| | | | | | | | a stack without all that o = mitm[o].link stuff. Redid Ely's destroy weapons power to use it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5875 c06c8d41-db1a-0410-9941-cceddc491573
* Add reset() method to radius_iterator so that a single iteratorzelgadis2008-06-091-0/+1
| | | | | | | instance can be re-used. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5619 c06c8d41-db1a-0410-9941-cceddc491573
* Add a tutorial hint for encountering an invisible monster and offer a j-p-e-g2008-05-151-1/+2
| | | | | | | | | | | 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
* Cleaned up monster generation functions, separate monster zombie type from ↵dshaligram2008-05-051-0/+1
| | | | | | | | | monster number. May be buggy. Allow hydra zombies (they currently do not get the right number of heads). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4872 c06c8d41-db1a-0410-9941-cceddc491573
* [1956565] Fix issues with monster names.dshaligram2008-05-041-2/+3
| | | | | | | | | Monster names are now stored in the monster struct and saved. Changed some monster-finding functions to return monsters* instead of monster index for type-safety. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4859 c06c8d41-db1a-0410-9941-cceddc491573
* Added Water card. Might need some rebalancing.haranp2008-04-081-0/+26
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4127 c06c8d41-db1a-0410-9941-cceddc491573
* Add one more whitespace fix.dolorous2008-04-011-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4020 c06c8d41-db1a-0410-9941-cceddc491573
* Prevent shafts from being created in corridors, at least untilj-p-e-g2008-03-291-1/+1
| | | | | | | | | | | | | | | | | around dungeon level 7. Rename ROCK_STAIRS to ESCAPE_HATCH, as well as the corresponding function, since I think that the escape hatches are such a cool concept that we won't be going back, and the current coding name is a bit confusing. Clean up dungeon.cc. I'll probably have to add stuff into our new conventions file as I've been making up a lot of new rules in trying to make the code more readable. (Rules concerning nested brackets, and function indentation, etc.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3927 c06c8d41-db1a-0410-9941-cceddc491573
* Tweak yesnoquit some more to allow for a second alternative yes character,j-p-e-g2008-03-211-1/+1
| | | | | | | | | and use it for the chopping prompt. Also tweak eat.lua to allow y=e for inventory as well. Oh, and finally fix beheld handling to allow diagonal movement. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3787 c06c8d41-db1a-0410-9941-cceddc491573
* Another one of those mixed commits.j-p-e-g2008-03-201-2/+2
| | | | | | | | | | | | | | | * Fix 1915277: Blade Hands time-out removing bardings. * Ely's Lesser Healing costs range(0,1) piety (avg. 0.5) * Allow synonym for "yes" in yesnoquit(), and use it for eating (e=y). Also, in preparation for 0.4 (yes, I can't wait) finally disallow random generation of weapons of orc slaying. Demon lords use a check of their own and as a randart property it's also allowed, which I think is fine. Allow random generation of nets and increase shop prices for nets and javelins. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3766 c06c8d41-db1a-0410-9941-cceddc491573
* Pull yes or no questions requiring a typed "yes" into into a yes_or_no(),pauldubois2008-03-161-0/+1
| | | | | | | | analagous to "yesno". Tested with zot,lava,water,quit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3666 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-1/+1
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* Apply patch 1901117: vitrification effect for Xom (and Xom cleanup)j-p-e-g2008-02-251-0/+1
| | | | | | | | | This needs flavour messages, and looks odd for large power because the undiggable stone of the level also gets turned into glass possibly resulting in huge areas of glass tiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3464 c06c8d41-db1a-0410-9941-cceddc491573
* [1829946] Fixed broken beam tracers.dshaligram2008-01-261-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3341 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed stash-tracker seeing through walls (it was using stale LOS after ↵dshaligram2007-11-151-1/+3
| | | | | | blink/teleport), fixed shadow creatures crash in labyrinths, and fixed use of displayed stair glyph for handling selection of monsters placed on stairs (display glyphs can be changed by the user). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2855 c06c8d41-db1a-0410-9941-cceddc491573
* Allow yesno to use an override keymap applied after getchm(), make Escape ↵dshaligram2007-11-011-1/+4
| | | | | | cancel out of the explore stop prompt (bobbens). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2716 c06c8d41-db1a-0410-9941-cceddc491573
* Monsters coming up or down staircases will now j-p-e-g2007-08-231-1/+1
| | | | | | | | | | | | | be chosen according to the destination. And yes, this does mean that occasionally an elf summoner will cross the Orc/Elf border etc, which could make things harder. On the other hand, that's just one staircase out of (at least!) seven, and monsters entering the level through the upstairs will likewise be a bit easier. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2030 c06c8d41-db1a-0410-9941-cceddc491573
* Changed Nemelex description (David.)haranp2007-07-261-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1933 c06c8d41-db1a-0410-9941-cceddc491573
* Added rod of venom [1701655]. Redid some braindead staff handling.haranp2007-07-261-1/+2
| | | | | | | Breaks savefiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1932 c06c8d41-db1a-0410-9941-cceddc491573
* Added potions of resistance, which give fire, electricity and cold resist forharanp2007-07-231-0/+1
| | | | | | | | | | | 10 + random2(40) turns. Rareness roughly equivalent to levitation. This is FR 1756363. The potion does *not* give MR. Rewrote some vampire potion handling, including some changes: e.g. vampires can now be paralysed by potions of paralysis (I don't see why they shouldn't be.) For now there is no status message for fire/cold resist; will change soon. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1918 c06c8d41-db1a-0410-9941-cceddc491573
* Updated level-design.txt.dshaligram2007-07-211-2/+8
| | | | | | | | | | | Moved map markers to mapmark.cc. Added support for timer markers that remove a feature after a certain timeout. Need to hook up messaging to Lua. Added bazaars (need more bazaar layouts). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1899 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed abjuration (player and monster versions) to work with the new enchantmentdshaligram2007-07-111-0/+2
| | | | | | | | | | | duration system. Also strengthened monster abjuration, which became terribly weak after the 0.2 nerf. Monster abjuration now applies in a circle around the caster, squares adjacent to the caster getting full blast, and weaker abjuration effects going outwards. Player abjuration stays unchanged. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1836 c06c8d41-db1a-0410-9941-cceddc491573
* Monster enchantment overhaul:dshaligram2007-07-101-5/+0
| | | | | | | | | | | | | | | | | * Enchantment degree is converted into duration up-front. The average enchantment duration should be nearly the same as before, but we guarantee minimum durations on enchantments. Enchantment duration variance is much less, needs testing to see whether this makes enchantments and summoning too strong. * Enchantments that rely on degree (like poison, sticky flame) still use it. * Durations are now based on individual movement ticks, not turns (10 ticks = 1 normal player turn). * Breaks saves, abjuration doesn't work (will fix). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1828 c06c8d41-db1a-0410-9941-cceddc491573
* Nemelex now remembers what you've sacrificed and gifts decks accordingly.haranp2007-07-091-1/+16
| | | | | | | | | High-value sacrifices can reduce the gift countdown. Nemelex is easier to please. Breaks savefiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1821 c06c8d41-db1a-0410-9941-cceddc491573
* More randart names and appearances.dshaligram2007-07-051-0/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1761 c06c8d41-db1a-0410-9941-cceddc491573