summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
Commit message (Collapse)AuthorAgeFilesLines
* Split up debug.ccMatthew Cline2009-11-061-0/+541
|
* Rename is_valid_item to item_def::is_valid.Vsevolod Kozlov2009-11-061-35/+35
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Split get_symbol from view.cc.Robert Vollmert2009-11-061-0/+1
|
* Split up view.cc.Robert Vollmert2009-11-041-0/+1
|
* Split game_options from externs.h into options.h.Robert Vollmert2009-11-041-0/+1
|
* Auto-update shopping-list when new items seenMatthew Cline2009-10-311-0/+2
| | | | | | Automatically update the shopping list if you see the same item for less cost in another shop, or if you get an item identical to one on the shopping list (currently only applies to jewellery, books and staves).
* FR 2839627: notify when player has enough goldMatthew Cline2009-10-291-1/+1
| | | | | | The basics of a wish-list/shopping-list. While in a shop the shopping-list can be modified, and the player is notified as soon as they have enough money to buy things on the shopping-list.
* Fix inconsistencies in gold-related messages.David Lawrence Ramsey2009-10-261-6/+6
|
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Naming consistency.Robert Vollmert2009-10-171-4/+4
| | | | | Mostly rename functions from terrain.h that accept features of typ dgn_feature_type from grid_is_* to feat_is_*.
* Remove deprecated map glyphs: S, H, Z.Adam Borowski2009-10-141-1/+1
|
* fix 'DEBUG' macro usage consistencySteven Noonan2009-10-131-1/+1
| | | | | | | | | | | | | 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>
* Apply jpeg's patches in [2876380] (automate Xom testing) and [2876688]David Lawrence Ramsey2009-10-111-4/+8
| | | | (new Xom effects), tweaked to fit into current trunk.
* project-wide: implement use of platform.h detection macrosSteven Noonan2009-10-101-1/+1
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Remove a lot of unneccessary includes.Robert Vollmert2009-10-091-6/+0
| | | | | | | The console version still compiles on Linux; both console and tiles version compile in OS X. I haven't been able to test the DOS and Windows compiles -- please fix or tell me about any errors that show up.
* Stack identified and unidentified ammo when picking it up. (mesilliac)Adam Borowski2009-10-071-5/+17
| | | | 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/+6
| | | | | | <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 [2827921]: Remove spurious "empty-handed" message.dolorous2009-07-271-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10435 c06c8d41-db1a-0410-9941-cceddc491573
* ATTR_RUNES_IN_ZOT is no longer needed. I couldn't decide if I shouldj-p-e-g2009-07-191-20/+1
| | | | | | | | | simply remove it or leave it for the weak save file compatibility we try to maintain within trunk, so I left its definition in enum.h. Also, change Beogh's altar tile to include the orcish idol. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10305 c06c8d41-db1a-0410-9941-cceddc491573
* First part of the merger of fixed artefacts into unrandom artefactszelgadis2009-06-251-32/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (further changes will be much smaller). Breaks savefile compatibility, and bumps the major savefile version up to 6. Some changes made to some tiles files, but it hasn't been tested with a tiles build. Overview of changes: * Unrand artefacts are now defined in art-data.txt and is turned into C code via util/art-data.pl. This has the dual advantage of being more readable by humans, and that if the unrand data structure changes then you can just change util/art-data.pl and regenerate the C code rather than having to change some 70 different C structs by hand. * util/art-data.pl automatically updates NO_UNRANDARTS, and also automatically generates an enumeration of all the unrands which are equal to their item.special field. * randart.cc and randart.h have been renamed to artefact.cc and artefact.h, since the files covers all types of artefacts, and the differences between randarts, unrandarts and (former) fixed arts have been minimized since the terms were introduced. Also renamed unrand.h to art-data.h * The brands and resistances of former fixed arts are now handled via artefact properties, but the rest of their special behaviours are still hardcoded. * Unrandarts are now distinguished between normal and "special", with the special ones currently just being identical to the list of the formed fixed arts. Special unrandarts are randomly generated less often than normal unrandarts, can be generated in the Abyss if they've been lost, can't be picked up by monsters, and can't be affected by Tukima's Dance. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10035 c06c8d41-db1a-0410-9941-cceddc491573
* * Apply r9909 to trunk.j-p-e-g2009-06-071-1/+2
| | | | | | | | | | * Treat granite statues/orcish ideas as transparent walls for clear_walls_block in losight(). Fixes BR 2802483. Please run some tests before porting to branch in case it breaks reaching or summoning or something like that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9910 c06c8d41-db1a-0410-9941-cceddc491573
* Use wield_weapon(-) instead of unwield_item() when dropping/throwing aj-p-e-g2009-05-121-1/+1
| | | | | | | wielded weapon, so inscriptions are respected. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9760 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2009-04-281-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9700 c06c8d41-db1a-0410-9941-cceddc491573
* Change Options.autopickup_on from boolean to 3-state: 1 (autopick up), 0j-p-e-g2009-04-241-1/+1
| | | | | | | | (autopickup off), -1 (autopickup turned off automatically). Only in the latter case does killing an invisible monster turn autopickup (back) on. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9691 c06c8d41-db1a-0410-9941-cceddc491573
* * Tweak Xom's ideas about what makes a funny or boring death.j-p-e-g2009-04-221-23/+23
| | | | | | | | | * Add another option (*sigh*) covering whether W=T and P=R. (Defaults to false.) * Various spacing and comment fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9675 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix Xom's piety wrapping around from 0 -> 255.j-p-e-g2009-04-181-3/+6
| | | | | | | | | | | | | | | | * Fix Xom piety 100 (initial state) favouring bad effects. * Limit tension bonus for good effects to 199. * Add penalty for tension 0, so bad effects become more likely without tension. * Revert order of Xom's amusement to actually match the amusement gain. (Was getting "roars with laughter" for gain of 2, etc.) * Add damage shaving to Deep Dwarf ghosts. * Add 'o' to pickup list commands -> stop prompting, start autoexplore. * Default menu_colour_item_class to true in initfile.cc. * Allow autopickup of chunks in Lich form. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9634 c06c8d41-db1a-0410-9941-cceddc491573
* [2758242] Fixing segfault during debug_mons_scan due to an mprf not matching ↵ennewalker2009-04-181-2/+25
| | | | | | its format string with its var args. Also, fixing clone function from chaos brand that was causing this where cloned items in monster inventories weren't setting their link to be part of the new monster's inventory. Refactoring monster holding functions into item_def, where they probably should be. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9618 c06c8d41-db1a-0410-9941-cceddc491573
* * Use menu colours (rather than message colours) for item announcementsj-p-e-g2009-03-251-10/+8
| | | | | | | | | | | | and the like. * Fix 'V' if there are more than 52 monsters/items in the list. * Make Xom act more often, with the probability depending strongly on tension. Also tweak a few action probabilities according to tension, so that e.g. summons are more likely for high tension. * Fix monsters being created with large quantities of curare needles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9546 c06c8d41-db1a-0410-9941-cceddc491573
* * Allow viewing of card descriptions from Triple Draw and Stack Deck.j-p-e-g2009-03-231-7/+11
| | | | | | | | | | * Sort items in 'V' screen according to pickup menu sort order. * Name Xom's randart book gifts more randomly. * Colour items seen by 'x' with message colour tags and same for pickup messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9541 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles:j-p-e-g2009-03-081-1/+7
| | | | | | | | | | | | * (Re?)allow mouseclicks in menus (Tiles, only): L-click = scroll down, R-click = Esc * Clear last_clicked_grid if you move your mouse. * When entering a new level, draw the map before handling monster shouts. Enne, please review the changes. Thanks! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9386 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix wizmode targetting commands not flushing messages correctly.j-p-e-g2009-03-071-1/+2
| | | | | | | | | | | | | * Fix Sif Muna's randart book gifts never containing the Vehumet/Kiku special spells, as was originally intended. (Books found elsewhere will never contain the spells.) * In the highly unlikely case the player already has seen all spells don't crash when attempting to gift a book. Instead, simply make the acquirement fail, but be quiet about "the demon of the infinite void" if it was instigated by Sif Muna. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9368 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles again:j-p-e-g2009-03-061-6/+3
| | | | | | | | | | | * Store index of last cell clicked on in inventory and suppress item description if you just clicked on it, so you can see the messages describing whatever you just did (should fix 2660578). * Allow right-click as a synonym for '!' when toggling ^, A, m. * Let shift left-click on avatar standing on altar = prayer. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9343 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2644366]: place a space between prefixes and the item name.haranp2009-02-281-1/+1
| | | | | | | | Also, fix the documentation which used to say that the prefixes are comma-separated (they're not.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9294 c06c8d41-db1a-0410-9941-cceddc491573
* Call flush_prev_message() before getch(), cancelable_get_line() andj-p-e-g2009-02-281-3/+3
| | | | | | | mpr_formatted_output(). Fixes 2647846. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9275 c06c8d41-db1a-0410-9941-cceddc491573
* Remove all traces of TRAN_AIR and TRAN_SERPENT_OF_HELL, the latterj-p-e-g2009-02-271-20/+0
| | | | | | | together with the corresponding unused ability. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9244 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up acquirement subtype determination code. (Another goto bites the dust.)haranp2009-02-041-1/+1
| | | | | | | Be a bit more generous regarding books for Evoc and Invoc types. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8890 c06c8d41-db1a-0410-9941-cceddc491573
* Implement [2383585]: picking up part of a stack (e.g. 3 of 6 breadharanp2009-01-251-0/+8
| | | | | | | | rations) marks the rest of the stack as dropped, so that greedy autoexplore and autopickup won't try to take it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8751 c06c8d41-db1a-0410-9941-cceddc491573
* Following dolorous's comments on 2488905, use random_in_bounds() insteadharanp2009-01-251-1/+1
| | | | | | | | | of manual randomization. Also fixes the bug where this was biased towards the bottom-right section of the map. Unfortunately, it doesn't fix 2488905. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8750 c06c8d41-db1a-0410-9941-cceddc491573
* Attempting to move or copy and item to a out-of-bounds position on the gridzelgadis2009-01-201-0/+4
| | | | | | | will now assert. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8627 c06c8d41-db1a-0410-9941-cceddc491573
* Fix assertion when buying items from shops.zelgadis2009-01-201-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8622 c06c8d41-db1a-0410-9941-cceddc491573
* Remove now-unused redraw_gold flag.dolorous2009-01-201-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8618 c06c8d41-db1a-0410-9941-cceddc491573
* Fix bug #2510110: blood potions coagulating while in a monster's inventoryzelgadis2009-01-161-8/+15
| | | | | | | | | | | | | | 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
* * Add speech for Dissolution, courtesy of David.j-p-e-g2009-01-121-3/+1
| | | | | | | * Change Nessos stats to that of centaur warrior. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8431 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix non-tile compilation as suggested by Enne.j-p-e-g2009-01-121-2/+2
| | | | | | | * Don't give half xp when pacifying summoned monsters (BR 2501795). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8429 c06c8d41-db1a-0410-9941-cceddc491573
* [2499489] Allowing mouse clicks for picking up items and for --more-- prompts.ennewalker2009-01-121-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8421 c06c8d41-db1a-0410-9941-cceddc491573
* Code cleanup for ignite_poison(), inspired by [2204223].haranp2009-01-081-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8325 c06c8d41-db1a-0410-9941-cceddc491573
* Make the position of monster held items (-2, -2) rather than (0, 0), so thatzelgadis2009-01-081-26/+36
| | | | | | | | | | | | | | | any valid item in mitm[] which is still at (0, 0) by the time debug_item_scan() is called must be buggy. Also set the link fields of monster held items to NON_ITEM + 1 + monster_index, so that it's easy to tell which monster is holding any given item; this is used in debug_mons_scan() and monsters::pickup() to do some sanity checking of monster inventory. I've tried to thoroughly test this, but there might still be some bugs left. Breaks savefile compatibility (or, rather, will lead to endless error messages if you use an old save file). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8322 c06c8d41-db1a-0410-9941-cceddc491573
* Yet another fix to the arena win/loss/tie logic.zelgadis2009-01-071-1/+15
| | | | | | | | | | | | | | | | | | | | | | | During arena mode don't reserve any of mitm[] when creating new items, and when mitm[] fills up call arena_cull_items() instead of _cull_items(), since in arena mode we can cull via how boring/interesting the items are rather than having to consider game balance and fairness to the player. Allow the arena to veto monster placement, rather than culling them immediately after they're placed. New arena tags: * "no_bands" prevents band members from being placed. * "move_spawners" teleports test spawners every turn to spread their summons randomly over the arena. * "ban_glyphs:" lists a set of text glyphs of types of monsters which shouldn't be allowed in the arena. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8300 c06c8d41-db1a-0410-9941-cceddc491573
* Greatly improve eating interface, as suggested in FRs 1923273 and 2018733.j-p-e-g2009-01-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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