summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_spells.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add clua function spells.failNaruni2013-08-291-0/+7
| | | | Returns fail rate as a number.
* New clua functions spells.range and spells.mana_costNaruni2013-08-281-0/+27
|
* Round two of duplicate code pruning for LOS attack spells.Steve Melenchuk2013-05-061-2/+6
| | | | | | | | | | | | | | | | | | As a reminder for those of you that don't remember b4b189b, this merges handling for player and monster casting of Drain Life, Ozocubu's Refrigeration, and Olgreb's Toxic Radiance so as to prune a lot of duplicate handling between the three spells/abilities; it was reverted because the previous version of this cleanup exhibited problems when several of the same type of monster were in sight (#6566). The new version of the code splits player-as-target and monster-as-target code into their own functions (another concern raised with the original version of this code). Probably this can be cleaned up more, but it's better than either the original version or the first version of the pruned code! This reverts commit bd9d7a8fecc46bef40d884854d0cc567ce64d912.
* Revert "Prune duplicate code for LOS attack spells."Steve Melenchuk2013-01-241-6/+2
| | | | | | | | | | | | | The new version of the code isn't particularly well written (though, apparently, better off than the code it replaces), exhibits problematic behaviour (#6566), and the original motivation for doing so (having monsters cast OTR) isn't as pressing due to the lack of monster designs that use it (there's still the rod of venom, but that can wait for someone to give this issue the attention it deserves). Fixes #6566. This reverts commit b4b189bfd0645a11f2c25c6fb702732516f5bb33.
* Prune duplicate code for LOS attack spells.Steve Melenchuk2013-01-201-2/+6
| | | | | | | | | | | | | | This commit merges the handling for Drain Life, Ozocubu's Refrigeration, and Olgreb's Toxic Radiance, which shared a lot of duplicate code, into one code path. This includes the player and monster implementations of these spells. Yes, this means monsters can now cast OTR (watch out for rods of venom!); the tweaks to allow ghosts to do this are in place as well. This changes the signature of the dlua function spells.toxic_radiance; as far as I am aware this function is not currently used anywhere. (Now, who wants to start work on Olgreb's Toxic Radiator?)
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-4/+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.
* ... and check if it works.Adam Borowski2010-09-301-1/+0
|
* Move the remaining damage spells into spl-damage.cc.Johanna Ploog2010-08-221-1/+1
| | | | | This leaves mostly enchantments in spells1-4, with only weapon branding spells in spells2.cc, in particular.
* Trim unnecessary #includes.Adam Borowski2010-01-131-6/+0
|
* A start at a dLua spells library.Jude Brown2009-12-251-0/+30
Provides wrappers for non-player Toxic Radiance and Ozocubu's Refrigeration. These are basically just an adjustment of kill categories and messages to allow them to be used as background effects in WizLabs (Ozocubu's and Olgreb's). Hopefully a wrapper for monster (and possibly player)-cast bolt structures can also be included, which could then be accessed with the (planned) Lua traps functionality.