summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/food.h
Commit message (Collapse)AuthorAgeFilesLines
* Don't give --more-- prompts for trying to eat (8849)Nicholas Feinberg2014-08-081-1/+1
| | | | | ...when there's a chunk on the floor, but you aren't hungry enough to eat it. (This was erroneously introduced by 2a0806f3.)
* Remove some unused code accidentally restored.Shmuale Mark2014-07-041-1/+1
| | | | | This was my fault for not splitting up the code cleanup from the actual gameplay changes, of course.
* Revert "don't eat off the floor (aef094f7fd7. 9c21a484839)"Nicholas Feinberg2014-07-041-0/+1
| | | | | | | | | | | It was enormously inconvenient, especially now that weightless means that everyone's running around with 52-item inventories, and didn't offer any strong benefits beyond the ideological. It would be better to have a unified "use items from the floor" interface, which would essentially turn this into a special case, but until then, let players eat in however unsanitary a manner they please.
* Disallow eating off the ground for non-vampires.Shmuale Mark2014-07-021-1/+0
| | | | | It makes the 'e' key less consistent for no obvious benefit. Not to mention that it's incredibly unsanitary.
* Remove an unused function (gammafunk).Shmuale Mark2014-06-301-1/+0
|
* Remove player burden and carrying capacitygammafunk2014-05-261-1/+1
| | | | | | | | | | | 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.
* 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.
* Clean up item eating codeCedor2013-12-121-2/+1
| | | | | | Remove eat_item() from l_food.cc (code inserted in unique caller food_eat()), and use it in food.cc in place of the 2 duplicated functions eat_floor_item() and eat_inventory_item()
* Rebase hunger values at 0 (from 100).Adam Borowski2013-10-271-13/+12
| | | | | | | | Also, get rid of a number (but not all) literal values, replacing them with defines. No compensation is given for proportional costs (Zin's wrath, hungry ghost melee).
* Document that the lowest possible you.hunger is 100 rather than 0.Adam Borowski2013-10-241-0/+2
| | | | | This could be probably changed, but we got a couple of non-relative cases: Zin's wrath halves you.hunger, hungry ghost melee reduces it by 1/4.
* Let the temporarily foodless still acquire food (Mantis #7283)Pete Hurst2013-06-291-0/+2
| | | | Adds an is_foodless_normally() call for other such uses.
* Merge branch 'master' into djinnAdam Borowski2013-05-291-6/+14
|\
| * Define hunger values and use them to eliminate a compile checkPete Hurst2013-05-191-4/+13
| |
| * Don't ID hunger/sust and crash on game load (#7049)Neil Moore2013-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If you were hungry or worse and wearing an unIDed ring of hunger or ring of sustenance, the initial call to food_change(true) after reloading the game would identify the ring. However, the shopping list is not yet initialized at that point, so the attempt to update the shopping list to account for the new knowledge causes a crash. Fix this by not identifying rings in this situation (even without the crash it's wrong: saving and restoring shouldn't ID the ring).
| * Cure all nausea, permanently.Adam Borowski2013-04-301-1/+0
| | | | | | | | Contaminated chunks provide less nutrition instead.
* | Djinn: the munchies make them glow.Adam Borowski2013-04-281-2/+1
| | | | | | | | | | | | Any magical food costs cause magic contamination instead; this includes invocations and evocations. Mundane and/or hunger-themed costs like vamp weapons are free, though.
* | Djinn: go breatharian, man!Adam Borowski2013-04-281-1/+1
|/ | | | | They can still eat and drink, which is pointless for food with no side effects.
* Photosynthesis and breatharianism.Adam Borowski2013-01-041-0/+1
| | | | Our trees are no venus fly traps, and wisps need no food either.
* Use std namespace.Raphael Langella2012-08-261-1/+1
| | | | | | | | | | | | | 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.
* Replace a magic number with a #define.David Lawrence Ramsey2012-05-221-0/+1
|
* Display spell hunger as a spellpower-style bar instead of as food typesChris Campbell2012-04-281-1/+1
| | | | | | The food type actually meant "casting this spell fives times costs at most one <foodtype>" which was very unintuitive, and food types also change in value depending on herbivore/carnivore mutations.
* Drop unneeded chunks when the pack is full, too.Adam Borowski2012-03-201-1/+1
|
* A new option: auto_drop_chunks.Adam Borowski2012-03-201-0/+1
| | | | | | | | | | | | | | | | Chunks are dropped only when picking something up would put you over the burden limit. There are two modes: partial one ("rotten") which will drop only rotten ones (none at all if you're a saprovore or know Simulacrum/ Sublimation), and full which will drop any chunks that are going to be of no use. It tries to be smart about chunk quality: contam chunks are worse than clean ones unless they're far fresher, modified by gourmand, mutations, etc. There's a lot that can be improved: for example, it doesn't care what you're trying to pick up (new chunks should be counted); if you chop up an elephant into 8 chunks it will still try to pick them up _and_ keep an "appropriate" amount of old ones, etc. Which is crippling if your carrying capacity is 200aum in the first place.
* Hide some literal hunger values.Adam Borowski2012-03-201-0/+1
|
* Give deep dwarf necromancers Simulacrum (and a kind of Apportation).Adam Borowski2011-12-051-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Axe a number of useless comments about enum values.Adam Borowski2011-11-301-6/+6
|
* Give different messages when nausea goes away, depending on food and hunger.Adam Borowski2011-11-051-0/+1
| | | | | | | | | | | | | | "Your stomach is not as upset anymore, and you want to eat." -- spoilable food you can eat right now "Your stomach is not as upset anymore, and you need some food." -- hungry, no chunks "Your stomach is not as upset anymore, let's find someone to eat." -- carnivore/gourmand with tummy space "Your stomach is not as upset anymore." -- otherwise By default, only the first one stops run/rest, but the extra messages are different so players with different tastes can set them accordingly.
* Clean up an unused argument.Adam Borowski2011-10-111-3/+2
|
* Remove code for finding out unknown amulets of gourmand.Adam Borowski2011-10-111-1/+0
| | | | They auto-id since some time already.
* Roll back Vinterman/Ryak's food changes.Adam Borowski2011-10-111-17/+3
| | | | | | | | | | | | | | | | | | | This reverts commit 56adfb2d6e91b781499fddbf1c4cf5fded9b3bd9. This reverts commit 28ea51337999252974a6051997e03c876bd3a6ea. This reverts commit 3ffba0ab4769a2692802ec98a60516d0a7339aef. This reverts commit 66a61ea0233373387f161dd2dd5686e69fe90e03. This reverts commit c6ffd8058ca6c802c2b7c88c8d1956f85cd03708. This reverts commit 289ffa941741b600155af52e04921655cf63ebb1. This reverts commit 8bf89aab165429b403a963a6247302eaa1a7c2fc. This reverts commit 845a2ce7bb31391fd53e514a72013f495786cf5a. This reverts commit 56bc8b5a0496afbf58f32a44307ea19d9b50cb47. This reverts commit b88298383b3ea16feca4622e733bcb92e853b1b2. This reverts commit 110e6aac50dbc56564bfaae8b365fd7d06b6b3be. This reverts commit 59069cbe23d706fa4b529236c15eda33e9b49459. This reverts commit 8aa7ded15ec47daf9d8748071a9f0e31052ae940. This reverts commit 28b8754b9ae064e8302b92c9e44dc0b20aed88e9. This reverts commit 5f9885df8fcaa25e641bd70dc97f182fa31e1437. This reverts parts of 1930a6b2 that deal with food.
* Preliminary food edibility labeling.Samuel Bronson2011-10-091-0/+2
| | | | | I don't think this is going to work right for inedible food, but it's a starting point, at least.
* Increase the hungry satiation level from 2600 to 2800.Raphael Langella2011-10-061-1/+1
| | | | | | It's not possible anymore to go from very hungry directly to satiated by eating a brown chunk. It's not really abusable, but it's annoying since you used to go back to hungry after just a few turns anyway.
* Food reform (Ryak).Raphael Langella2011-10-041-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on Vintermann's design. https://crawl.develz.org/wiki/doku.php?id=dcss:brainstorm:misc:eating Food is assigned a preference value, which depends on food type and mutations (herbi, carni and sapro). Base value is 4 for permafood, 5 for royal jellies and 2 for chunks. +1 on chunks for amulet of gourmand +1 on meat for each level of the carnivore mutation -1 on meat for each level of the herbivore mutation +1 on plants for each level of the herbivore mutation -1 on plants for each level of the carnivore mutation -1 for bad chunks (contaminated, poisonous, mutagenic...) -2 for rotten chunks (only -1 for sapro 1&2 and no penalty for sapro 3). no eating of meat food at Herbivore 3 no eating of plant food at Carnivore 3 Maximum satiation at which a certain food can be eaten: 0: Near starving 1: Vey hungry 2: Hungry 3: Satiated 4: Full 5+: Very full Nutrition multiplier for chunks: 0: 1/3 (always give sickness) 1: 2/3 (20% sickness) 2: 1 3: 1.1 4: 1.2 5: 1.5 Nutrition multiplier for permafood 2: 1/3 3: 2/3 4: 1 5: 1.5 6: 2 7: 2.5
* Use the spell hunger descriptions for abilities.Raphael Langella2011-05-071-0/+1
|
* Auto-eat while travelling.Raphael Langella2011-04-221-1/+1
| | | | | If you set the easy_eat_chunks option and are carrying an edible chunk it will be automatically eaten without interrupting travel, run or rest.
* Revert Ashenzari curses exceptions.Raphael Langella2011-04-111-1/+1
| | | | | They made some sense (gameplay-wise) with the skill boost, but with the current design, they are not necessary and hurt the flavour (#3792).
* 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.
* iButchering: ignore inscriptions when switching back to cursed weapon.Raphael Langella2011-03-281-1/+1
|
* Revert "Give Ashenzari a butcher ability."Raphael Langella2011-03-281-2/+0
| | | | This reverts commit 431acdf161c16cc92e8222d04b9b6966a97d274d.
* Give Ashenzari a butcher ability.Raphael Langella2011-03-241-0/+2
| | | | | It's unthematic, but I think it will help balance the god while we look for a better solution.
* Make all sources of berserk consistent wrt hunger, remove insta-kills.Adam Borowski2011-03-181-0/+3
| | | | | | | | | | | | | | | | | The following used to ignore hunger: * spell * potion * anger The following blocked berserk at "Hungry": * Trog * evocations All are blocked at "Very Hungry" now. Berserk automatically stops when you hit "Starving", this means you might not get the full duration if you were near the limit at the start. This removes a number of annoying or silly cases, but also has a downside of buffing berserkers a bit.
* whitespacesRaphael Langella2011-02-181-2/+2
|
* Fix misinformation when clicking on rotten chunks as a non-saprovore.Johanna Ploog2011-02-171-1/+4
| | | | | | The returned message was "You're not hungry enough" which is completely misleading. Fixed by adding a can_ingest variant that gets the item itself rather than base and subtype, so we can check for rottenness.
* Add new chunk type that is both poisonous and contaminated.Johanna Ploog2010-08-221-0/+1
| | | | | | | | | | If the player is poison resistant, its effects are the same as for contaminated flesh, otherwise poisonous ones. I never liked how, once you've got poison res. swamp drake or gila monster corpses are all of a sudden more healthy than, say, goblins or fire drakes. I changed some monsters to use this one instead of CE_POISONOUS. Feel free to make further changes.
* Add ambrosia for Spider's Nest.Eino Keskitalo2010-07-271-1/+2
| | | | | | Used only in Spider destination maps (this commit adds one). Simply gives a potion magic + potion of confusion effects when eaten. Tile is a recoloured royal jelly. Signed-off-by: Eino Keskitalo <evktalo@users.sourceforge.net>
* Move starvation handling to food.cc.Robert Vollmert2010-03-141-0/+2
|
* Implement #913: Mark bad type disintegrated monsters' chunks "dropped".Johanna Ploog2010-02-241-0/+1
| | | | | Depending on chunk type and your current resistances, some desintegrated monsters' chunks now get the DROPPED flag.
* Change Vampires bottling blood to a proper (a)bility.Johanna Ploog2010-02-091-1/+2
| | | | | This is much less confusing and allows players to decide whether they want to butcher some bottleable corpses, e.g. for simulacra.
* Remove "called from:" comments.Vsevolod Kozlov2009-11-031-29/+0
| | | | | | These were of questionable use and freshness. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|