summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add a function x_chance_in_y(x,y) to replace the variousj-p-e-g2008-07-061-11/+8
| | | | | | | | 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 minor cosmetic fixes.dolorous2008-07-041-0/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6379 c06c8d41-db1a-0410-9941-cceddc491573
* Oops, should change you.pet_target before calling behaviour_event(), notzelgadis2008-07-041-3/+3
| | | | | | | after. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6378 c06c8d41-db1a-0410-9941-cceddc491573
* Sanctuary now reveals all traps within its area, not just those in LOS.zelgadis2008-07-031-3/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6376 c06c8d41-db1a-0410-9941-cceddc491573
* Give falvour message when invoking sanctuary removes bloodstains.zelgadis2008-07-021-6/+32
| | | | | | | | Reveal hidden traps inside sanctuary when it's first invoked if the traps are in LOS. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6358 c06c8d41-db1a-0410-9941-cceddc491573
* When laying down Sanctuary make all pets inside it stop attacking and movezelgadis2008-07-021-2/+15
| | | | | | | | | | | | | | | | | | | towards you. You can get them to attack while inside Sanctuary by giving them an order to attack a specific monster, and if they do attack and violate Sanctuary then it will be removed. Attempting to give such an order will give a warning that it might violate Sanctuary. Prevent confused and berserking pets from violating Sanctuary, since you can't order them not to. Prevent monsters fleeing Sanctuary from attacking monsters which are blocking their flight path. The player attacking him/her-self because of confusion no longer vilates Sanctuary. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6312 c06c8d41-db1a-0410-9941-cceddc491573
* Add more message tweaks.dolorous2008-07-011-6/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6289 c06c8d41-db1a-0410-9941-cceddc491573
* Add capitalization fixes.dolorous2008-07-011-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6288 c06c8d41-db1a-0410-9941-cceddc491573
* Make initial sanctuary be circular in shape rather than square.zelgadis2008-07-011-28/+49
| | | | | | | | | | | | | | Remove non-harmless clouds when laying down sanctuary, and don't allow non-harmless clouds to speard into sanctuary or be placed on it. Don't let explosions spread into sanctuary (probably needs a flavour message). If a giant spore or ball lightning somehow explodes while in sanctuary then give a message about Zin containing it's explosion, and skip the call to explosion(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6284 c06c8d41-db1a-0410-9941-cceddc491573
* Multiple sanctuary fixes:zelgadis2008-06-291-20/+33
| | | | | | | | | | | | | * Set sanctuary floor property before checking if monster will flee. * Make mimics teleport away, since they can't move. * Don't count as fleeing monsters which can't flee, like plants. * Don't tell the player about unseen fleeing monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6213 c06c8d41-db1a-0410-9941-cceddc491573
* Only place a newly created monster (summons) on a sanctuary square if itzelgadis2008-06-291-0/+3
| | | | | | | | | | | | | | | 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 a bug in monster summoning that was causing crashes, for examplej-p-e-g2008-06-261-11/+7
| | | | | | | | | | when attempting to cast Shadow Creatures in a bazaar (which is bound to fail, anyway). I guess it would have also caused crashes anywhere else where the level was devoid of monsters and creating one failed - for whatever reason. I don't actually know how likely that combination is. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6151 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-26/+31
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* In halo_radius(), use LOS_RADIUS properly instead of hardcoding its dolorous2008-06-201-1/+1
| | | | | | | value. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6000 c06c8d41-db1a-0410-9941-cceddc491573
* Make _equip_undead() use coord_defs.dolorous2008-06-181-3/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5959 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-171-2/+2
| | | | 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-8/+8
| | | | | | | | | | | | | | | 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
* Add yet more miscellaneous minor fixes.dolorous2008-06-161-7/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5888 c06c8d41-db1a-0410-9941-cceddc491573
* Make -raise_corpse() and animate_a_corpse() use coord_defs instead of x dolorous2008-06-161-10/+9
| | | | | | | and y coordinates. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5882 c06c8d41-db1a-0410-9941-cceddc491573
* Make animate_a_corpse() and animate_dead() use the new stack_iterator dolorous2008-06-161-33/+19
| | | | | | | class. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5881 c06c8d41-db1a-0410-9941-cceddc491573
* Make demon summoning via invocations produce friendly instead of charmed dolorous2008-06-141-1/+1
| | | | | | | demons again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5808 c06c8d41-db1a-0410-9941-cceddc491573
* Overhaul god gift handling again so that we can tell which god sent dolorous2008-06-121-43/+43
| | | | | | | | | | | 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
* Fix compilation.dolorous2008-06-121-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5746 c06c8d41-db1a-0410-9941-cceddc491573
* Add a few more miscellaneous minor fixes.dolorous2008-06-121-8/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5745 c06c8d41-db1a-0410-9941-cceddc491573
* Remove now-unused function.dolorous2008-06-121-35/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5743 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more minor cosmetic fixes.dolorous2008-06-101-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5719 c06c8d41-db1a-0410-9941-cceddc491573
* Modify Evaporate and Stinking Cloud to prompt when firing throughj-p-e-g2008-06-101-1/+1
| | | | | | | | allies. Note: This does still not handle the actual clouds, just the basic beam. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5701 c06c8d41-db1a-0410-9941-cceddc491573
* In _raise_corpse(), if animating a corpse fails because there's nowhere dolorous2008-06-101-3/+5
| | | | | | | | to place the resulting zombie, return false and don't destroy the corpse. This should fix [1988590]. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5691 c06c8d41-db1a-0410-9941-cceddc491573
* Add another message tweak.dolorous2008-06-101-3/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5681 c06c8d41-db1a-0410-9941-cceddc491573
* Add a few more message tweaks.dolorous2008-06-091-13/+16
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5677 c06c8d41-db1a-0410-9941-cceddc491573
* Add power adjustments.dolorous2008-06-091-2/+2
| | | | 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-2/+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-7/+26
| | | | 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-4/+4
| | | | | | | minor cleanups. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5667 c06c8d41-db1a-0410-9941-cceddc491573
* Consolidate the shadow-summoning routines.dolorous2008-06-091-0/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5664 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-091-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5663 c06c8d41-db1a-0410-9941-cceddc491573
* Add miscellaneous minor fix.dolorous2008-06-091-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5661 c06c8d41-db1a-0410-9941-cceddc491573
* Add a few miscast-related tweaks.dolorous2008-06-091-3/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5659 c06c8d41-db1a-0410-9941-cceddc491573
* Fix simulacrum creation message.dolorous2008-06-091-2/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5657 c06c8d41-db1a-0410-9941-cceddc491573
* Add more message fixes for angered monsters.dolorous2008-06-091-8/+17
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5656 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-091-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5654 c06c8d41-db1a-0410-9941-cceddc491573
* Add more summoning-related cleanups.dolorous2008-06-091-65/+65
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5653 c06c8d41-db1a-0410-9941-cceddc491573
* Update stash tracker when teleporting, to keep track of items picked upj-p-e-g2008-06-091-9/+11
| | | | | | | | | | | | | | or dropped up in the same turn as teleporting. Note: In tiles, the tile for a grid isn't updated before you move aside to see it, so when you teleport, the remembered grid still may show items that you picked up several turns ago and does not show what you might have dropped there, provided you stayed in the same place before teleporting. I don't know how to fix that, so I'm handing it over to Enne. *waves* git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5652 c06c8d41-db1a-0410-9941-cceddc491573
* Add more miscellaneous minor fixes.dolorous2008-06-091-3/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5648 c06c8d41-db1a-0410-9941-cceddc491573
* Use the proper flag type to indicate god gifts (oops).dolorous2008-06-091-10/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5645 c06c8d41-db1a-0410-9941-cceddc491573
* Bug 1837610: if you pick up an item in the exact round that you're teleportedzelgadis2008-06-091-0/+5
| | | | | | | then the level map will show that item as still being on the floor. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5635 c06c8d41-db1a-0410-9941-cceddc491573
* Add more miscellaneous minor fixes.dolorous2008-06-091-2/+20
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5623 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up the routines to animate the dead.dolorous2008-06-091-0/+337
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5621 c06c8d41-db1a-0410-9941-cceddc491573
* Add miscellaneous minor fixes.dolorous2008-06-091-20/+20
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5620 c06c8d41-db1a-0410-9941-cceddc491573
* Move summon_demon_type() to spells3.cc as well.dolorous2008-06-081-0/+28
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5613 c06c8d41-db1a-0410-9941-cceddc491573