summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.h
Commit message (Collapse)AuthorAgeFilesLines
* ConstifyNicholas Feinberg2014-07-051-4/+3
| | | | | Guarantee the invariance of various item pickup functions; move gozag gold aura removal to dec_mitm.
* Refactor item pickup codeNicholas Feinberg2014-07-041-1/+3
|
* Refactor gozag wrath out of move_item_to_player()Nicholas Feinberg2014-07-041-0/+1
| | | | | And also fix gozag wrath taking no time if all the items in the stack were goldified.
* Remove AQ_CARD_GENIE on TAG_MAJOR_VERSION bumpreaverb2014-05-291-0/+2
| | | | Now that the Genie card is gone it has no reason to exist.
* Show stationary items in pickup menu (#8611)Neil Moore2014-05-291-2/+1
| | | | But do not assign any hotkeys.
* Reduce the base chance of applying corrosion, ignore item enchantment for ↵Chris Campbell2014-05-281-1/+0
| | | | | | | | | | | | | | | | resistance With temporary corrosion being more abstracted than permanent corrosion, having items resist individually was a little strange since an artefact or +9 weapon could still be "corroded" by swapping from something else to it, or by having your armour be the target of the acid. Corrosion now just looks at equipped/empty slots to determine the chance of applying the debuff and how much damage to do with the acid splash, and is less likely to apply the debuff (compared to low-enchantment items). Item enchantment (or artefact status, or crystal plate armour-ness) no longer has an effect. The debuff also now can't be applied multiple times from one acid splash.
* Make corpses and skeletons stationary items (minmay)gammafunk2014-05-261-1/+3
| | | | | | | | | Moving corpses and skeletons to other levels or to other locations within a level is tedious but may be optimal for corpse rot and god abilities like Kiku's corpse prayer. This commit prevents the player from picking up or apporting carrion. It generalizes the code used for nets being stationary, and cleans up and documents various bits of related item pickup code.
* Remove player burden and carrying capacitygammafunk2014-05-261-4/+3
| | | | | | | | | | | Item inventory weights (based on item mass) generally don't lead to meaningful decisions that justify the inventory juggling and interface problems that come from having burden states. The 52-slot limit is a better system for limiting inventory and providing inventory-related decisions because it's not so fine-grained and doesn't require the player to examine weights for each slot. Work is ongoing to improve the slot system by consolidating food types and handling strategic consumables in a different way.
* Chance function(void) to function()reaverb2014-05-241-4/+4
|
* Let Orb run spawns generate in all non-abyss locationsgammafunk2014-03-271-1/+0
| | | | | | | | | | | | | | Players have been picking up the Orb and entering a Zig only to discover that Orb spawns don't generate, thus depriving them of HUGE GUTS to RIP AND TEAR. Their complaints have been overwhelming, so now Orb run spawns generate in Pan and all portals. We don't generate the spawns in the Abyss, since the player can be banished there on the ascension, whereas entering other places with the Orb is voluntary. This commit also fixes the monster spawn rate when starting in the abyss with Lucy, which was being set to the orb run spawn rate instead of once per five turns as intended, and cleans up and documents some functions.
* Remove the =k inscriptionChris Campbell2014-02-261-2/+1
| | | | | It gave some partial squelch functionality, but didn't squelch things fully or consistently and was unlikely to actually ever be useful.
* Automatically identify the last unknown item in relevant base types.Sage2014-01-271-0/+2
| | | | | | 'Relevant base types' are wands, staves, scrolls, potions, rings, amulets. (Various tweaks and cleanups by Medar)
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-1/+0
| | | | | Sometimes, they're there to emphasize a break between two sections of code, which is good. In a majority of cases, though, they're just inconsistent.
* Don't randomly turn runes into mimics (#7831).Neil Moore2013-12-081-1/+1
| | | | | | Also, though not currently relevant, the horn of Geryon and the Orb. Explicitly-placed rune mimics are still allowed.
* Purge a small part of monster thrown weapon AI.Adam Borowski2013-09-221-2/+1
|
* Refactor.Neil Moore2013-09-201-0/+1
|
* Revert "Track who destroys an item; incur Nemelex penance for deck destruction."Adam Borowski2013-06-151-3/+2
| | | | | | | | | | | | | | | | This follows removal of documentation in 747b1a2d. Giving penance for a pointless act you need to go out your way for is quite strange -- it doesn't in any way restrict the player and thus has no balance gains, and there's a cost of making an already long god description even longer. Plus, you can get rid of decks simply by dropping them; on a non-permanent level if you really want to keep ^F clean. Not sure if the source tracking should be kept; for now I reverted it to keep things simple and to avoid an use of deprecated mindex (let's get rid of it already!), but if there's an use, please unrevert this part. This reverts commit 46bfda39a8d584164fa475188367f331314a644d.
* Always study all manuals in the inventoryPekka Lampila2013-06-061-1/+0
| | | | | | Multiple manuals for different skills can be used at once. If there are multiple manuals for the same skill, the one with least charges is used up first.
* Track who destroys an item; incur Nemelex penance for deck destruction.Steve Melenchuk2013-05-231-2/+3
| | | | | | | | | The framework here could be adopted to, say, give brownie points to Yredelemnul worshippers for destroying holy items, or other creative item-related god conducts. (More importantly, you can now reliably become an Unlucky Tengu. Hooray.)
* Rework and unify passive acid code, give it (and active acid) to jelly form.Adam Borowski2013-01-071-0/+1
| | | | | | | This makes monsters suffer acid when attacking a monster jelly, too. I removed the message when an item resists acid: it was given in some cases but not others.
* Make a few functions gone or static.Adam Borowski2012-10-311-1/+0
|
* Use std namespace.Raphael Langella2012-08-261-8/+7
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Fix infinite loop when starting autoexplore over sacrificiable items.Raphael Langella2012-08-101-0/+1
|
* Fix xg not recognizing certain unidentified items.Adam Borowski2012-07-311-0/+1
| | | | | | This might be not the only use of item_def::is_valid() that became broken with introduction of NUM_FOO meaning "unidentified", but since a vast majority of calls refer to real items, this can't be done by default.
* Eliminate missile enchantments.Adam Borowski2012-05-141-3/+2
|
* Display (studied) for active manuals, treat as equipped.Neil Moore2012-01-051-0/+1
| | | | | | | | That's supposed to be short for "being studied"; hopefully it won't lead to confusion. Manuals are also given the "equipped" prefix so they will be highlighted in the inventory; and are drawn with the equipped flag in tiles.
* Massively speed up reading .des files.Adam Borowski2011-12-101-1/+0
| | | | | A majority of time was spent parsing item names by repeatedly generating all possible items and comparing their names. We already have an item name cache.
* Simplify.Adam Borowski2011-12-101-1/+1
|
* Give deep dwarf necromancers Simulacrum (and a kind of Apportation).Adam Borowski2011-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | If the monster currently has no chunks, it will instead try apporting a corpse and start to butcher it (from inventory). Butchery lasts additional 40 aut. Chunks that lie around will be picked up and/or apported without a need for butchery. Infelicities: * pickup happens immediately after apportation (same as pickup of other items by monsters elsewhere). * butchery is done in the inventory rather than on the ground. This is needed to prevent players from apporting/animating any corpse from under the necromancer. We may invent some custom message instead (magical butchery?). * corpse turns into chunks at the start rather than the end of butchery (may be fixed if we care enough, not doing it to discuss the above point first) TODO: * since chunks are kept in the misc item slot, monsters who know this spell should handle the slot being occupied by non-chunks. Would it be better to drop junk or not pick it up in the first place? * "A foo simulacrum comes into view." is totally inappropriate for a created rather than summoned monster. This messaging is hard-coded deeply into mon-place.
* Make a bunch of functions static, delete some unused junk.Adam Borowski2011-11-111-2/+0
|
* Allow choosing the item type when making a mimic in wizmode.Raphael Langella2011-09-071-0/+1
|
* Merge all the item mimics into a single monster type.Raphael Langella2011-09-051-1/+2
| | | | | | | | | | | | | | | Now feature and item mimics have both the same name internally (and use MF_NAME_ADJECTIVE). I hacked Mon_Name_Cache to allow creating them with &M, but partial match doesn't work. You have to fully type "item mimic" or "feature mimic". Naming is changed a bit and use the item name (DESC_BASENAME). Examples: a - ([) A storm dragon armour mimic b - (!) A potion mimic c - ($) A pile of gold mimic Adding new item types is trivial now.
* Clean up all the old mimic code.Raphael Langella2011-09-051-5/+3
| | | | | | | There's no such thing as an unknown mimic monster anymore. Also rename the MF_KNOWN_MIMIC monster flag to MF_KNOWN_SHIFTER since it's only used for shapeshifter now. For upgraded games, existing unknown mimics will all be revealed.
* Item mimics use the new generation algorithm too.Raphael Langella2011-09-051-0/+1
| | | | | | | Also remove the teleport and change behaviour. Speed is reduced to 8 so they are still easy to escape. They start being generated at dungeon level 7. Any item has 1 chance in 500 of being a mimic.
* Cache position of the Orb.Adam Borowski2011-08-251-0/+1
| | | | It is referenced many times for every monster per turn in ZotDef.
* Fix drop last using a single turn.Raphael Langella2011-08-181-1/+1
| | | | Make it use proper multidrop delay instead.
* Disambiguate get_item_slot().Adam Borowski2011-08-171-1/+1
| | | | | | | There were two functions by that name: * getting equipment slot of an item * allocating a new entry in the mitm array -- the latter is now get_mitm_slot().
* New command: (D)rop last. Drops the last item(s) picked up (ghallberg).Raphael Langella2011-07-021-0/+1
|
* Goldify runes.Adam Borowski2011-06-171-0/+1
| | | | | | | | | | | | | | | | | Having them weight you down and take inventory slots results just in people running to and from to stash them, often at D:1. The only case with multiple runes is up to 50aum and 5 slots if you do Pan in one go. It also falsifies log data and score for those who don't bother with lugging the runes. After all, it's the win not score that matters. I did not bother preserving multiple demonic runes, there is no challenge in collecting multiplies. Any tough Pan lord (speed 19+firestorm+haste+summon eyes...) can be simply skipped. If you can beat 35 lords at once in a Zig, one at a time is really not going to be an obstacle. Also, remove points for the value of inventory when winning. Only the Orb (250k) and runes (*10k) count.
* Gut and parcel out most of stuff.ccAdam Borowski2011-06-041-0/+22
|
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Don't set cosmetic flags for artefacts; tidy up specialness check.Johanna Ploog2011-02-101-0/+1
| | | | | | | | | | Get rid of the "name contains runed" type of checks in favour of checking directly against COSMETIC_MASK. We don't hide artefacts anymore, anyway. Also, there's no point to setting cosmetic flags for artefacts because the item name uses the artefact appearance instead, and codewise it just causes confusion.
* Move partial stack pickup to ;Raphael Langella2011-01-261-0/+1
|
* Tiles: A single mouseclick is enough to pull up the pickup menu.Johanna Ploog2011-01-191-0/+1
| | | | | | | Previously, one mouseclick would call up the pickup prompt, and a second one the menu. Rethinking things, that requirement doesn't really make sense, so if there's more than one item in the stack you directly skip ahead to the pickup menu.
* For single items of quantity > 1 'g' now prompts for an amount.Johanna Ploog2010-12-171-1/+1
| | | | | | | | | | | | | This behaviour is already possible in Tiles (via mouseclick), so it should also work in the console version. If you'd like to switch 'g' and ',' use the bindkey option: bindkey = [g] CMD_PICKUP bindkey = [,] CMD_PICKUP_QUANTITY For multi-item stacks, the two commands are interchangeable and work as before.
* Merge branch 'zotdef-0.6' into zotdef-mastermark2010-11-101-0/+3
|\ | | | | | | | | | | Much manual merging, and a few fixes for changes in the code (particularly monsters->monster and the like). Now compiles and seems to work. Zot Def added to start menu.
| * Minor code cleanups with multple versions of orb_position()Mark Mackey2010-05-051-2/+1
| |
| * Merge of the original myzotdef branch into the Crawl 0.6Mark Mackey2010-05-051-0/+4
| | | | | | | | release branch. Quite a few edits required...
| * Update melding code around item_is_equipped.Robert Vollmert2010-03-171-0/+2
| |
* | Don't destroy items you drop just because you prayed before on an altar.Adam Borowski2010-10-201-1/+1
| |