summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-book.h
Commit message (Collapse)AuthorAgeFilesLines
* Check for monsters in range when evoking a wielded rod using "v".Tommy2014-02-101-1/+1
| | | | Rods can be evoked regardless using "V" (similar to spells with z and Z).
* 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 blame racial spell prohibitions on lich/wisp form.Neil Moore2013-06-171-2/+2
|
* Auto-ID spellbooks, manuals, and (for some reason) rods on pickupSamuel Bronson2013-04-121-0/+1
|
* Switch Vehumet-gifted spells to use the memorization interface (elliott).elliptic2013-01-201-1/+1
| | | | | Also, now there is no time limit on memorizing the offered spells, though they will be overwritten by new offers.
* Merge branch 'vehumet'Chris Campbell2013-01-201-0/+1
|\
| * Add is_player_spell, use that in Veh gifting.elliptic2013-01-181-0/+1
| |
* | Axe a number of unused functions.Adam Borowski2012-11-241-2/+0
| |
* | Remove spell memorisation failure (elliott)Chris Campbell2012-10-191-5/+1
|/ | | | | | So long as the spell can be cast, memorisation will now always succeed, with a warning prompt for spells with high miscast rates. Patch by elliott.
* Use std namespace.Raphael Langella2012-08-261-6/+6
| | | | | | | | | | | | | 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.
* Make staves and rods separate object classes.Adam Borowski2012-06-121-3/+3
| | | | | | | | | | | | They have about no overlap, more than both being usable as weapons. A vast majority of uses immediately checked item_is_rod()/item_is_staff(). I kept them shared for acquirement, for now. Also, eliminate rods of smiting -- hardly ever used, problematic theme-wise as they use "divine providence" without worship. Keeping rods of striking for now, could be used to fix artificer problems. Adding/removing rod enums is a mess due to tile handling, renaming ROD_SMITING to ROD_LIGHTNING for now.
* Make some functions static/gone.Adam Borowski2012-06-021-1/+0
|
* Make Kiku gift two randart books instead of three fixed ones.elliptic2012-05-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | By quickly gifting three fixed books containing every low-level necromancy spell in the game, Kiku tended to make all worshippers look the same -- just pick your favorite set of necromantic spells and use those each Kiku game. In addition, this part of Kiku's design meant that there was little synergy between Kiku and the necromancer background, since Kiku would gift any character the necromancer starting book very quickly. Kiku's three gifts at *, ***, and **** have been replaced by two randart gifts (at * and ***), each containing five necromancy spells. This means that every Kiku character will be missing a few spells from their ideal spellset, which will hopefully lead to use of a greater variety of necromancy spells. In addition, necromancer of Kiku now makes a lot more sense (though there will still be substantial overlap between Kiku's first gift and their starting book). Kiku worshippers still have to choose between pain branding and the Necronomicon at ******, as before. The code for generating the Kiku gifts is pretty ugly, since I wanted finer control over the books than the existing themed randart book code would allow. Currently the only guaranteed spells are Control Undead (in the first gift) and Dispel Undead (in the second), but you are also guaranteed a couple of spells that make use of Kiku's corpse invocation.
* Correct a comment.Adam Borowski2012-01-021-1/+1
|
* Revert "Characters lacking magic skills cannot learn spells".Adam Borowski2011-11-191-1/+0
| | | | | | | This restriction makes little sense with smooth skills, and manual training means you don't even need scrolls, just a tiny bit of xp. This reverts commit... er what, Linley didn't use version control in 3.30.
* 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.
* Allow predefining several spells for randart books in map defs.Johanna Ploog2011-01-311-0/+5
|
* Swap owner and title parameters in book randart generation.Johanna Ploog2011-01-291-1/+1
| | | | | This matches the way the function is called and fixes oddities in book naming introduced in my last commit.
* Tweak randbook mapdef tags: predefined title, player name as owner.Johanna Ploog2011-01-281-1/+1
| | | | | * New tag: title, replaces the usual database lookup depending on disc. * If owner == "player", use you.your_name as owner.
* Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-7/+7
| | | | | | I did review it manually to find places where they made sense (like some tables), but for a massive sed job like this there might be places that I missed.
* Sif Muna's destroy spellbook conductRaphael Langella2010-10-061-0/+2
| | | | | | | Destroying a spellbook by forgetting a spell from it or tossing it in lava cost piety and penance. The cost is based on the highest spell level from the book: maxlevel + 5 For books gifted by Sif or featuring his name, the penance is doubled. The conduct description is only "destroy spellbooks". I don't know how to explain the gift and name higher cost without making a huge line
* Forget spell from bookRaphael Langella2010-10-021-0/+1
| | | | | Add a (F)orget this spell line when reading the spell description of a known spell, from a book. Forgetting the spell destroys the book.
* player_spell_skills() counts if the player has any spellcasting skills.Robert Vollmert2010-09-131-0/+1
|
* Rename chars used as numbers to int8_t/uint8_t. Fix some other type usage.Adam Borowski2010-07-301-1/+1
| | | | | | | | | | This should help against the signed char problems, and is good for code readability. Now, if you have a char, it's either an untyped in-memory byte, or a symbol inside a string. Small numbers are instead [u]int8_t, ints, an enum type, or, in so many cases, bools. I didn't touch any of the tiles code, as it's currently broken and I don't want to risk making it unbroken harder.
* Bring sanity to enums by making them diffable/patchable.Adam Borowski2010-06-081-1/+1
|
* Autoinscribe books "beyond your understanding" with {highlevel}.Johanna Ploog2010-03-051-0/+1
| | | | | | | This is so the player doesn't wonder "What is this book I apparently haven't read yet?" the first few times until they remember. I didn't feel like adding an option for this one.
* Implement #624: Allow browsing of identified "risky" spellbooks.Johanna Ploog2010-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * If you encounter the book of Annihilations/Demonology or Necronomicon in a bookshop, you can now browse its contents. * If you buy such a book, it is already identified, so you can continue to read the spell descriptions at your leisure. * You can still not memorise these spells if you don't fulfil the requirements. They will also be coloured useless while that is the case. * If you find these books lying around in the dungeon, reading them will _not_ identify them (or give away their spell list) unless you meet the requirements. [1] I also added the old "beyond your current level of understanding" line to both book and corresponding spell descriptions. Tested for the Necronomicon seen in a shop, Demonology seen in a shop and bought, and Annihilations found unidentified (in wizard mode), using (r)ead, (i)nventory, (M)emorise, ?/, and the Tiles mouseclick interface (again, read/describe/Memorise commands and Memorise tab). [1] I don't know if it's worth keeping that restriction. If we do, we should add an autoinscription because the simple act of (r)eading it will give away that it's one of those three special books, though not which one.
* Fix SF 2938758: Wrong message for unmemorizable spells due to Lich form.Johanna Ploog2010-02-231-0/+2
| | | | Also takes care of some duplicated messaging code.
* Axe shield leakage [Mantis 300]Stefan O'Rear2010-01-021-1/+0
|
* Flatten header dependencies a bit.Robert Vollmert2009-11-171-1/+0
| | | | | | This removes a couple of unnecessary includes from header files. I may have missed adding some tiles includes.
* Rename fixary.h and fixvec.h.Robert Vollmert2009-11-151-1/+1
|
* Remove "called from:" comments.Vsevolod Kozlov2009-11-031-13/+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
|
* Move 'FixAry.h' -> 'fixary.h', 'FixVec.h' -> 'fixvec.h' for file naming ↵Steven Noonan2009-09-291-1/+1
| | | | | | consistency Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Jump from the memorisation display back to spells if you cannot memorisej-p-e-g2009-09-141-1/+2
| | | | | | | any further spells. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10677 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2858572: tiles spell memorisation crashes.j-p-e-g2009-09-141-2/+2
| | | | | | | Also handles dangerous spellbooks correctly now, prompts and all. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10675 c06c8d41-db1a-0410-9941-cceddc491573
* * Show item type shortcuts in inventory. I think it's too intrusive forj-p-e-g2009-09-141-1/+1
| | | | | | | | | | ASCII even though it works well in tiles. * Always display memorise button because it's less confusing that way. I still can't work out why the error messages disappear right away. *sighs* * Add a short document on tiles creation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10673 c06c8d41-db1a-0410-9941-cceddc491573
* Adapt Matthew's new memorisation interface for tiles, using the samej-p-e-g2009-09-121-2/+3
| | | | | | | | display as for spellcasting. Also force a redraw() if the player clicked on a spell. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10661 c06c8d41-db1a-0410-9941-cceddc491573
* Add a button to memorise spells to the new spell display. All this doesj-p-e-g2009-09-111-0/+1
| | | | | | | | at the moment is call learn_spell(), but I'm planning to reuse the spell display for this purpose. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10655 c06c8d41-db1a-0410-9941-cceddc491573
* FR 2810959: If a player reads a spellbook which is in inventory, then looks atzelgadis2009-08-181-0/+3
| | | | | | | | | | | a spell's description, pressing 'M' will try to memorise that spell from that particular book. FR 2815575: Instead of moving "spell levels left" to the top of the spell memorisation menu, make it light-green in color. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10558 c06c8d41-db1a-0410-9941-cceddc491573
* Spellbook memorisation stuff:zelgadis2009-06-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | * Simplify the message given when none of the available spells can be memorised. * The descriptions of the three dangerous spellbooks now mention that the books will lash out at the player if a memorisation fails. Also, the "some of the more powerful grimoires are not to be toyed with" warning has been removed from all of the normal spellbooks, since the dangerous spellbooks are adequetly warned. * If a spell to be memorised is only available from a dangerous spell book then colour that spell light red and warn the player if they select it for memorisation. (Not yet handled is any logic for choosing between multiple dangerous spell books if the same spell is in more than one of them) * is_dangerous_item() now returns true for the three dangerous spellbooks, so they'll be colored differently in the inventory. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9891 c06c8d41-db1a-0410-9941-cceddc491573
* FR 2722830 and related changes:zelgadis2009-06-021-2/+1
| | | | | | | | | | | | | | | | | * Memorization now lists all spells in all carried books (minus spells which are already memorized or which can never be memorized because of the player's species), sorted by easy of memorization. * Miscast effects from failing to memorize from out of the Necronomicon, the book of Demonology and the book of Annihilations is commented out, pending figuring out how to do it with the new interface. * Spells which can't be memorized because of the player's species are highlighted as light red when reading a spell book, and a note is added when describing the spell. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9883 c06c8d41-db1a-0410-9941-cceddc491573
* Add Deep Dwarves patch, with some minor changes.haranp2009-02-231-1/+1
| | | | | | | | | | | | | | | | Add a new mutation, MUT_SLOW_HEALING, which at level 3 blocks all healing; it can't be acquired randomly, but deep dwarves start with it at level 3. This overrides regeneration, including the god-given kind (Trog's Hand.) Fix mutation listings (hopefully I got this right.) There are still some cases where DD HP shaving is not applied: ability HP costs, Staff of Dispater effect, vampiric draining backlash, Sublimation of Blood spell. Fix dancing weapons leaving mgrd incorrect if their weapon can't be generated. Breaks saves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9173 c06c8d41-db1a-0410-9941-cceddc491573
* FR 2532818: Allow randart books to be named after uniques and legendary mages.j-p-e-g2009-01-291-1/+1
| | | | | | | | Also, randart books created by acquirement (not gifts) have a chance to be named after the player. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8848 c06c8d41-db1a-0410-9941-cceddc491573
* Introduce a number of new uniques taken from a patch by castamir.j-p-e-g2009-01-041-1/+4
| | | | | | | | | | | | | | | | | | | These are: * Roxanne (statue spellcaster) * Sonja (Kobold assassin) * Eustachio (human summoner, was: Francisco) * Azrael (efreet, was: Abdul) * Ilsuiw (Merfolk witch * Prince Ribbit (blink frog prince) * Nergalle (orc sorceress) * Saint Roka (orc priest of Beogh) Tweaked make_book_theme_randart() to allow for one forced spell and owner's name. Used to occasionally give Roxanne a randart book containing Statue Form. (Was: always book of earth) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8207 c06c8d41-db1a-0410-9941-cceddc491573
* * Dump spells contained in randart spellbooks, marking memorised spellsj-p-e-g2008-12-291-0/+1
| | | | | | | | | | with an asterisk. * Sif Muna no longer gifts the books specific to Kiku and Vehumet (Necronomicon, Annihilations, Demonology) though the spells contained there-in may crop up in randart books. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8011 c06c8d41-db1a-0410-9941-cceddc491573
* Non-weighted themed randart spellbooks, and prices for randart spellbooks.zelgadis2008-12-051-3/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7746 c06c8d41-db1a-0410-9941-cceddc491573
* Savefile compatibility breakage from keeping track of which spells have beenzelgadis2008-12-041-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | seen. Implemented fixed-level randart spell books, which is all randart spellbooks as of now. All my attempts at sorting the spell list so that spells with the same schools group together have utterly failed. Got rid of the hackish "non-monster origin is stored in item.orig_monnum as (-origin - 2)" logic, replaced with the slightly less hackish "-origin". Added the two enumerations IT_SRC_START and IT_SRC_SHOP to do it. Also, origin_is_god_gift() and origin_is_acquirement() can retrieve the god/source of the item so that you don't have to do the negation and typecasting yourself. Added some new spell flags: * SPFLAG_BATTLE for non-conjuration spells which are still combat/battle related (branding spells and single school attack spells like "Pain"), * SPFLAG_CARD for spells which are card-type effects which don't show up in ordinary spellbooks (Tomb of Doroklohe and (I assume) Disintigrate) * SPFLAG_TESTING for spells which are only used for testing (Debugging Ray) * SPFLAG_DEVEL for spells that are still under development (Crush, Disrupt, and Detect Magic). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7742 c06c8d41-db1a-0410-9941-cceddc491573
* The start of randart spellbooks. Never randomly generated and only created viazelgadis2008-12-021-0/+5
| | | | | | | | | | | | | the wizard command &+, since there's no logic to how the random set of spells are selected and there's no valuation code in shopping.cc. No randart manuals or books of destruction, since I have no clue what they'd be like. The code allows for any book or spell to have its normal set of spells overridden by an arbitrary/customized set of spells, but this is only used by randart spellbooks as of now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7722 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-4/+0
| | | | | | | | | | into a file crawlhistory.txt in docs/obsolete. I used a perl script to do this under the assumption that all these change logs used the same system following the keyword "Change History". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6930 c06c8d41-db1a-0410-9941-cceddc491573