summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
Commit message (Collapse)AuthorAgeFilesLines
* Apply more commits into 0.4 branch, again mostly by Haran:j-p-e-g2008-12-081-1/+6
| | | | | | | | | | | | | | | | | 6950, 6954, 6959, 6962, 6963, 6965, 6968, 6970 (partly), 6997, 6998, 7001, 7061, 7065, 7071, 7132 (partly), 7174, 7186, 7213, 7233, 7268, 7268, 7293, 7319, 7339, 7358, 7393 (partly) * Tweak a few monster flags. * Fix autoswapping jewellery taking longer than manual swapping. * Fix crash when attempting to create nonexisting monster in wizmode. * Make ego armour descriptions follow abbreviation guidelines. * Fixed buggy monster movement away from the player. * Disabled traps in the Abyss. * Fixed a few other minor bugs, and improves messaging. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7788 c06c8d41-db1a-0410-9941-cceddc491573
* Backport r6743, 6750, 6753, 6771, 6772, 6790 to 0.4.j-p-e-g2008-08-071-1/+2
| | | | | | | | | | | | | | * Fix 2033984: Monsters being created with both a shield and a 2-hander. * FR 2026227: Make $ list current gold. * Fix assertion failure upon high-scoring death. * Fix 2037146: Make hill giants use MONUSE_STARTING_EQUIPMENT. * Fix 2036429: better spacing on ^ screen. * Replace "Level:" with "Place:" in the HUD. Also start on 0.4.4 change log. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6791 c06c8d41-db1a-0410-9941-cceddc491573
* Apply the recent commits to branch, update the version and change log toj-p-e-g2008-07-311-2/+9
| | | | | | | 0.4.3. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6740 c06c8d41-db1a-0410-9941-cceddc491573
* Merge r6724, Bug 2031257 fix.zelgadis2008-07-301-0/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6725 c06c8d41-db1a-0410-9941-cceddc491573
* Apply commit r6569 to 0.4 trunk.j-p-e-g2008-07-151-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6570 c06c8d41-db1a-0410-9941-cceddc491573
* Apply commits r6564 and r6567 to 0.4 trunk.j-p-e-g2008-07-151-1/+2
| | | | | | | | Also start on changes.stone_soup for 0.4.1. The mapmark.lua fixes are not actually in 0.4 trunk, are they? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6568 c06c8d41-db1a-0410-9941-cceddc491573
* Apply commit 6539 to 0.4.j-p-e-g2008-07-131-0/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6540 c06c8d41-db1a-0410-9941-cceddc491573
* When reading a "modification scroll" (prompt: Use on which item?)j-p-e-g2008-06-301-23/+27
| | | | | | | | | | | don't list the scroll you just read as one to use it on. This fixes the ugly issue where the player, forgetting the slot of the scroll just read, uses identify on itself, thereby wasting the scroll. For enchant armour and recharging it's a moot point as they don't work on scrolls anyway, but this way you can't figure out the subtype. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6251 c06c8d41-db1a-0410-9941-cceddc491573
* Use "!Q" inscription to force a prompt before quivering an item instead ofzelgadis2008-06-271-0/+1
| | | | | | | | | | "!f". Update docs on addition of "!Q", on "!z" changing to "!Z" and "!E" changing to "!v", and on "=f" preventing an item from being auto-quivered. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6163 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-18/+17
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Tweak quiver command some more (allow clearing quiver).j-p-e-g2008-06-241-4/+6
| | | | | | | Update documentation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6113 c06c8d41-db1a-0410-9941-cceddc491573
* Modify quiver to only quiver ammunition explicitly chosen by the playerj-p-e-g2008-06-241-1/+25
| | | | | | | | | | | | (via (,) or i, or by the new quivering command). Ammo that just happens to come next in the fire order is not quivered anymore even if you continue firing. Add a new quiver command on Q, and while I was at it, restrict the items offered when firing (fi) or quivering to actual throwables. (This was a long outstanding FR.) I think that's it... git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6112 c06c8d41-db1a-0410-9941-cceddc491573
* Change quiver output to that of the next item actually fired. Currentlyj-p-e-g2008-06-241-2/+2
| | | | | | | updates correctly on firing and dropping quivered items. May be buggy. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6107 c06c8d41-db1a-0410-9941-cceddc491573
* FR 1993535: If asking the user for an item, and the player has none of thezelgadis2008-06-241-48/+84
| | | | | | | | type of item requested, then mpr() the message about it, rather than bringing up an empty menu with the message being the menu's title. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6105 c06c8d41-db1a-0410-9941-cceddc491573
* More specific messages than just "You aren't carrying any such object."zelgadis2008-06-241-0/+28
| | | | | | | if the user doesn't have any of the type of item being selected. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6103 c06c8d41-db1a-0410-9941-cceddc491573
* Move pickup_butcher_tool.txt into (the recently freed) pickup.lua, j-p-e-g2008-06-101-5/+8
| | | | | | | re-enable it (whoops) and clean up its code. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5698 c06c8d41-db1a-0410-9941-cceddc491573
* Fix zombies of wrong habitat on land. It turns out that all thosej-p-e-g2008-06-041-7/+14
| | | | | | | | | | | | | | | careful checks for habitat were ignored (default is HT_LAND) because the base type for undead wasn't chosen until after the position. I now added another habitat check during the base type selection loop and now everything works. :) Add a warning inscription !D that ignores such items during actions like sacrificing items, destroying weapons (Ely), burning books (Trog) or casting sticks to snakes. The failure messages are very clumsy now, but they do get the point across, I hope. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5472 c06c8d41-db1a-0410-9941-cceddc491573
* Remove unneeded blank line.dolorous2008-06-031-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5448 c06c8d41-db1a-0410-9941-cceddc491573
* Don't include items in drop filter if they're cursed and equipped, or ifzelgadis2008-06-031-0/+21
| | | | | | | they're inscribed with "!d" or "!*". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5446 c06c8d41-db1a-0410-9941-cceddc491573
* Remove commented out code, and document my changes.j-p-e-g2008-05-311-39/+0
| | | | | | | Also change merfolk fighter -> merfolk in the database. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5374 c06c8d41-db1a-0410-9941-cceddc491573
* 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