summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stuff.h
Commit message (Collapse)AuthorAgeFilesLines
* Ignore obscured items in the UIStefan O'Rear2009-12-301-1/+1
| | | | I probably missed a few spots.
* Experimental kraken adjustments.Darshan Shaligram2009-12-291-5/+0
| | | | | | Boost kraken and tentacle damage. Force the tentacles to stay close to the body of the kraken to make the creature look more like a unit. Tentacles are now amphibious and can reach out onto land, although they cannot stray too far from the main body.
* Remove unnecessary header-header includes.Robert Vollmert2009-11-271-2/+0
|
* Add ternary logic type maybe_bool.Robert Vollmert2009-11-241-0/+4
|
* Move silenced(pos) to areas.cc.Robert Vollmert2009-11-211-2/+0
|
* An improved attempt at zapping monsters in starting LOS.Robert Vollmert2009-11-121-1/+1
| | | | | | | Now make sure that clouds don't temporarily block LOS to monsters in view of the starting position. It's possible that no clouds can exist at that point, but this is safer.
* Revert "Rewrite zap_los_monsters using monster_iter."Robert Vollmert2009-11-121-1/+0
| | | | This reverts commit a57747c0c0f207a2cb5bee3e4d576f1feb355f96.
* Rewrite zap_los_monsters using monster_iter.Robert Vollmert2009-11-121-0/+1
| | | | | Not sure it was broken before, but it's cleaner now. Also move tutorial item zapping into a separate function.
* Extract morgue file time formatting into make_file_time.Robert Vollmert2009-11-061-0/+2
|
* Splitting up stuff.cc.Robert Vollmert2009-10-301-163/+0
| | | | New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
* Split actors and env from externs.h.Robert Vollmert2009-10-211-1/+2
|
* fix 'DEBUG' macro usage consistencySteven Noonan2009-10-131-3/+3
| | | | | | | | | | | | | Sometimes we were doing #if DEBUG and others we were doing #ifdef DEBUG. If we mix both, we have problems: If the DEBUG macro isn't defined, the statement '#if DEBUG' doesn't really make sense logically, because 'DEBUG' has no value. And if we '#define DEBUG 0', then the '#ifdef DEBUG's become true statements. The easiest fix is to swap out the #ifs with #ifdefs. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Implement part of [2837033]: Randomize colors, resistances, and attack dolorous2009-09-181-0/+2
| | | | | | | | types/flavors for ugly things. They now use the ghost_demon struct, expanded to account for these characteristics. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10709 c06c8d41-db1a-0410-9941-cceddc491573
* Apply caotto's neat patch to make toadstools grow on or around corpses.j-p-e-g2009-06-291-0/+2
| | | | | | | | Obviously, this might affect food balance and Necromancy. Tweaks may be necessary, but overall this looks good. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10077 c06c8d41-db1a-0410-9941-cceddc491573
* Apply my recent commits to trunk.j-p-e-g2009-06-151-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9984 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