summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/shopping.cc
Commit message (Collapse)AuthorAgeFilesLines
* For jewellery with pluses and wands, only make an ident note when thezelgadis2008-06-191-1/+1
| | | | | | | | | | | | 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
* Use the menu item colour prefixes with note_items, so that (for example)zelgadis2008-06-141-0/+6
| | | | | | | | | | | you can only note identified books, or you can note picking up unidentified randarts. When an item is bought from a shop, mpr() a line about the item, so that you can use note_messages to keep note of everything you've bought. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5811 c06c8d41-db1a-0410-9941-cceddc491573
* Added "error" channel for runtime errors, and changed error messages thatzelgadis2008-05-271-1/+1
| | | | | | | | | used the "danger" or "warning" channels to use that. Sending an error message to the error channel has the side effect of interrupting all activity. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5276 c06c8d41-db1a-0410-9941-cceddc491573
* Finally fix 1868761: Books in shops being noted as identified over andj-p-e-g2008-05-201-15/+18
| | | | | | | | | | | over again (when searching stashes). Also remove my recently added NOTE_FOUND_ORB_OR_RUNES in favour of the previously existing NOTE_GET_ITEM. Also I've noticed that this is probably already listed in the "milestones" - but what on earth are they? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5150 c06c8d41-db1a-0410-9941-cceddc491573
* Fix BR 1959133 (Shiori): change Ancus to Ankus.dploog2008-05-161-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5085 c06c8d41-db1a-0410-9941-cceddc491573
* Rename the "blessed blade" the "blessed eudemon blade", so that the name dolorous2008-05-071-6/+10
| | | | | | | | of the Blessed Blade artefact is unique. Also, attempt to add shopping values for the new blessed blades (these probably need adjustment). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4909 c06c8d41-db1a-0410-9941-cceddc491573
* Refix confusion resistance checks to include plants and zombies. For thej-p-e-g2008-04-251-1/+1
| | | | | | | | latter I added a check vs. undead holiness, but that may be (probably is) too general. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4634 c06c8d41-db1a-0410-9941-cceddc491573
* Allow monsters to pick up and exchange armour if they find somethingj-p-e-g2008-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | better. This will only happen if the armour will fit the monster (correct size) and if the new armour has a better AC, or both items have the same AC but the new armour has a higher value (uses shopping values). Matching racial type (orcish for orcs, elven for elves) doubles an item's value, so between two plain +0 ring mails, one orcish one not, an orc will always prefer the former. Friendly monsters now may pick up items dropped by other friendlies. This means that they can re-collect their own thrown missiles, and that they can upgrade from stuff dropped by their fallen comrades. Hey, that's monster AI in action! :) They still won't pick up stuff randomly lying around, and neutrals or enslaved monsters never will pick up anything. And of course, friendly jellies (should that be possible) won't ever devour items. Cleanup of mstuff2.cc, and reduce chances for Beogh orcs' chattiness (again). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4632 c06c8d41-db1a-0410-9941-cceddc491573
* Shop fixes.ennewalker2008-04-221-9/+27
| | | | | | | [1946217] Removed --more-- when entering a shop. [1939892] Moved shop from MSG window to CRT window to fix tiles-related redraw issue. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4458 c06c8d41-db1a-0410-9941-cceddc491573
* Allow vampires to mutate when Satiated or higher, and make non-physicalj-p-e-g2008-04-151-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* For 1924228. Shop prompts and welcome and things are printed in the messagepauldubois2008-03-291-63/+58
| | | | | | | | | | area instead of in a hardcoded screen location (that happens to be in the message area on default-sized consoles). Also made some minor changes so the prompts look like non-shop prompts. And changed some names of static functions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3934 c06c8d41-db1a-0410-9941-cceddc491573
* Split potions of blood and potions of coagulated blood into twoj-p-e-g2008-03-261-1/+2
| | | | | | | | | | | | | | | | distinct potion types to make stacking easier. Coagulated blood is not created randomly, and aging potions of blood turn into potions of coagulated blood, so none of that changed. Well, except the name: congealed -> coagulated. This also means that they now have distinct descriptions, though seeing potions in your inventory coagulate will identify both of them. And I checked: potions in shops will coagulate as well and disappear. Coagulated blood is cheaper, but if you need it you won't want to wait around, right? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3884 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1923913: blood spattering into fountainsj-p-e-g2008-03-241-1/+0
| | | | | | | | | | | Fix 1923487: jewelled helmets getting the "jewelled" randart description Fix 1923471: Suppress the beholding message if only attacking. Also remove ARM_HELM since it's identical in every way with ARM_HELMET and only serves to confuse coders. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3858 c06c8d41-db1a-0410-9941-cceddc491573
* "stashes" was both a global variable and a member variable... confusing!pauldubois2008-03-231-2/+2
| | | | | | | Renamed both of them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3827 c06c8d41-db1a-0410-9941-cceddc491573
* Another one of those mixed commits.j-p-e-g2008-03-201-2/+7
| | | | | | | | | | | | | | | * Fix 1915277: Blade Hands time-out removing bardings. * Ely's Lesser Healing costs range(0,1) piety (avg. 0.5) * Allow synonym for "yes" in yesnoquit(), and use it for eating (e=y). Also, in preparation for 0.4 (yes, I can't wait) finally disallow random generation of weapons of orc slaying. Demon lords use a check of their own and as a randart property it's also allowed, which I think is fine. Allow random generation of nets and increase shop prices for nets and javelins. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3766 c06c8d41-db1a-0410-9941-cceddc491573
* Implement [1891388]: Make Holy Word available in scroll form.dolorous2008-02-211-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3450 c06c8d41-db1a-0410-9941-cceddc491573
* Fix collision between gotoxy(int,int,int) and DOS djgpp gotoxy().dshaligram2008-01-251-5/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3337 c06c8d41-db1a-0410-9941-cceddc491573
* Removed DISRUPTION brand and added DRAGON_SLAYING.j-p-e-g2008-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | The old disruption code should probably be moved over to holy wrath but I'm unsure whether I should replace the current one. I'm talking about the "You are blasted by holy energy!" bit in the commit below. For now, I've simply removed it. All dragon slaying currently does is what orc slaying does, only against dragons. So no additional effects, resistances or otherwise. Both slaying brands are still randomly created (though dragon only for polearms), I haven't changed anything about that. Also removed DISTORTION effect upon wielding such a weapon. Xom is still pleased about seeing you in this conundrum, but not as much as when you were blasted right away. Changed distortion description to explicitly mentioning its effects. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3219 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles!ennewalker2008-01-051-2/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [1813286]: Rename the lochaber axe to the bardiche, and change its dolorous2007-12-141-1/+1
| | | | | | | description accordingly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3061 c06c8d41-db1a-0410-9941-cceddc491573
* Helmets, helms, caps and wizard hats now have their own subtypes, asharanp2007-12-101-0/+3
| | | | | | | | opposed to the old model where they had subtype ARM_HELMET. Breaks savefiles, might be buggy. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3035 c06c8d41-db1a-0410-9941-cceddc491573
* Don't ID-note when examining books in a shop.haranp2007-11-301-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2948 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed 1825223: unknown curses don't leak information in prices.haranp2007-11-051-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2767 c06c8d41-db1a-0410-9941-cceddc491573
* Forgetfulness removed; it's now a scroll of fog with a 1-in-10 chanceharanp2007-10-161-1/+3
| | | | | | | of producing miasma instead. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2485 c06c8d41-db1a-0410-9941-cceddc491573
* Added new field seen_context to the monsters class, which can be setzelgadis2007-10-161-0/+1
| | | | | | | | | | | | | | | | to cause a non-standard context to be passed to interrupt_activity( AI_SEE_MONSTER ) if it is called before the current turn is over. If a submerged monster surfaces in order to shout, it has to wait one turn before being able to submerge again. Added back in a scroll named "forgetfullness", but rather than giving amnesia about the map it gives amnesia about non-equipped inventory items. I tried to make the effects annoying rather than serious. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2481 c06c8d41-db1a-0410-9941-cceddc491573
* Removed amnesia/forgetfullness trap, mutation and scroll. Thezelgadis2007-10-151-1/+0
| | | | | | | | | | | | | mutation has been replaced with an involuntary shouting mutation, and the trap with an alarm trap. The scroll hasn't been replaced with anything, and the frequency of scrolls of random uselessness has thus doubled; someone needs to re-do the scroll frequencies. Also added a "drifting" mutation, which causes the player to sometimes drift in a random direction after moving. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2464 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+2
| | | | | | | | | | | | | 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
* &L can place encompass levels, and is more aggressive about overwritingdshaligram2007-07-291-1/+1
| | | | | | | | existing dungeon features. Dungeon features of importance - such as stairs, shops, and altars - and map markers are shifted out of the way, to the nearest free floor square. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1947 c06c8d41-db1a-0410-9941-cceddc491573
* Added potions of resistance, which give fire, electricity and cold resist forharanp2007-07-231-0/+3
| | | | | | | | | | | 10 + random2(40) turns. Rareness roughly equivalent to levitation. This is FR 1756363. The potion does *not* give MR. Rewrote some vampire potion handling, including some changes: e.g. vampires can now be paralysed by potions of paralysis (I don't see why they shouldn't be.) For now there is no status message for fire/cold resist; will change soon. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1918 c06c8d41-db1a-0410-9941-cceddc491573
* Updated level-design.txt.dshaligram2007-07-211-0/+8
| | | | | | | | | | | Moved map markers to mapmark.cc. Added support for timer markers that remove a feature after a certain timeout. Need to hook up messaging to Lua. Added bazaars (need more bazaar layouts). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1899 c06c8d41-db1a-0410-9941-cceddc491573
* Vampires, yay! Credit mostly goes to Jarmo, thoughj-p-e-g2007-07-141-0/+1
| | | | | | | | | | | | | | | | there are a few traces of things I've changed (that I've included and then commented out). There's still lots of stuff to be added, but they should be playable right now. I notice that their vampiric bite attack needs to be made more probable. Feel free to comment on anything that looks weird, is plain wrong, or goes against the spirit of Crawl/Stonesoup. Positive feedback will be appreciated as well. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1870 c06c8d41-db1a-0410-9941-cceddc491573
* Minor type-safety.haranp2007-07-141-8/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1862 c06c8d41-db1a-0410-9941-cceddc491573
* Rewrite of the shopping code. Much cleaner now.haranp2007-07-141-220/+159
| | | | | | | Hopefully I didn't break anything. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1861 c06c8d41-db1a-0410-9941-cceddc491573
* Describing items now works better in shops (fixes 1749246.)haranp2007-07-071-1/+14
| | | | | | | | | More consistency in type-ID vs. artefacts: knowing the type-ID of a specific ring won't property-ID or type-ID an artefact ring of the same type, and vice versa. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1781 c06c8d41-db1a-0410-9941-cceddc491573
* Experimental mouse support for ncurses (enable with mouse_input=yes indshaligram2007-06-201-1/+1
| | | | | | .crawlrc). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1610 c06c8d41-db1a-0410-9941-cceddc491573
* More strings instead of char*s.haranp2007-06-181-30/+26
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1599 c06c8d41-db1a-0410-9941-cceddc491573
* Some more cards and bugfixes.haranp2007-06-171-2/+14
| | | | | | | | | | | Still not implemented: Shuffle, trowel, minefield, spade, blade. Partially implemented: Battlelust, helm, shadow, damage cards. Breaks savefiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1595 c06c8d41-db1a-0410-9941-cceddc491573
* Complete revamp of cards and decks, following David's ideas.haranp2007-06-171-3/+0
| | | | | | | | | | Many of the cards don't work yet (e.g., all Summoning cards); this will be fixed in the near future. Deck rarity, by the way, is encoded in its colour. Yuck - but I was out of bits in the item_def struct. Better ideas welcome. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1594 c06c8d41-db1a-0410-9941-cceddc491573
* [1712555] [1712558] Prices of rings of slaying were being miscalculated; alsodshaligram2007-05-051-1/+1
| | | | | | fixed being able to memorise spells while berserk (Rob Vollmert). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1408 c06c8d41-db1a-0410-9941-cceddc491573
* Removed dud verbose_dump and detailed_stat_dump options, and dead code indshaligram2007-04-291-8/+0
| | | | | | shopping.cc (Haran). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1395 c06c8d41-db1a-0410-9941-cceddc491573
* Some code review and cleanup.haranp2007-04-281-4/+6
| | | | | | | extern char info[] is almost gone. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1387 c06c8d41-db1a-0410-9941-cceddc491573
* Made item_def::base_type into object_class_type, instead of unsigned char.haranp2007-04-261-0/+2
| | | | | | | | | | | Flushed out a few bugs as a result, specifically: 1. Some monsters (e.g., orcs) can now get blowguns as they were intended to (look at the makeitem.cc change); 2. Acquirement will no longer attempt to give you the books of minor magic if you've found them (look at the effects.cc change.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1374 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up shop-handling code considerably.haranp2007-04-241-154/+58
| | | | | | | | | | | | | Instead of shops passing around global id_arr arrays, shops use the newly added third argument to item_def::name() which indicates whether to override item ID status. This means that the shop ID SIGHUP protection is now unnecessary; it's been removed. Hopefully I caught all the places where the stash tracker tries to get item names and fixed them, but I might have missed something. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1359 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up a lot of code which was using info[] to use mprf() directlyharanp2007-04-231-2/+2
| | | | | | | | | instead. Fixed a bug with affix_weapon_enchantment messaging (mea culpa.) Fixed shatter() messages getting surpressed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1347 c06c8d41-db1a-0410-9941-cceddc491573
* Eliminated it_name(), in_name(), item_name(). The function to use isharanp2007-04-211-16/+15
| | | | | | | | now item_def::name(). Cleaned up a lot of code in the process. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1341 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented Erik's randart-MR-is-multiplicative idea.haranp2007-04-131-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1294 c06c8d41-db1a-0410-9941-cceddc491573
* Readjusted the prices of resistible wands (Erik).dshaligram2007-03-291-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1125 c06c8d41-db1a-0410-9941-cceddc491573
* Kill hard tabs.dshaligram2007-03-061-12/+12
| | | | | | redraw_dexterity now implies redraw_evasion. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@987 c06c8d41-db1a-0410-9941-cceddc491573
* Break up you_attack() into a slew of smaller functions. The functions aredshaligram2007-02-121-2/+1
| | | | | | | | | | | | | still fairly tangled, but they're better than the old monster. The idea is to also put monster-vs-player and monster-vs-monster into the melee_attack framework so that refactoring combat code with elements of 4.1 becomes easier. This is a big refactoring, so it's likely to be buggy. Some of the combat diagnostics - notably the damage rolls - are also AWOL. Will fix going forward. Note: The combat code is still classic b26. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@950 c06c8d41-db1a-0410-9941-cceddc491573
* Removed USE_NEW_RANDOM, USE_MACROS.dshaligram2007-01-251-18/+0
| | | | | | | | | | | | | Removed DOS_TERM, PLAIN_TERM special casery - all platforms get PLAIN_TERM. Better end-of-greedy-explore reporting for items on traps (Erik). Cleaned up find_travel_pos - moved guts of travel pathfinding to travel_pathfind class. Miscellaneous other stuff. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@882 c06c8d41-db1a-0410-9941-cceddc491573