summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add a function x_chance_in_y(x,y) to replace the variousj-p-e-g2008-07-061-7/+9
| | | | | | | | random2(y) < x checks, e.g. x_chance_in_y(weight, totalweight). This should make things a bit more readable. Apply it to a number of files. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6428 c06c8d41-db1a-0410-9941-cceddc491573
* Add more miscellaneous minor fixes.dolorous2008-07-061-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6426 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2011576]: The "Which direction?" prompt is no longer given twice dolorous2008-07-061-29/+20
| | | | | | | for spells that are wrappers around burn_freeze() (e.g. Freeze). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6425 c06c8d41-db1a-0410-9941-cceddc491573
* Add miscellaneous minor fixes.dolorous2008-07-061-15/+15
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6421 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1945389: Detect Creatures not clearing monsters detected on changedj-p-e-g2008-07-061-7/+22
| | | | | | | terrain. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6419 c06c8d41-db1a-0410-9941-cceddc491573
* Remove debugging statement, minor clean up.j-p-e-g2008-07-031-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6369 c06c8d41-db1a-0410-9941-cceddc491573
* Only place a newly created monster (summons) on a sanctuary square if itzelgadis2008-06-291-1/+1
| | | | | | | | | | | | | | | is friendly. Only allow friendly and neutral-good monsters to blink or teleport onto a sanctuary square. Don't allow corpses on sanctuary squares to be rotted or animated. Restrict monster cantrip messages to self-buff types if the player is in sanctuary. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6211 c06c8d41-db1a-0410-9941-cceddc491573
* Fix another two instances of monster placement returning false j-p-e-g2008-06-261-66/+43
| | | | | | | instead of -1. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6155 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-26/+26
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2001885]: "Nothing appears to happen." was being printed when dolorous2008-06-241-1/+1
| | | | | | | "Summon Elemental" succeeded, rather than when it failed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6115 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-241-10/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6100 c06c8d41-db1a-0410-9941-cceddc491573
* Add miscellaneous minor fixes.dolorous2008-06-241-2/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6099 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-171-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5918 c06c8d41-db1a-0410-9941-cceddc491573
* Fix attack conduct handling to register more than one conduct for an dolorous2008-06-171-4/+4
| | | | | | | | | | | | | | | attack again. For example, if you make an unchivalric attack on a neutral monster, both the "unchivalric attack" and "attack neutral" conducts will be handled again, instead of just the former (big oops). Passing a constant-sized array of god_conduct_triggers and adding wrapper functions to enable and disable them all is not the most elegant solution, but I don't quite have the time or the understanding right now to rewrite the god_conduct_trigger class to handle more than one conduct at once, and this does work in the meantime. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5914 c06c8d41-db1a-0410-9941-cceddc491573
* Overhaul god gift handling again so that we can tell which god sent dolorous2008-06-121-35/+36
| | | | | | | | | | | which gift. There was an unused god parameter in the monsters struct, which was probably intended to hold which god a monster worshipped. I've used it as an indicator of which god sent the monster, under the assumption that gods would send their own worshippers as gifts. (I hope this isn't an abuse of it.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5748 c06c8d41-db1a-0410-9941-cceddc491573
* Add yet more minor cosmetic fixes.dolorous2008-06-121-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5747 c06c8d41-db1a-0410-9941-cceddc491573
* After some more thought, remove the god gift exceptions for dolorous2008-06-101-4/+3
| | | | | | | | natural-phenomenon-type monsters. Fire vortices still need to be dealt with properly, though. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5716 c06c8d41-db1a-0410-9941-cceddc491573
* Add comments documenting exceptions to the general rule of making dolorous2008-06-101-0/+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
* Reorganize again.dolorous2008-06-101-134/+133
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5707 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up handling of orange rats in cast_summon_small_mammals().dolorous2008-06-101-4/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5704 c06c8d41-db1a-0410-9941-cceddc491573
* Clean-up (renaming static methods and comments) in a number of files.j-p-e-g2008-06-101-14/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5703 c06c8d41-db1a-0410-9941-cceddc491573
* Reorder spells in your_spells() and clean up.j-p-e-g2008-06-101-25/+27
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5702 c06c8d41-db1a-0410-9941-cceddc491573
* Don't mark spatial vortices as god gifts anymore, as (a) they're just dolorous2008-06-101-23/+0
| | | | | | | | | | phenomena that the game happens to treat as monsters (as opposed to actual creatures), and (b) there's no easy way to mark fire vortices as code for when god gifts, either, since they're only placed in the beam routine for "Fire Storm". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5679 c06c8d41-db1a-0410-9941-cceddc491573
* Add a few more message tweaks.dolorous2008-06-091-13/+11
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5677 c06c8d41-db1a-0410-9941-cceddc491573
* Tweak summoning-related messages again.dolorous2008-06-091-14/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5676 c06c8d41-db1a-0410-9941-cceddc491573
* Add power adjustments.dolorous2008-06-091-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5671 c06c8d41-db1a-0410-9941-cceddc491573
* Convert the shadow- and spatial vortex-summoning routines to use power dolorous2008-06-091-1/+4
| | | | | | | values, in case they're ever used elsewhere. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5670 c06c8d41-db1a-0410-9941-cceddc491573
* Consolidate the shadow- and vortex-summoning routines some more.dolorous2008-06-091-4/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5668 c06c8d41-db1a-0410-9941-cceddc491573
* Consolidate the (single) spatial vortex-summoning routines, and add more dolorous2008-06-091-6/+23
| | | | | | | minor cleanups. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5667 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up summoning routines a bit more.dolorous2008-06-091-25/+21
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5660 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more summoning-related cleanups.dolorous2008-06-091-12/+18
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5655 c06c8d41-db1a-0410-9941-cceddc491573
* Add more summoning-related cleanups.dolorous2008-06-091-11/+21
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5653 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up "Sticks to Snakes" a bit more.dolorous2008-06-091-36/+37
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5646 c06c8d41-db1a-0410-9941-cceddc491573
* Use the proper flag type to indicate god gifts (oops).dolorous2008-06-091-15/+15
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5645 c06c8d41-db1a-0410-9941-cceddc491573
* Add a few last miscellaneous minor fixes.dolorous2008-06-091-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5626 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up the routines to animate the dead.dolorous2008-06-091-345/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5621 c06c8d41-db1a-0410-9941-cceddc491573
* Move summon_demon_type() to spells3.cc as well.dolorous2008-06-081-28/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5613 c06c8d41-db1a-0410-9941-cceddc491573
* Move most of the demon-summoning routines to spells3.cc, since they're dolorous2008-06-081-120/+0
| | | | | | | unholy. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5611 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up "Twisted Resurrection" some more.dolorous2008-06-081-103/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5610 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-081-5/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5609 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up "Twisted Resurrection" a bit.dolorous2008-06-081-44/+43
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5608 c06c8d41-db1a-0410-9941-cceddc491573
* Add more minor cosmetic fixes.dolorous2008-06-081-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5605 c06c8d41-db1a-0410-9941-cceddc491573
* Reorganize again, and move cast_summon_wraiths() to spells3.cc, since dolorous2008-06-081-39/+0
| | | | | | | it's a necromantic spell. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5604 c06c8d41-db1a-0410-9941-cceddc491573
* Reorganize spells a bit. "Summon Horrible Things" is now in spells3.cc, dolorous2008-06-081-64/+0
| | | | | | | with the other unholy spells. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5600 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-06-081-6/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5595 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up dancing_weapon().dolorous2008-06-081-0/+85
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5594 c06c8d41-db1a-0410-9941-cceddc491573
* Add miscellaneous minor fixes.dolorous2008-06-081-3/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5593 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up "Conjure Ball Lightning".dolorous2008-06-081-0/+50
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5592 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up "Sticks to Snakes", too.dolorous2008-06-081-0/+120
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5587 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up vampiric_drain() a bit.dolorous2008-06-081-16/+12
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5586 c06c8d41-db1a-0410-9941-cceddc491573