summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.h
Commit message (Collapse)AuthorAgeFilesLines
* Add new targetting flag SPFLAG_TARG_OBJ for object targetting.Robert Vollmert2009-11-241-18/+19
| | | | | Also make apportation use this. Apportation now doesn't target out-of-sight objects anymore.
* tiles: spell_list() now shows spell tilesMatthew Cline2009-11-211-2/+1
| | | | Also, spell_list() now always displays in tiles mode for tiles builds.
* Split chaotic things into unclean and chaotic things.David Lawrence Ramsey2009-11-191-24/+25
| | | | | | | | | | Chaotic things are now shapeshifters, mutators, etc., while unclean things are diseasing things, rotting things, etc. Zin still hates both. As good gods treat both unholy and evil monsters as evil, he'll treat both unclean and chaotic monsters as chaotic. Note that silver will only do extra damage to chaotics, as before.
* list_spells(): tiles menu, selector callbackMatthew Cline2009-11-181-1/+6
| | | | | | | | The list_spells() menu can now optionally be a tiles menu, and it can be passed a callback to select which spells to list or not (and to select which spells should be greyed-out). Also made _calc_spell_range() a globally available function.
* Add spell flag SPFLAG_HASTY, and mark hasty spells with it.David Lawrence Ramsey2009-11-091-10/+11
|
* Add spell flag SPFLAG_CHAOTIC, and mark all chaotic spells with it.David Lawrence Ramsey2009-11-091-11/+12
| | | | | The list of chaotic spells is now generalized instead of being hardcoded in is_chaotic_spell(). This is modeled somewhat after SPFLAG_UNHOLY.
* Remove SPFLAG_DEVEL and the only spell that had it set, Disrupt.Vsevolod Kozlov2009-11-081-2/+1
|
* Remove "called from:" comments.Vsevolod Kozlov2009-11-031-14/+0
| | | | | | These were of questionable use and freshness. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Don't cap spell power for failure rate calculations.Robert Vollmert2009-10-181-1/+1
| | | | | | | This means that capped spells continue getting easier to cast after hitting the cap, which is probably how it should be. Fixes 2881204.
* If Xom is making you blink, don't allow it to be a controlled blink.David Lawrence Ramsey2009-10-131-1/+1
|
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Apply anonymous patch in [2836447], with a few tweaks, to fix spellDavid Lawrence Ramsey2009-09-241-1/+1
| | | | hunger descriptions.
* Add more spelling fixes.David Lawrence Ramsey2009-09-241-5/+5
|
* Add an inventory-like region for the Tiles version to make spellsj-p-e-g2009-09-101-1/+1
| | | | | | | | clickable. '_' toggles between inventory and spell display. Actual tiles are still missing, but everything works as it should. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10648 c06c8d41-db1a-0410-9941-cceddc491573
* FR 2722830 and related changes:zelgadis2009-06-021-0/+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
* Some spellcasting modifications, as discussed on c-r-d.j-p-e-g2009-05-031-2/+3
| | | | | | | | | | | | | * Spells are marked grey if you lack the necessary magic or if there are no visible monsters within range. * z bails out if there are no monsters in range * Z is the same as the old z behaviour * Wands now need to be e(V)oked. Feedback welcome! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9727 c06c8d41-db1a-0410-9941-cceddc491573
* * Add description toggle (only '?' this time) into spellcasting menu andj-p-e-g2009-03-111-2/+2
| | | | | | | | | | make I use a loop as well, so that z?? and I are now functionally identical. (Which of course brings up the question of whether you really need an additional key to do this. :p) * Simplify a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9413 c06c8d41-db1a-0410-9941-cceddc491573
* Got rid of setup_dragon(), moving it's functionality into setup_mons_cast() andzelgadis2008-12-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | mons_spells(), and added the new spells Fire Breath, Cold Breath and Draconian Breath to trigger that functionality. Also added the new spell Acid Splash to replace monstuff's _plant_spit(), and Sticky Flame Splash, which is exactly the same as Sticky Flame except for the messages it gives and when it makes noise (monsters now spit sticky flame instead of breathing it). All things that were handled as monster special abilities are still handled as such, and were just changed to manually invoke mons_cast(). The spell messages in dat/database/monspell.txt can now take advantage of a new substitution, "@target@", which is expanded into the spell's target. Added the spell flags SPFLAG_INNATE, for monster spells which are innate even when the monster is a priest or wizard, and which can be used by them when silenced, and SPFLAG_NOISY, for spells which produce noise even when used by monsters other than priests or wizards. Added the monster class flags M_SPELL_NO_SILENT, for monsters which aren't wizards or priests, yet still can't use spells if silenced (currently only used for Geryon blowing his horn to summon beasts), and M_NOISY_SPELLS, for monsters which can cast spells when silenced, yet whose spells make noise when not silenced (currently only used by curse skulls and Murray). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7828 c06c8d41-db1a-0410-9941-cceddc491573
* Savefile compatibility breakage from keeping track of which spells have beenzelgadis2008-12-041-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | | | | 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
* Added range information to alternate spell display (dpeg).haranp2008-10-101-1/+1
| | | | | | | Quelled a warning on lack of virtual destructors. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7205 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
* Implemented monster spell miscasts. Spell miscasting is now handledzelgadis2008-07-291-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by the MiscastEffect class, which has helper methods to make most of the non-helper code agnostic with respect to whether the miscaster is the player or a monster. Mummy death curses now affect monsters, and Zot traps now directly affect friendly and good-neutral monsters. In wizard mode you can force the player or a monster to miscast by targeting it and pressing 'M'. Todo/issues/notes: * Clouds now have a killer_type in addition to a kill_category. * There aren't any divination monster miscast effects yet. * Many of the harmless message-only miscast effects are missing monster messages. * If a monster actually miscasts a spell (not getting a mummy death curse or setting off a Zot trap) and this kills both the monster and the player then the wrong monster will be listed in hiscore entry. Since monsters can't do true spell miscasts yet, this can wait. * There was old, non-functioning code making Zot traps heal, haste or turn invisible hostile monsters that triggered it. I fixed it and then commented it out. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6723 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2021696: allow_self_target = no even forbidding self-targetting forj-p-e-g2008-07-281-1/+1
| | | | | | | | | | area effect spells (now prompts) Fix 2028704: spell view toggle 'I' preventing forgetting spell slot 'I' Allow intelligent summoned monsters to equip themselves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6703 c06c8d41-db1a-0410-9941-cceddc491573
* Bug 2005002: Allow friendly and neutral-good monsters to cast spells while inzelgadis2008-06-291-1/+4
| | | | | | | | | sanctuary, and allow hostile and neutral monsters to cast spells once outside of sanctuary as long as it won't harm anything inside of sanctuary. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6205 c06c8d41-db1a-0410-9941-cceddc491573
* Added SPFLAG_NEUTRAL for utility spells which should use TARG_ANY.haranp2008-06-151-3/+4
| | | | | | | | Currently only used by Dig. We might want to redo Apportation to use this at some point. [1994284] git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5841 c06c8d41-db1a-0410-9941-cceddc491573
* Add comments documenting exceptions to the general rule of making dolorous2008-06-101-2/+2
| | | | | | | | | monster-creating spell (mis)casts produce god gifts. The exceptions are all natural phenomena treated as monsters: ball lightning, spatial vortices, and fire vortices. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5708 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-06-071-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5542 c06c8d41-db1a-0410-9941-cceddc491573
* Two changes:j-p-e-g2008-04-251-1/+3
| | | | | | | | | | | | | | | | | | | | | 1.) If Beogh can't find a nearby follower in LOS to bless, try again without the LOS restriction (but still nearby). If this also fails, recall a small amount of followers (1 + rnd(4) + rnd(4)) on the level. I don't think there's much harm in Beogh actively doing something you already have as an invocation as long as it doesn't make the invocation superfluous (and this doesn't). In this case, the chance of this happening should probably be lowered, and actual reinforcement should be rarer still. 2.) Identify magical staves if you have at least 4 skill levels in the corresponding spell school when wielding it, or gain the 4th level while wielding it. (I decided on 4 because that is what most mages start out with in their special school, and it seems a good enough treshold.) Prior to that, there's still the random identification chance at casting an appropriate spell, as before. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4639 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-1/+1
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* [1757174] Disallow mapping in labyrinths.dshaligram2007-10-241-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2536 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+20
| | | | | | | | | | | | | 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
* General code cleanups and goto removal.haranp2007-07-131-1/+1
| | | | | | | Fixed a possible crash when using Backspace to restart character selection. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1855 c06c8d41-db1a-0410-9941-cceddc491573
* Broke up the monolithic miscast_effect function (used to be 1500 lines long!)haranp2007-07-121-1/+1
| | | | | | | Removed the return value as it was never getting used. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1850 c06c8d41-db1a-0410-9941-cceddc491573
* Coloured power display. This is, for now, a rather extreme hack.haranp2007-07-031-3/+1
| | | | | | | | Note that some spells (e.g. Apportation) have no actual power limits, so they will always be 'red'. Suggestions welcome. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1736 c06c8d41-db1a-0410-9941-cceddc491573
* Initial spell-power-bar implementation (1746561). No colours yet.haranp2007-07-031-1/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1730 c06c8d41-db1a-0410-9941-cceddc491573
* Running now respects travel_delay.haranp2007-06-301-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1698 c06c8d41-db1a-0410-9941-cceddc491573
* Added a spell inspection screen, bound to 'I'.haranp2007-06-291-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1694 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented 1715578: pressing '!' in the Z? screen toggles betweenharanp2007-06-291-0/+1
| | | | | | | showing schools/success and hunger/power. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1693 c06c8d41-db1a-0410-9941-cceddc491573
* Spell power strings now reflect power caps.haranp2007-05-071-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1413 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed surges being all wrong (1705614.)haranp2007-04-231-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1345 c06c8d41-db1a-0410-9941-cceddc491573
* Added ice statues.dshaligram2007-04-091-3/+3
| | | | | | | | | | Monster spells now use spell_type instead of the old mon_spell_type. Fixed buggy behaviour when banished from Labyrinth. DGL_WHEREIS was not including current time, fixed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1275 c06c8d41-db1a-0410-9941-cceddc491573
* Type safety on SPRET results.haranp2007-04-041-1/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1210 c06c8d41-db1a-0410-9941-cceddc491573
* More streamlining, this time of code which shows power and spell failure.haranp2006-12-111-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@616 c06c8d41-db1a-0410-9941-cceddc491573
* Merged stone_soup r15:451 into trunk.dshaligram2006-11-221-2/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up a mistake in the SVN import.nlanza2006-08-131-0/+49
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10 c06c8d41-db1a-0410-9941-cceddc491573