summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-book.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Add the last missing spell tiles.j-p-e-g2009-09-131-10/+12
| | | | | | | Update change log. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10668 c06c8d41-db1a-0410-9941-cceddc491573
* Adapt Matthew's new memorisation interface for tiles, using the samej-p-e-g2009-09-121-13/+48
| | | | | | | | 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-7/+35
| | | | | | | | 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-31/+83
| | | | | | | | | | | 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
* As per FR 2837779, change Forescry to Phase Shift (Trl). Same level,j-p-e-g2009-08-141-4/+4
| | | | | | | | | | same effect, but different name, description, and messages. Also, See Invisible is now pure Ench, and has been moved into the Book of Enchantments. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10548 c06c8d41-db1a-0410-9941-cceddc491573
* Remove four scroll-duplicate spells: Detect Curse, Remove Curse, j-p-e-g2009-08-131-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Magic Mapping, and Identify. [*] This leaves six spells in the Divinations school, of which Forescry and See Invisible could easily be moved to other schools; Detect Secret Doors could be removed; and Detect Traps/Items/Creatures should be moved to some kind of misc. item with charges (whether rechargeable or not). I didn't want to remove those until the replacement code is in. I added a hack to make sure the probabilities of Xom "casting" magic mapping remain the same. That will have to be repaired later, preferrably by handling it together with Detect Items/Creatures as a separate Xom effect. Shifts spells in saves and bones files. *) This is different from the recent addition of the scroll of silence in that these four spells pose no risk whatsoever and can be spammed safely, making even the food and magic costs negligible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10542 c06c8d41-db1a-0410-9941-cceddc491573
* Apply kotk's minor fixes patch in [2827129], with minor tweaks.dolorous2009-07-251-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10409 c06c8d41-db1a-0410-9941-cceddc491573
* Make the "more" line of the spell memorization menu show the number ofzelgadis2009-06-251-9/+35
| | | | | | | | | | | | | available spell levels, the number of spell books which can't be read from, and the number of spells which can't be memorized due to player's species. Make the spell memorization confirmation prompt show the number of spell levels to be consumed by memorization, and the number which will be left after memorization. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10042 c06c8d41-db1a-0410-9941-cceddc491573
* First part of the merger of fixed artefacts into unrandom artefactszelgadis2009-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (further changes will be much smaller). Breaks savefile compatibility, and bumps the major savefile version up to 6. Some changes made to some tiles files, but it hasn't been tested with a tiles build. Overview of changes: * Unrand artefacts are now defined in art-data.txt and is turned into C code via util/art-data.pl. This has the dual advantage of being more readable by humans, and that if the unrand data structure changes then you can just change util/art-data.pl and regenerate the C code rather than having to change some 70 different C structs by hand. * util/art-data.pl automatically updates NO_UNRANDARTS, and also automatically generates an enumeration of all the unrands which are equal to their item.special field. * randart.cc and randart.h have been renamed to artefact.cc and artefact.h, since the files covers all types of artefacts, and the differences between randarts, unrandarts and (former) fixed arts have been minimized since the terms were introduced. Also renamed unrand.h to art-data.h * The brands and resistances of former fixed arts are now handled via artefact properties, but the rest of their special behaviours are still hardcoded. * Unrandarts are now distinguished between normal and "special", with the special ones currently just being identical to the list of the formed fixed arts. Special unrandarts are randomly generated less often than normal unrandarts, can be generated in the Abyss if they've been lost, can't be picked up by monsters, and can't be affected by Tukima's Dance. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10035 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2800089: the standard does not guarantee that you can convertharanp2009-06-101-2/+2
| | | | | | | | | | | from integer types to pointers and back. While we're at it, fix an older bug which might trigger if we ever have a platform where different pointer types have different sizes. Technically the standard does not guarantee (I think) that this isn't the case. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9947 c06c8d41-db1a-0410-9941-cceddc491573
* Since fixed artefacts are going to be folded into unrandarts, and unrandartszelgadis2009-06-081-2/+2
| | | | | | | | | | | have already become almost identical to randarts, change "randart" to "artefact" everywhere except for things that deal exclusively with randarts. Artefact related files will be renamed later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9921 c06c8d41-db1a-0410-9941-cceddc491573
* Add spelling fixes.dolorous2009-06-041-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9892 c06c8d41-db1a-0410-9941-cceddc491573
* Spellbook memorisation stuff:zelgadis2009-06-041-70/+107
| | | | | | | | | | | | | | | | | | | | | | | * 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
* Add various fixes to the new spell memorization messages.dolorous2009-06-041-13/+19
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9890 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix compilation for Tiles.j-p-e-g2009-06-031-1/+7
| | | | | | | * Make several of the old uniques appear earlier. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9886 c06c8d41-db1a-0410-9941-cceddc491573
* FR 2722830 and related changes:zelgadis2009-06-021-107/+259
| | | | | | | | | | | | | | | | | * 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
* Reduce screen-flicker and clearing of the message window when re-doing thezelgadis2009-05-281-7/+11
| | | | | | | | | | | previous command (`) (at least for actions involving selecting an item from inventory, selecting an ability to use, selecting a spell to cast, and selecting a spell to memorize). Not tested with the tiles build. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9839 c06c8d41-db1a-0410-9941-cceddc491573
* FR 2722830: make memorize spell work with redo-command (`).zelgadis2009-05-281-1/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9838 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix Bat Form restrictions not applying to choice by clicking (Tiles).j-p-e-g2009-05-181-0/+6
| | | | | | | * Allow </> as synonyms for left/right hand in swap_rings(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9791 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2009-05-171-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9786 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix Xom's interest wrapping around from 0 to 255. (!!!)j-p-e-g2009-03-261-1/+1
| | | | | | | | | | | | | | | | * In xom_acts, if Xom was bored (and now did something bad) reroll interest. * Greatly decrease amusement derived from the player entering a new level. (However, entering a new level via escape hatch or shaft is REALLY amusing, more so the deeper the shaft.) * Xom may be amused if you are caught in a net and there are hostile monsters around. * Fix draconian tiles not showing up correctly for Detect Creatures. * Improve card descriptions output for Triple Draw/Stack Five. * In inventory, add '&' hotkey for useless (== inedible) chunks. Still needs documentation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9557 c06c8d41-db1a-0410-9941-cceddc491573
* * Allow viewing of card descriptions from Triple Draw and Stack Deck.j-p-e-g2009-03-231-48/+67
| | | | | | | | | | * Sort items in 'V' screen according to pickup menu sort order. * Name Xom's randart book gifts more randomly. * Colour items seen by 'x' with message colour tags and same for pickup messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9541 c06c8d41-db1a-0410-9941-cceddc491573
* Call flush_prev_message() in prompt_invent_item().j-p-e-g2009-03-091-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9399 c06c8d41-db1a-0410-9941-cceddc491573
* * Don't count chunks as "useless" (even if inedible) if the player knowsj-p-e-g2009-03-091-0/+1
| | | | | | | | | Sublimation of Blood or Simulacrum. * Fix missing message flush when memorising spells. (This should probably be handled globally in prompt_invent_item().) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9398 c06c8d41-db1a-0410-9941-cceddc491573
* * Rarely, allow randart books to use entirely random names.j-p-e-g2009-03-081-54/+92
| | | | | | | | | * Use monsters' 'x' descriptions as inf.title when hovering your mouse over monster tiles. * A bit of code cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9385 c06c8d41-db1a-0410-9941-cceddc491573
* Add tiles for Azrael and Saint Roka.j-p-e-g2009-03-081-3/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9384 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix wizmode targetting commands not flushing messages correctly.j-p-e-g2009-03-071-12/+59
| | | | | | | | | | | | | * Fix Sif Muna's randart book gifts never containing the Vehumet/Kiku special spells, as was originally intended. (Books found elsewhere will never contain the spells.) * In the highly unlikely case the player already has seen all spells don't crash when attempting to gift a book. Instead, simply make the acquirement fail, but be quiet about "the demon of the infinite void" if it was instigated by Sif Muna. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9368 c06c8d41-db1a-0410-9941-cceddc491573
* Cut 30 obsoleted spells. (Included in docs/obsolete/cut_spells.txt.)j-p-e-g2009-02-261-12/+9
| | | | | | | Breaks saves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9241 c06c8d41-db1a-0410-9941-cceddc491573
* Remove the Book of Healing again, properly this time. Note that the dolorous2009-02-261-52/+40
| | | | | | | spells in it are still available. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9227 c06c8d41-db1a-0410-9941-cceddc491573
* Add Deep Dwarves patch, with some minor changes.haranp2009-02-231-19/+22
| | | | | | | | | | | | | | | | 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
* Remove aptitude multipliers when picking skills for randart books sincej-p-e-g2009-02-231-4/+3
| | | | | | | they're also not used for other acquirements. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9172 c06c8d41-db1a-0410-9941-cceddc491573
* Change Transmutation -> Transmutations for consistency withj-p-e-g2009-02-221-1/+1
| | | | | | | Translocations and because it sounds a bit better. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9150 c06c8d41-db1a-0410-9941-cceddc491573
* * Tweak spell number of randart books some more.j-p-e-g2009-02-211-9/+24
| | | | | | | | | | | | * Loosen restrictions on spell levels of unknown spells for normal books, so there are more matches even for untrained schools. * Add a new option dump_book_spells that, if set to true (default), will dump the spells even for non-randart book. Useful if you don't know the books' contents by heart and want to know spells at your disposal without checking some spoilers. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9143 c06c8d41-db1a-0410-9941-cceddc491573
* * Lower randart probabilities for book acquirement.j-p-e-g2009-02-201-1/+5
| | | | | | | | | * Lower number of spells in randart books. * Fix acquirement generating manuals of (null). * Lower chance of randart books being named after Pan lords. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9142 c06c8d41-db1a-0410-9941-cceddc491573
* Book acquirement again:j-p-e-g2009-02-181-11/+34
| | | | | | | | | | * Weigh magic skills stronger to bias against manuals. * Fall through to randart (theme) books if all spells are known. * Allow spell school combinations (Conj/Fire) in naming randarts after hell lords and others. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9122 c06c8d41-db1a-0410-9941-cceddc491573
* Overhaul book acquirement.j-p-e-g2009-02-151-29/+28
| | | | | | | | | | | | | | | 1. Do a skill check to decide on manual vs. spellbook (except for Xom and Sif Muna who never gift manuals). 2. If a spellbook, pick randart or normal books with fixed chances. 3. Make randart themes dependant on actual skills, not aptitudes. 4. For normal spellbooks, pick the book randomly with weights favouring books with many unknown spells of schools you're highly skilled in. (Bye-bye, fixed book acquirement order!) Formulas (as suggested by David) may need tweaking, feedback welcome! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9093 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2575361]: Properly differentiate between spells a god hates in dolorous2009-02-071-2/+2
| | | | | | | | | general and spells a god dislikes for the purpose of artefact spellbooks, in order to avoid e.g. Elyvilon's hating a book of conjurations. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8950 c06c8d41-db1a-0410-9941-cceddc491573
* Fix starting books being unidentified at game start.j-p-e-g2009-01-311-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8864 c06c8d41-db1a-0410-9941-cceddc491573
* Be less strict about spell school restrictions when naming randartj-p-e-g2009-01-311-19/+64
| | | | | | | | books. Fix titles such as "Sif Muna's A Primer on Magic". Add a fourth step for fixed level naming: starting for level 1. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8860 c06c8d41-db1a-0410-9941-cceddc491573
* FR 2532818: Allow randart books to be named after uniques and legendary mages.j-p-e-g2009-01-291-20/+83
| | | | | | | | 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
* * Move randart book names into a new file, randbook.txt. j-p-e-g2009-01-251-15/+17
| | | | | | | | | * Remove quotes from book names (use the props vector instead for book_has_title()), and occasionally allow random owner names for Sif's gifts (25% chance), as per FR 2532818. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8741 c06c8d41-db1a-0410-9941-cceddc491573
* Consolidate checks for the player's being undead or a demonspawn into dolorous2009-01-181-2/+1
| | | | | | | player_is_unholy(), a la mons_is_unholy(), and use it where possible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8522 c06c8d41-db1a-0410-9941-cceddc491573
* Rename Transmigration -> Transmutation.j-p-e-g2009-01-111-2/+2
| | | | | | | | Move randart spellbook tiles into subfolder /artefact, like for other artefacts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8415 c06c8d41-db1a-0410-9941-cceddc491573
* Extend on Haran's monster resistance description. Thanks, Haran! :)j-p-e-g2009-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now lists: * all resistances on one line, sorted by resistance level. * susceptibility * magic immunity * see/sense invisible * monster speed * flying/levitating An example output: A fire vortex A swirling cloud of flame. It is extremely resistant to fire, very resistant to electricity, and resistant to poison. It is susceptible to cold. It is immune to magical enchantments. It is fast. It can levitate. I also removed all those symbol/quote/etc. checks from the database lookup. Instead describe_monster() is now called directly, so the descriptions are now identical when (v)iewing a monster and when searching the database. In other news, I removed Eringya's Surprising Bouquet since I doubt we'll ever get it implemented, disagree balance-wise, and it was shamelessly nicked from Pratchett in the first place. Breaks saves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8411 c06c8d41-db1a-0410-9941-cceddc491573
* Properly use apostrophise() in a few more places.dolorous2009-01-061-3/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8275 c06c8d41-db1a-0410-9941-cceddc491573
* Adding REVISION() macro to all source files.ennewalker2009-01-041-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8217 c06c8d41-db1a-0410-9941-cceddc491573
* Introduce a number of new uniques taken from a patch by castamir.j-p-e-g2009-01-041-13/+65
| | | | | | | | | | | | | | | | | | | 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
* Fix 2483722: EQ_ALL_ARMOUR not skipping melded armour.j-p-e-g2009-01-031-5/+18
| | | | | | | | | | | Fix 2483708: Transformations regarding wielded non-weapons as meldable. Fix 2483528: Disallow randart book names like "Sif Muna's Lost Book of Boris" Fix 2483332: Silly logic error that only offered fully recharged wands for recharging git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8175 c06c8d41-db1a-0410-9941-cceddc491573
* Vampires may no longer draw blood from summoned monsters.j-p-e-g2008-12-291-1/+1
| | | | | | | | | Remove Vampires being "in touch with the powers of death". Only print Mummies death boost message from xp >= 13 where it actually appears. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8015 c06c8d41-db1a-0410-9941-cceddc491573
* * Dump spells contained in randart spellbooks, marking memorised spellsj-p-e-g2008-12-291-13/+13
| | | | | | | | | | 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