summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
Commit message (Collapse)AuthorAgeFilesLines
* Apply more commits into 0.4 branch, again mostly by Haran:j-p-e-g2008-12-081-2/+13
| | | | | | | | | | | | | | | | | 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
* Apply a bunch of trunk commits, mostly by Haran, namely:j-p-e-g2008-12-081-2/+5
| | | | | | | | | | | | | | | | | | 6766 (partly), 6834 (partly), 6867, 6892, 6903, 6906, 6908, 6909, 6927, 6928, 6929, 6943, 6945, 6946 * Message/description tweaks. * Fix enchanting hides not updating AC. * Fix incorrect score calculation. * All 't' commands now take a turn. * Don't prompt when swapping into dangerous terrain. * Fix backwards stealth check. * Fix off-by-1 error when selecting starting weapon. * Lichform discards holy wrath weapons. * Reinitialise zap counter for recharged wands, mention charges. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7786 c06c8d41-db1a-0410-9941-cceddc491573
* Apply Haran's commits 6773 and 6777-6784 to 0.4.j-p-e-g2008-08-071-9/+19
| | | | | | | | | | | | | | | | * Fix 2037104: amulet of Controlled Flight not autoIDing. * Fix 2038973: explosive tracers leaking information about invisible monsters. * Fix 2039217: check shield status for non-weapons before wielding * Fix 2039734: non-Spriggan transmuters being cheated on UC * Fix 2037845: unstackedness was overriding finishing a deck * Fix 2038476: semicontrolled blink. * Fix 2038962: casting Divine Shield wasn't refreshing AC. * Fix 2038651: real/fake rakshasa identity being leaked in descriptions. * Fix 2035976: doubled inscriptions in equipped items in dump. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6792 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2034581: menu colour leaking information on !blood and !mutation.j-p-e-g2008-08-011-3/+2
| | | | | | | Fix 2034526: inscription with { not working git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6748 c06c8d41-db1a-0410-9941-cceddc491573
* Apply the recent commits to branch, update the version and change log toj-p-e-g2008-07-311-2/+2
| | | | | | | 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
* Apply r6700 and r6706: Cleansing Flame harming helpless monsters andj-p-e-g2008-07-281-1/+1
| | | | | | | angering TSO, !blood counting towards decks of summoning. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6710 c06c8d41-db1a-0410-9941-cceddc491573
* Apply r6640, r6694 (both by Darshan), r6670 (Haran), r6679 and r6703j-p-e-g2008-07-281-1/+1
| | | | | | | | | | | (me) to branch. Includes TSO no longer granting permanent allies and resultant friendly pickup change, and a number of smaller changes. Also update change log. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6709 c06c8d41-db1a-0410-9941-cceddc491573
* Apply r6579 to 0.4.1, and revert my local makefile change (oops!)j-p-e-g2008-07-171-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6581 c06c8d41-db1a-0410-9941-cceddc491573
* Apply commit r6569 to 0.4 trunk.j-p-e-g2008-07-151-12/+9
| | | | 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-6/+8
| | | | | | | | 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 my latest commits to 0.4.j-p-e-g2008-07-131-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6531 c06c8d41-db1a-0410-9941-cceddc491573
* Apply trunk r6496 to trunk.dolorous2008-07-111-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6497 c06c8d41-db1a-0410-9941-cceddc491573
* Apply trunk r6490 to 0.4.dolorous2008-07-111-0/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6491 c06c8d41-db1a-0410-9941-cceddc491573
* Apply trunk r6488 to 0.4.dolorous2008-07-111-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6489 c06c8d41-db1a-0410-9941-cceddc491573
* Another clean up, and add some new weapon speech.j-p-e-g2008-07-071-5/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6439 c06c8d41-db1a-0410-9941-cceddc491573
* Add a function x_chance_in_y(x,y) to replace the variousj-p-e-g2008-07-061-5/+8
| | | | | | | | 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
* [2010192] Fixing issue where cancelling a ranged attack (e.g. "Really fire ↵ennewalker2008-07-051-1/+1
| | | | | | on...?") wouldn't really cancel the attack. Also, s/beam_stopped/beam_cancelled/ for clarity. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6409 c06c8d41-db1a-0410-9941-cceddc491573
* Disallow vampires from draining summoned creatures to be consistent withj-p-e-g2008-07-041-21/+24
| | | | | | | | | | | | | summoned creatures being incapable of bleeding on the floor. This makes things more difficult for Vampires; on the other hand there was a (more or less) recent change that lets them regain 1 hp *per turn* when draining corpses. We might also increase the duration of blood potions... Apart from that, various clean-ups. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6393 c06c8d41-db1a-0410-9941-cceddc491573
* Remove debugging statement, minor clean up.j-p-e-g2008-07-031-3/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6369 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2005590: Branded darts unbranded when thrown.j-p-e-g2008-07-031-56/+61
| | | | | | | | | Thrown darts of ice or flame will correctly be displayed as puffs of frost/flame, will do the appropriate damage both to player and monsters and will be identified when thrown by a monster. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6367 c06c8d41-db1a-0410-9941-cceddc491573
* Many code cleanups, mostly involving using stack_iterator andharanp2008-07-021-12/+4
| | | | | | | 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
* Only apply targeting via monster list to spells and such wherej-p-e-g2008-07-021-1/+3
| | | | | | | targeting monsters is actually needed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6338 c06c8d41-db1a-0410-9941-cceddc491573
* Revert the change on ammo handling for Tiles, and replace it with a morej-p-e-g2008-07-021-61/+57
| | | | | | | | | | | | | | | generic logic that uses item tiles for BEAM_MISSILE, else bolts according to flavour. Identify monster fired ammunition ego if the launcher ego is known, not that it has much of an effect because plain ammo gets no special description. In the message list the fired item as it will look to the player (i.e. "arrow of ice" for a plain arrow fired off a bow of frost), even though the item actually dropped will still be a plain one. I hope this isn't too confusing. (And if it is, it should be easy to revert. :p) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6331 c06c8d41-db1a-0410-9941-cceddc491573
* Force beams of digging (wand or spell, known or unknown, also /randomj-p-e-g2008-06-301-4/+4
| | | | | | | | | | effects) to ignore the endpoint target ('.') in favour of continuing until the end of the range. Unrestrict tridents for some more species. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6265 c06c8d41-db1a-0410-9941-cceddc491573
* Make shadow dragons' corpses mutagenic as discussed some time ago, andj-p-e-g2008-06-301-0/+3
| | | | | | | | | | mark skeletal dragons' genus as "dragon", so they are affected by dragon slaying. Add several more descriptions for various abilities. Please feel free to correct or add anything. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6261 c06c8d41-db1a-0410-9941-cceddc491573
* When reading a "modification scroll" (prompt: Use on which item?)j-p-e-g2008-06-301-46/+52
| | | | | | | | | | | 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
* Force quiver to attempt to use the exact same item in inventory (slotj-p-e-g2008-06-291-7/+0
| | | | | | | | 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
* Fix good random secondary choices during character selection.j-p-e-g2008-06-291-1/+8
| | | | | | | | Re-enable quivering with '(' - still buggy, and I'm trying to work out why, but at least it works for some ammo now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6218 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2004501: buggy ?identify; also finally properly id ?identify itselfj-p-e-g2008-06-281-3/+2
| | | | | | | | after a successful identification (if there are several). Fix 2004793: wandering mushroom flees - for real, this time (I hope). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6189 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2005269: trolls being capable of wearing almost all armour types.j-p-e-g2008-06-281-2/+2
| | | | | | | Remove dated mentions of item sacrifices in print_god_likes(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6188 c06c8d41-db1a-0410-9941-cceddc491573
* Add a new command for firing without quivering on 'F'.j-p-e-g2008-06-271-44/+89
| | | | | | | Use puff of fire/ice tiles for ammo of flame/ice being fired. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6169 c06c8d41-db1a-0410-9941-cceddc491573
* Only stimulate Xom when zapping a wand of random effects or an unknownzelgadis2008-06-271-3/+10
| | | | | | | | | | wand if a monster or the player is targeted, or if an invisible enemy is nearby. This prevents the player from maximally stimulating Xom by just wasting a turn while near a dangerous monster via aming a wand of random effects away from all monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6167 c06c8d41-db1a-0410-9941-cceddc491573
* Disallow quivering equipped items. (You can still (fi)re your wieldedj-p-e-g2008-06-261-4/+4
| | | | | | | | weapon if you insist, you just can't quiver it.) And another general clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6149 c06c8d41-db1a-0410-9941-cceddc491573
* Fix the character selecting omitting letters for restricted classes (asj-p-e-g2008-06-261-2/+1
| | | | | | | | | | opposed to banned ones). Tweak the code to enforce wearable body armour and shield types for all species. I'm afraid the skills need to be adjusted as well, probably in more detail, but I'm rather clueless on that account. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6147 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-87/+92
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Modify quiver to only quiver ammunition explicitly chosen by the playerj-p-e-g2008-06-241-39/+53
| | | | | | | | | | | | (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
* Recognize each type of staff once one of its type has been identified; waszelgadis2008-06-241-0/+1
| | | | | | | only working for rods. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6111 c06c8d41-db1a-0410-9941-cceddc491573
* FR 1993535: If asking the user for an item, and the player has none of thezelgadis2008-06-241-40/+11
| | | | | | | | 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
* Fix monster emergency spells not checking for ENCH_TP, thus allowingj-p-e-g2008-06-231-1/+2
| | | | | | | | | | monsters to cancel their teleportation without meaning to. (BR 2000428) Fix the quiver not being cleared when wielding the only quiverable (and thus previously quivered) item. (Un)wielding such an item now switches nicely between "Nothing wielded" and "Nothing quivered", as it should be. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6089 c06c8d41-db1a-0410-9941-cceddc491573
* Tweak Trog's Berserk description - he doesn't routinely preventj-p-e-g2008-06-231-8/+0
| | | | | | | followers from passing out, though the chance eventually reaches 100%. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6084 c06c8d41-db1a-0410-9941-cceddc491573
* Swap '.' and '!' in the targetting interface.j-p-e-g2008-06-221-5/+34
| | | | | | | | | | Forbid bats wearing hats/caps or rings. (That makes amulets the only type of equipment Vampires can keep on when transforming.) To make up for it, increase their damage stats again. Also fix it being possible to (un)equip the allowed items in Tiles while in bat form. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6055 c06c8d41-db1a-0410-9941-cceddc491573
* Fix ?immolation not being autoID'd upon reading.j-p-e-g2008-06-221-2/+3
| | | | | | | Fix ?uselessness not using the misc. descriptions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6051 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-191-37/+25
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5984 c06c8d41-db1a-0410-9941-cceddc491573
* For jewellery with pluses and wands, only make an ident note when thezelgadis2008-06-191-11/+9
| | | | | | | | | | | | first item of the type is identified, not when the charges/pluses of any item of the type is identified. Make sure that artefacts have nothing to do with the identification level of jewellery by making versions of set_ident_type() and get_ident_type() which accept a full item_def as a parameter. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5973 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more cleanups.dolorous2008-06-161-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5895 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented a modified version of FR 1994116: change inscriptionj-p-e-g2008-06-161-1/+1
| | | | | | | | | | | | | | | | interface. Instead of "Do you wish to inscribe this item? (y/n)" directly print "Add what to inscription? (You may also (a)utoinscribe or (c)lear it.)" (a) and (c) only where applicable, of course. This has two benefits: No extra prompt needed to inscribe anything, and I've finally managed to merge both the { prompt and inscribing from viewing into the same function. Escape or pressing Enter on an empty inscription string (or one only consisting of spaces) will return without changing anything. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5879 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1948131: Quiver slot name wraps around the screen.j-p-e-g2008-06-151-10/+25
| | | | | | | | Also fixes tile issues where the inventory was partly covered or not shown at all. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5844 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-151-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5840 c06c8d41-db1a-0410-9941-cceddc491573
* Remove unneeded blank lines.dolorous2008-06-141-2/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5820 c06c8d41-db1a-0410-9941-cceddc491573
* * Add a prompt when attacking monsters with an inappropriate weapon orj-p-e-g2008-06-141-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | when attempting to use (controlled) berserk while wielding an inappropriate weapon. (FR 1956656) * Make monsters stop patrolling/travelling if they change levels (or are banished). * Disable the friendly pickup toggle for characters unable to use them. Currently, only worshippers of TSO and Beogh are capable of gaining allies that are permanent (not summoned), permanently friendly (not charmed) and intelligent enough to pick up stuff (no zombies). I don't know if you keep your friends if you leave TSO. If so, the toggle should be enabled while that is the case (i.e. if you're still worshipping a good god) * Re-order the wizmode commands in the help screen. They're now not listed strictly alphabetically anymore, but rather sorted into different categories that should make actually finding commands easier. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5819 c06c8d41-db1a-0410-9941-cceddc491573