summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Modify menu_colour_item_prefix() to also handle stuff like contaminatedj-p-e-g2008-05-311-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or poisonous chunks. Throw out all those special cases in food_colouring.txt and replace them with logic. I sure hope I got all special cases, but if not they should be easy enough to add. The functions are currently all in food.cc but they could easily be moved over to clua.cc and adapted accordingly if needed. New prefix shortcuts: * inedible (full herbi/carnivorousness, rotten food for non-saprovores) * preferred (respects foovorousness, rotten for ghouls, royal jelly for everyone) * poisonous * contaminated * mutagenic * rot-inducing (I also added one-liners to the descriptions of chunks of those types.) The changes apply to all menu types, but they don't handle messages. This is problematic in that you'd have to check the pickup menu to see which corpses are worth butchering, but I'm still against keeping all those manual checks for (currently) poisonous/mutagenic/... corpses, esp. as information like this can date quickly. Instead the butchering interface should be improved to somehow handle that, possibly by overriding the prompt colour with the specified colour if necessary. I don't think there are any other cases where this is important. Also add a prefix for equipped items and artefacts, so they can be easily checked for as well. I really think the identified/unidentified prefix should become default (and the option removed) - this allows for easy differentiation between identified and non-identified artefacts. The "known" prefix (for known wand charges or enchantments) is a bit less interesting but wouldn't hurt any (I think). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5373 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more minor cosmetic fixes.dolorous2008-05-301-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5350 c06c8d41-db1a-0410-9941-cceddc491573
* When drawing cards from decks in your inventory, make sure only decks dolorous2008-05-071-0/+3
| | | | | | | are offered as choices. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4914 c06c8d41-db1a-0410-9941-cceddc491573
* Fix sort_menus option to let "any" override the default "pickup" settingj-p-e-g2008-04-281-1/+1
| | | | | | | | | | | | | and still use any as "anything but those already defined" when needed. (If that makes any sense.) Remove need for prayer for Vehumet's prayer boost effects. I admit I'm not entirely convinced of this change myself, but currently the problem is that there's hardly ever any reason *not* to pray. What we'd need instead are sensible drawbacks... git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4757 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes to compile with Visual C++. Moved direct.cc and direct.h to directn.* ↵dshaligram2008-04-191-1/+1
| | | | | | to avoid conflict with VC++ direct.h header. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4390 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1945337: Vampires getting carnivorous/herbivorous mutations.j-p-e-g2008-04-181-2/+3
| | | | | | | | Fix 1944345: Dropping worn/wielded items while Berserk. Fix 1945347: Drinking from fountans while Berserk. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4326 c06c8d41-db1a-0410-9941-cceddc491573
* Another modification of autotargetting submerged monsters, based offj-p-e-g2008-04-171-0/+1
| | | | | | | | | | | | | | | | BR 1935715. * Targeting a square with a known submerged monster ("strange disturbance" description) always enforces '!' rather than '.' * Submerged monsters only get targetted if there are no other more viable targets (dangerous monsters, really) in sight. The latter uses a heavily modified i_feel_safe() that now draws on get_playervisible_monsters(), which got numerous new parameters to cover all possibilities. :p git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4314 c06c8d41-db1a-0410-9941-cceddc491573
* Allow specific colouring of pickup menu (as opposed to generalj-p-e-g2008-04-171-3/+8
| | | | | | | inventory). To do so, use "pickup:colour:pattern". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4287 c06c8d41-db1a-0410-9941-cceddc491573
* git-svn-id: ↵j-p-e-g2008-04-171-0/+2
| | | | https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4285 c06c8d41-db1a-0410-9941-cceddc491573
* Allow vampires to mutate when Satiated or higher, and make non-physicalj-p-e-g2008-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | mutations only apply at these hunger levels, too. Differentiated mutations into physical (affecting a character's appearance and stuff: scales, hooves, wings, ...) and internal (resistances etc.). I guess this is what people usually refer to as "cosmetic", which I think is an inaccurate description since it makes it sound like they were completely superficial and had no real effect. Here's a list of arbitrarily chosen "physical" mutations: * tough skin, all scales, and fur * strong/clever/agile, and weak/dopey/clumsy * deformed * strong but stiff, and flexible but weak * frail, and robust * claws, fangs, hooves, talons, and horns * stinger, wings * blue/green marks Mutations currently not applying are still listed on the 'A' screen, though in darkgrey and in (brackets). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4246 c06c8d41-db1a-0410-9941-cceddc491573
* Another code cleanup.j-p-e-g2008-04-151-21/+25
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4244 c06c8d41-db1a-0410-9941-cceddc491573
* Vampire "eating" interface:j-p-e-g2008-04-151-34/+35
| | | | | | | Only offer corpses (inventory or floor) that actually contain blood. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4243 c06c8d41-db1a-0410-9941-cceddc491573
* Yet Another Code Cleanup, this time concentrating on libx11.cc and j-p-e-g2008-04-011-3/+3
| | | | | | | view.cc. (Yes, this is semi-random.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4032 c06c8d41-db1a-0410-9941-cceddc491573
* Modify manual and readme to really list the new doc names, and key j-p-e-g2008-03-311-3/+11
| | | | | | | | | | | | | | | | | settings. Add vampires to manual (still needs reference to aptitudes etc.!) and reorder classes according to the new job order. Re-introduce 't' as a synonym for 'f' in targetting, but don't document it anymore. (It's only in convenience to older players, anyway.) Also, change default wand inscription from !z to !Z, but use a hack to check for either. Oh, and restrict Blood Evaporate effect to Stinking cloud, Fire and Steam (the latter two like !Rage). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3981 c06c8d41-db1a-0410-9941-cceddc491573
* coding convention for static functions.pauldubois2008-03-251-24/+24
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3871 c06c8d41-db1a-0410-9941-cceddc491573
* Remove vestiges of ... what was it again? OPER_THROW.pauldubois2008-03-251-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3870 c06c8d41-db1a-0410-9941-cceddc491573
* Add a weapon enchantment blessing that will enchant a monster's weapon dolorous2008-03-231-1/+1
| | | | | | | | | | | | | | | by two points (either this or armor enchantment blessing can occur, with 5% rarity). Whether to-hit or to-damage is chosen is random. Split handling of weapon enchantment into enchant_weapon() for the generic item routines, and handle_enchant_weapon() for the player-specific routines. Furthermore, make enchant_weapon() and enchant_armour() more similar in terms of structure. Also, in bless_follower(), store the blessing description and monster name in std::strings instead of const char*'s. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3839 c06c8d41-db1a-0410-9941-cceddc491573
* Make Zin dislike when the player takes an action that makes an alreadyj-p-e-g2008-03-211-1/+1
| | | | | | | | | | | | | existing mutagenic glow stronger (piety loss, no penalty). At the same time go easier on the "eat souled being" misbehaviour: increased piety loss, but give penance only for eating very intelligent monsters, so that eating goblins and the like is an option again. (Cannibalism is checked first, and has worse effects.) Also fix restriction for items offered for ?recharging. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3789 c06c8d41-db1a-0410-9941-cceddc491573
* Some yesno standardisation. Some yesno prompts had a trailing space, some ↵pauldubois2008-03-171-1/+1
| | | | | | | | | | | | didn't. Now all of them do (but it's applied in yesno(), so it's easy to get rid of). Also, "anyways" -> "anyway". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3682 c06c8d41-db1a-0410-9941-cceddc491573
* FR [ 1914596 ] Inventory header linepauldubois2008-03-161-9/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3665 c06c8d41-db1a-0410-9941-cceddc491573
* Fix new firing interface to also apply when selecting items via tile inventory.j-p-e-g2008-03-121-0/+32
| | | | | | | | | | | | | | | | | | | | | (This will also change the quiver, so that tile players no longer need to repeatedly choose the same stack of darts to fire: ff will work nicely.) Implement first part of FR 1911866: merging W/T, R/P The existing option "easy_unequip" now also allows direct choice of which armour to take off from the 'W' menu, and same for jewellery for 'P'. Warning inscriptions are respected. Now we only need to add a new sorting option sort_equipped that takes care of equipped stuff being listed first in the inventory. Last time I tried something like this (chunk sorting by age) I failed miserably, so I'm making no promises. Also tweak my recent {tried} modification to only apply to jewellery since for some reasons all unidentified randart weapons show {tried} where jewellery is really picky about which randarts have been tried and which haven't. Probably still needs fixing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3607 c06c8d41-db1a-0410-9941-cceddc491573
* Further improvements of vampires:j-p-e-g2008-03-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Quaffing and eating * They now get full effect of potions unless hungry (er, thirsty) or worse, in which case the effect gets halved as before. * Potions of blood heal on the level of heal wounds or healing, depending on hunger state. Healing always heals rotting and removes confusion - the chances involved were just frustrating to players. * Draining corpses has the same nutrition value as eating the (random) amount of chunks you get out of dissecting, but takes longer (and all at once, so draining your corpses in the middle of a battle is extremely risky). I guess this is still too good (when do you ever get to eat all chunks you get out of, say, an ogre or centaur?) so will have to be nerfed. 2) Resistances Resistances depend more strongly on hunger states now. Vampires are always poison resistant and can always see invisible. Additionally, they gain * rCold 1 at Hungry or worse, and rCold 2 at Near Starving or worse (The latter comes with susceptibility to fire.) * life protection 1 when satiated, 2 when hungry or worse, and 3 when near starving or worse * At starving they also get torment res. * Hungry vampires and vampires in bat form are stealthier, and starving vampires are even more stealthy. As before, they get the Necromancy boost (like Mummies do) at xl 13 and 26. Also, vampires can now cast spells while starving, but suffer a failure increase akin to that of Blade Hands. (I've no idea what these numbers actually mean, so this will most likely have to be changed as well.) Updated tables.txt. Still TODO: * Add special biting attack for successful stabbing. * Add distilling blood ability, and possibly distinguish between old and new potions (new food type, maybe). * Allow vampires to mutate, but these mutations to only take effect when Full, Very Full or Engorged. * Update manual. Apart from that, they are ready for playtesting once again. As always, feedback would be much appreciated. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3528 c06c8d41-db1a-0410-9941-cceddc491573
* [FR 1903593] Change identification process of j-p-e-g2008-03-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | ?recharging, ?enchant armour and ?identify. If you read one of these scrolls and the type isn't known yet you are prompted with "Modify which item?" (better message needed!) and get to choose from the entire inventory. If the chosen item can be usefully "modified" by the scroll (unID'd item for identify, wand for recharging, enchantable armour for EA) the usual effect takes place and the scroll is identified. (Reading other scrolls of the same type will then only offer a more sensible selection of items.) Otherwise, nothing happens. Further, recharging and enchant armour now allow direct choice of the item in question, and it doesn't even have to be wielded or worn. I think this change actually makes the id game more interesting and also improves the interface. Gameplay might dictate that we reintroduce the "armour needs to be worn" rule, but that remains to be seen until after some more playtesting. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3514 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1905715: Print "nothing appears to happen" when zapping /diggingj-p-e-g2008-03-031-0/+3
| | | | | | | | | without effect, same as for enchantment wands. Fix 1905740: Only list actual spellbooks for memorise prompt. Also: s/memorize/memorise git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3508 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles!ennewalker2008-01-051-0/+32
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573
* Added an MF_SHOW_PAGENUMBERS flag to Menu, which will show "(page X of Y)"haranp2007-12-111-2/+2
| | | | | | | | | as part of the title. This can get a bit confusing when scrolling using up and down (as opposed to page-up/page-down.) Currently only used for select_items(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3047 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed !R inscription not confirming remove when only one item is worn ↵dshaligram2007-10-271-2/+28
| | | | | | (jarpiain). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2618 c06c8d41-db1a-0410-9941-cceddc491573
* [1800206] Ghoul food cleanup (dolorous).dshaligram2007-10-211-6/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2504 c06c8d41-db1a-0410-9941-cceddc491573
* [1807611] Inventory menus show weight of stack, not one item in stack.dshaligram2007-10-111-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2421 c06c8d41-db1a-0410-9941-cceddc491573
* Fix wording for translucent rock walls (1798932).j-p-e-g2007-09-261-7/+11
| | | | | | | | | | Change freshness calculation for chunk sorting: all chunks now sorted oldest to freshest, listing rotten last for non-Saprovores. Small comment fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2221 c06c8d41-db1a-0410-9941-cceddc491573
* Added new commands "re-do previous command" (bound to `) and "repeatzelgadis2007-09-191-0/+1
| | | | | | | | | | next command" (bound to 0). Though this is just an interface change, it changes code in the core input processing function (input() in acr.cc), and also messes around with the input buffer, so it could probably do with more testing before merging it into the 0.3 branch. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2137 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+3
| | | | | | | | | | | | | 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
* Applying patches 1793701 (dolorous), 1793683 and 1793679 j-p-e-g2007-09-131-2/+6
| | | | | | | | | (both zelgadis), and 1793603 (ennewalker). Also default yesno() when choosing a religion to 'no'. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2080 c06c8d41-db1a-0410-9941-cceddc491573
* A few general fixes:j-p-e-g2007-09-101-1/+4
| | | | | | | | | Fix 1791185: Memory overrun. Patch provided by ennewalker. Fix 1789803. Again, patch by ennewalker. Fix 1790486: Throwing nets and launchers. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2063 c06c8d41-db1a-0410-9941-cceddc491573
* Fixing more bugs.j-p-e-g2007-09-051-2/+58
| | | | | | | | | | | | 1788159: Mummy priests don't get potions either. 1787377: Lugonu's Banish doesn't work on self 1786808: More feedback for travelling. 1784235: Randomized staff descriptions. 1774996: /random effect autoIDs for fireball 1768803: Extended inscription warning use. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2057 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented patch 1773718 (improved wizard commands) andj-p-e-g2007-09-021-7/+95
| | | | | | | patch 1783003 (ímproved menu sorting), both by zelgadis. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2041 c06c8d41-db1a-0410-9941-cceddc491573
* Several bugfixes.j-p-e-g2007-08-301-1/+8
| | | | | | | | | | | | | | | | | | In no particular order: + Beogh shouldn't care about you attacking non-orc friends. + Mummies don't get "Food" listed as ability costs. + corrected order of invis flickering + modified (and tidied) you_can_wear checks and output + added ']' command to list currently worn equipment (inv) + wielded cursed items can no longer be fired + Wanderers no longer get inappropriate armour + Fixed "bad item" message for confirm-inscribed items + copied "Discharge" to "Static Discharge" in spells.txt (Maybe we should remove the first, but I was unsure about that, so I left it for now.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2035 c06c8d41-db1a-0410-9941-cceddc491573
* Yet another tutorial updatej-p-e-g2007-08-161-7/+12
| | | | | | | ... and Sif Muna finally gets those other titles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2007 c06c8d41-db1a-0410-9941-cceddc491573
* Inscribing now only works for items in inventory.j-p-e-g2007-08-141-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2002 c06c8d41-db1a-0410-9941-cceddc491573
* Oops, missed s/jewelry/jewellery/ when reverting other changes.dshaligram2007-08-091-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1984 c06c8d41-db1a-0410-9941-cceddc491573
* Drop and pickup menus now support Ctrl-F to select all items matching a regex.haranp2007-07-021-2/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1716 c06c8d41-db1a-0410-9941-cceddc491573
* Push item weights to the right of the inventory menu.dshaligram2007-06-281-1/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1683 c06c8d41-db1a-0410-9941-cceddc491573
* You can now examine items from the inventory view.haranp2007-06-251-2/+10
| | | | | | | Fixed a bug with item_type_known (oops.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1649 c06c8d41-db1a-0410-9941-cceddc491573
* Fix for 1739988: fully_identified() was mishandling known types.haranp2007-06-251-0/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1645 c06c8d41-db1a-0410-9941-cceddc491573
* sort_menus now allows the user to choose what menus to sort, and how todshaligram2007-05-311-7/+155
| | | | | | sort items, at the cost of obfuscating the sort_menus option massively. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1494 c06c8d41-db1a-0410-9941-cceddc491573
* Refix for 1719721: what I thought was a simple fix in InvEntry turnedharanp2007-05-171-1/+10
| | | | | | | | out to be a bug...We might want a 'bool inv_prefix' argument to name(), or an appropriate description_type. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1479 c06c8d41-db1a-0410-9941-cceddc491573
* Minor cleanups.haranp2007-05-151-23/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1477 c06c8d41-db1a-0410-9941-cceddc491573
* Nemelexites now require confirmation before offering runes, orbs, orharanp2007-05-151-2/+2
| | | | | | | | | 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
* Implemented Nemelex's 'sneak peek' ability.haranp2007-05-111-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1453 c06c8d41-db1a-0410-9941-cceddc491573
* Type safety, cast cleanups, etc.haranp2007-05-011-8/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1401 c06c8d41-db1a-0410-9941-cceddc491573