summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.h
Commit message (Collapse)AuthorAgeFilesLines
* Give move/copy_item_to_grid responsibility for hazardous terrainStefan O'Rear2009-12-291-2/+4
| | | | We now have much less duplication of logic, yay.
* Split up debug.ccMatthew Cline2009-11-061-0/+4
|
* Rename is_valid_item to item_def::is_valid.Vsevolod Kozlov2009-11-061-2/+0
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Remove "called from:" comments.Vsevolod Kozlov2009-11-031-41/+0
| | | | | | These were of questionable use and freshness. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Fix inconsistencies in gold-related messages.David Lawrence Ramsey2009-10-261-2/+2
|
* Apply jpeg's patches in [2876380] (automate Xom testing) and [2876688]David Lawrence Ramsey2009-10-111-0/+1
| | | | (new Xom effects), tweaked to fit into current trunk.
* Stack identified and unidentified ammo when picking it up. (mesilliac)Adam Borowski2009-10-071-2/+3
| | | | If you have a stack of +0 stones, identical stones will auto-id.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Allow vaults to request use of the acquirement code with "acquire ↵dshaligram2009-09-211-0/+1
| | | | | | <item_class>" or "acquire:<god> <item_class>" in item specs (due). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10765 c06c8d41-db1a-0410-9941-cceddc491573
* Fix bug #2510110: blood potions coagulating while in a monster's inventoryzelgadis2009-01-161-0/+2
| | | | | | | | | | | | | | was causing crashes. Get rid of drop_blood_potions_stack() and pick_up_blood_potions_stack(), replace with the more general merge_blood_potion_stacks() and merge_item_stacks(). When creating blood potions via debug command you can now specify how many turns away from coagulating/rotting it should be. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8471 c06c8d41-db1a-0410-9941-cceddc491573
* Greatly improve eating interface, as suggested in FRs 1923273 and 2018733.j-p-e-g2009-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you now press 'e' the following takes place: 1) If you can eat chunks, the game builds a list out of all chunks on the floor and in your inventory, sorted by age [1], and prompts you to eat them [2]. 2) If none are found, or you decline all of them you get prompted for non-chunk food items on the floor. 3) Prompt for non-chunk food in your inventory. 4) Open up the food menu of your inventory. Because of the way lua works, there's currently a problem that in the early stages (1-3) "q" (now also accepts Escape) will cause to skip ahead to the next stage rather than leaving the process entirely, which is of course less than optimal. I also added two new options [1] prefer_safe_chunks (defaults to true) which will offer clean chunks before contaminated ones, even if the latter happens to be older [2] easy_eat_chunks (defaults to false) which causes the prompting to be skipped for safe (i.e. clean) chunks, so you will automatically eat the oldest chunk that applies. This is ignored for undead characters. I also got rid of the outdated safechnk.lua and chnkdata.lua seeing how chunk effects are no longer spoily information. Added a new wizmode command: Ctrl-H, which allows you to set your character's hunger state. (Hopefully this will make Vampire testing easier.) Also fix 2488374: "Controlled Flight being named upon levitation even if its type is already known. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8282 c06c8d41-db1a-0410-9941-cceddc491573
* Fix spurious encumberance messages when combining ammo in inventory.haranp2008-12-131-4/+4
| | | | | | | Fixes 2354891. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7823 c06c8d41-db1a-0410-9941-cceddc491573
* Generalize swapping two pieces of terrain in function swap_terrain().zelgadis2008-12-111-1/+2
| | | | | | | | | | | | Encapsulate filling out a corpse object for a particular monster in fill_out_corpse(). Started work on "swap chaos weapon with weapon of victim" chaos effect, but am putting that off until there's some actor class virtual methods for changing inventory and equipment. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7807 c06c8d41-db1a-0410-9941-cceddc491573
* Savefile compatibility breakage from keeping track of which spells have beenzelgadis2008-12-041-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | seen. Implemented fixed-level randart spell books, which is all randart spellbooks as of now. All my attempts at sorting the spell list so that spells with the same schools group together have utterly failed. Got rid of the hackish "non-monster origin is stored in item.orig_monnum as (-origin - 2)" logic, replaced with the slightly less hackish "-origin". Added the two enumerations IT_SRC_START and IT_SRC_SHOP to do it. Also, origin_is_god_gift() and origin_is_acquirement() can retrieve the god/source of the item so that you don't have to do the negation and typecasting yourself. Added some new spell flags: * SPFLAG_BATTLE for non-conjuration spells which are still combat/battle related (branding spells and single school attack spells like "Pain"), * SPFLAG_CARD for spells which are card-type effects which don't show up in ordinary spellbooks (Tomb of Doroklohe and (I assume) Disintigrate) * SPFLAG_TESTING for spells which are only used for testing (Debugging Ray) * SPFLAG_DEVEL for spells that are still under development (Crush, Disrupt, and Detect Magic). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7742 c06c8d41-db1a-0410-9941-cceddc491573
* Fix bug 2298697: for dealing with weapons of returning which fail to return,zelgadis2008-11-221-1/+2
| | | | | | | | | | mons_throw() should have been using the mslot of the weapon, not weapon's mitm index. Introduces the new functions get_mon_equip_slot() and item_to_mslot(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7530 c06c8d41-db1a-0410-9941-cceddc491573
* Mark quivered items as equipped (interface only, not gameplay.)haranp2008-09-301-1/+1
| | | | | | | FR 2059687. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7071 c06c8d41-db1a-0410-9941-cceddc491573
* God-gifted (i.e. Nemelex-gifted) decks now ID after one card if it's notharanp2008-09-141-0/+1
| | | | | | | an oddity draw, since these decks are pure and there can be no confusion. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6931 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-5/+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
* Apply Yelve Yakut's patch (2020369) to list monsters and items in view.j-p-e-g2008-08-021-0/+6
| | | | | | | | | | | | | | The command to do so is xx, and you can select an entry for more details, which will be the database description ('v') for items and the more detailed 'x' description for monsters, which I think is more useful. What's still needed is some kind of sorting by, I guess, difficulty for monsters and respecting sort_menus for the items. Also, the item listing is not terribly useful at the moment but surely soon someone will think of a way to change that. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6755 c06c8d41-db1a-0410-9941-cceddc491573
* Massive overhaul to move towards coord_def().haranp2008-07-301-1/+1
| | | | | | | | | | This might have introduced some bugs: I now get intermittent crashes on startup (this might have to do with the changes to special_room.) Sorry about that - committing before I need to do any more big conflict resolutions. Fixes coming later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6732 c06c8d41-db1a-0410-9941-cceddc491573
* More cleanups and fixes.haranp2008-07-231-1/+1
| | | | 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-3/+3
| | | | | | | | 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
* Force quiver to attempt to use the exact same item in inventory (slotj-p-e-g2008-06-291-1/+2
| | | | | | | | and all, if it still exists) before accepting any item that happens to have the same properties (base + subtype, plusses etc.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6220 c06c8d41-db1a-0410-9941-cceddc491573
* Just for kicks, reuse monster property mname to name zombies/skeletonsj-p-e-g2008-05-301-0/+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
* Abyssal rune tedium reduction:dshaligram2008-05-261-3/+4
| | | | | | | | | - Abyssal rune generation chances rise with turns spent in the Abyss (in the current visit, not cumulative). - Lugonu followers get better abyssal rune odds faster. - Abyssal rune generation is stopped after one rune is picked up, re-enabled if rune is lost in the Abyss. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5267 c06c8d41-db1a-0410-9941-cceddc491573
* [1923246] Item pickup marker moves itself when the item it's guarding is ↵dshaligram2008-03-311-1/+1
| | | | | | apported. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3976 c06c8d41-db1a-0410-9941-cceddc491573
* Applying static method conventions to acr.cc and items.cc - this resultedj-p-e-g2008-03-251-11/+0
| | | | | | | | | | in removing several unused functions from the latter file. Renaming tiles options show_items and title_screen to tile_show_items and tile_title_screen. And as usual, cleaning up tiles code some more. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3876 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
* Moved handle_time and friends to effects.cc.dshaligram2007-12-301-15/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3157 c06c8d41-db1a-0410-9941-cceddc491573
* [1859486] Fixed skeletons weighing five times more than intended, burden ↵dshaligram2007-12-281-0/+1
| | | | | | state not changing when corpse rots to skeleton. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3132 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed bugs in greedy-explore's item ignore prompts.dshaligram2007-10-251-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2541 c06c8d41-db1a-0410-9941-cceddc491573
* [1779076] Greedy explore will ignore items (after prompting) if autopickup ↵dshaligram2007-10-241-0/+1
| | | | | | fails twice on the same spot, such as when inventory is full. If pickup_dropped = true (not likely if greedy explore is in use), greedy explore uses the old strategy of not budging until the item is picked up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2540 c06c8d41-db1a-0410-9941-cceddc491573
* [1813214] Trog should not gift the Wrath of Trog.dshaligram2007-10-151-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2472 c06c8d41-db1a-0410-9941-cceddc491573
* Cleanup: move_item_to_grid returns a bool to indicate that drop was successful.dshaligram2007-10-151-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2471 c06c8d41-db1a-0410-9941-cceddc491573
* Made Xom be smarter about being amused at losing/missing runes, andzelgadis2007-10-021-1/+5
| | | | | | | | | | | | | | | | | made Xom also be amused at runes being destroyed. Related changes: * Keep track of which items have ever been held by the player with ISFLAG_BEEN_IN_INV. * item_was_destroyed() is called when an item is destroyed (as in dropped in lava, not destroy_item() being called), and item_was_lost() is called if the item was lost (i.e., being left behind in the Abyss). * Keeps track of the number of runes that the character has collected, and how many have been left in the Halls of Zot. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2300 c06c8d41-db1a-0410-9941-cceddc491573
* This commit breaks save file compatability.zelgadis2007-09-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Lots of new things that amuse/stimulate Xom, and a few things which don't amuse him as much anymore. Among the new things is a corpse turning into a skeleton while butchering it; if this is too harsh to do just for Xom's amusement (previously turning into a skeleton while butchering was an ignored case and still produced chunks of flesh) it can be changed back. Also, if a Xom worshiper draws the Blank card, Xom makes it act like a Xom card, since a plain old Blank card is boring. Keep track of which branch the Orb is in, if the player isn't carrying it. Keep track of how/why the player ended up in a particular level type (Abyss, Pan, etc). Changed most "a distortion effect" cause strings for distortion caused tranlsocation miscast effects to something more specific. Added new wizard commands 'C' to curse or uncruse an item, and 'Ctrl-A' to re-generate the Abyss. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2256 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+12
| | | | | | | | | | | | | 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
* Implementing patch 1783079 (improved inscriptions) byj-p-e-g2007-09-021-0/+4
| | | | | | | zelgadis. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2044 c06c8d41-db1a-0410-9941-cceddc491573
* Experimental monster weapon swapping implementation. Allow monsters to usedshaligram2007-07-021-1/+2
| | | | | | | | | | throwing weapons (hand axes, spears, clubs, daggers). Give orcs and orc warriors a chance of being generated with throwing weapons (axes or spears). Throwing weapons are stacked in monster inventory, but unstack when dropped. We may want to consider fully stackable throwing weapons at some point. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1717 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented 1633998: summary line for large stacks, controlled by theharanp2007-06-301-1/+1
| | | | | | | | | | item_stack_summary_minimum option. Artefacts and glowing/runed items get yellow and white, respectively. Also, the entire item list on the floor will be displayed if it fits onto the screen (and not if there are five or less items, as before.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1699 c06c8d41-db1a-0410-9941-cceddc491573
* Nemelexites now require confirmation before offering runes, orbs, orharanp2007-05-151-0/+1
| | | | | | | | | objects marked with !p (or !*) on a non-altar square. Nothing gets offered unless the player OKs everything, so inscribing a couple of items in your stash with !p should be enough paranoia. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1476 c06c8d41-db1a-0410-9941-cceddc491573
* Made item_def::base_type into object_class_type, instead of unsigned char.haranp2007-04-261-1/+1
| | | | | | | | | | | Flushed out a few bugs as a result, specifically: 1. Some monsters (e.g., orcs) can now get blowguns as they were intended to (look at the makeitem.cc change); 2. Acquirement will no longer attempt to give you the books of minor magic if you've found them (look at the effects.cc change.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1374 c06c8d41-db1a-0410-9941-cceddc491573
* Various cleanups. Also fixed bug 1703500, inventory letters appearing twiceharanp2007-04-251-0/+2
| | | | | | | until save/restore. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1371 c06c8d41-db1a-0410-9941-cceddc491573
* Suppress doubled autopickup messages.dshaligram2007-03-111-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1014 c06c8d41-db1a-0410-9941-cceddc491573
* [1632207] Dropping items on an altar while praying will offer those items todshaligram2007-01-101-1/+1
| | | | | | | | $DEITY. If it's a multidrop, only the last item will trigger the altar-offer to avoid spammy messages. Interrupted multidrop will not do the offer, nor will the offer happen if prayer ends before the last item is dropped. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@821 c06c8d41-db1a-0410-9941-cceddc491573
* Fix for bug 1622129, safe_autopickup check was happening before monsterharanp2006-12-291-0/+3
| | | | | | | | | | | | | movement. Autopickup is no longer a delay but rather receives special handling (ouch, should be done better.) This necessitated removing a safety assert() in delay.cc. Also, you now get two messages when autopickup kicks in: You see 2 scrolls of identify here. C - 3 scrolls of identify I consider this...a feature. Right. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@729 c06c8d41-db1a-0410-9941-cceddc491573
* Try to merge items before reporting explore stop messages.dshaligram2006-12-121-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@620 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed bug where Pandemonium demonlords did not get their rightful runesdshaligram2006-12-081-0/+2
| | | | | | | | | (Cerebov and company) - bug was introduced circa 0.1.3. [1610237] Vaults can request specific items using ITEM: declarations and the item selectors defghijk. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@596 c06c8d41-db1a-0410-9941-cceddc491573
* [1597293] Preliminary greedy-explore, parked on Ctrl-I. We can (re)move it ↵dshaligram2006-12-011-0/+3
| | | | | | | | if necessary. Stash-tracking is no longer #ifdef conditionalised. I'm not aware of anybody who compiles without it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@538 c06c8d41-db1a-0410-9941-cceddc491573
* Merged stone_soup r15:451 into trunk.dshaligram2006-11-221-6/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573