summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.cc
Commit message (Collapse)AuthorAgeFilesLines
* Apply recent commits to 0.4, including Matthew's evil zoo fix.j-p-e-g2008-07-091-2/+2
| | | | | | | Now how do I change the properties to native again? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6465 c06c8d41-db1a-0410-9941-cceddc491573
* Add a function x_chance_in_y(x,y) to replace the variousj-p-e-g2008-07-061-9/+6
| | | | | | | | 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-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6426 c06c8d41-db1a-0410-9941-cceddc491573
* Only let Elyvilonite players automatically target enemy monsters for dolorous2008-07-061-3/+5
| | | | | | | healing, as only they can pacify enemy monsters that way. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6420 c06c8d41-db1a-0410-9941-cceddc491573
* Remove debugging statement, minor clean up.j-p-e-g2008-07-031-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6369 c06c8d41-db1a-0410-9941-cceddc491573
* Only apply targeting via monster list to spells and such wherej-p-e-g2008-07-021-3/+3
| | | | | | | targeting monsters is actually needed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6338 c06c8d41-db1a-0410-9941-cceddc491573
* If an explosion has its center in Sanctuary then give a message aboutzelgadis2008-07-021-2/+2
| | | | | | | | | Zin containing the explosion. Mainly for miscast effects which cause explosions, but also catches the player casting spells which cause explosions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6323 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more minor cosmetic fixes.dolorous2008-06-301-10/+11
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6250 c06c8d41-db1a-0410-9941-cceddc491573
* Enable healing of allies using Elyvilon's power.dolorous2008-06-291-7/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6217 c06c8d41-db1a-0410-9941-cceddc491573
* And allow targeting anything, so that cycling via "-" works again if dolorous2008-06-291-2/+2
| | | | | | | only enemy monsters are around. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6210 c06c8d41-db1a-0410-9941-cceddc491573
* In _healing_spell(), use the same targeting options for dolorous2008-06-291-1/+4
| | | | | | | spell_direction() that were used for direction() before. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6209 c06c8d41-db1a-0410-9941-cceddc491573
* Use spell_direction() in _healing_spell(), to allow cycling through dolorous2008-06-291-12/+11
| | | | | | | targets via "-". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6203 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2004501: buggy ?identify; also finally properly id ?identify itselfj-p-e-g2008-06-281-6/+21
| | | | | | | | after a successful identification (if there are several). Fix 2004793: wandering mushroom flees - for real, this time (I hope). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6189 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-14/+16
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Improve targetting via monster list, add a new option to define thej-p-e-g2008-06-251-1/+1
| | | | | | | toggle's initial setting, and update/correct the documentation a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6135 c06c8d41-db1a-0410-9941-cceddc491573
* FR 1993535: If asking the user for an item, and the player has none of thezelgadis2008-06-241-4/+1
| | | | | | | | type of item requested, then mpr() the message about it, rather than bringing up an empty menu with the message being the menu's title. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6105 c06c8d41-db1a-0410-9941-cceddc491573
* When pacifying, check holiness in the right places.dolorous2008-06-231-4/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6086 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up monster pacifying a bit: don't allow it to work for stationary dolorous2008-06-231-0/+5
| | | | | | | monsters, or for monsters that aren't holy, natural, undead, or demonic. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6085 c06c8d41-db1a-0410-9941-cceddc491573
* For jewellery with pluses and wands, only make an ident note when thezelgadis2008-06-191-3/+1
| | | | | | | | | | | | first item of the type is identified, not when the charges/pluses of any item of the type is identified. Make sure that artefacts have nothing to do with the identification level of jewellery by making versions of set_ident_type() and get_ident_type() which accept a full item_def as a parameter. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5973 c06c8d41-db1a-0410-9941-cceddc491573
* Fix mephitic cloud allowing no self-targetting. (BR1995505)j-p-e-g2008-06-171-14/+18
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5920 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up some more.dolorous2008-06-161-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5886 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up and consolidate most of the monster pacification routines.dolorous2008-06-161-9/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5885 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-141-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5804 c06c8d41-db1a-0410-9941-cceddc491573
* Make TSO's abjuration protection properly increase with monster hit dice dolorous2008-06-131-1/+1
| | | | | | | instead of decrease (oops). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5788 c06c8d41-db1a-0410-9941-cceddc491573
* Display abjuration protection messages for hostile god gifts in the dolorous2008-06-131-2/+8
| | | | | | | proper god channels. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5787 c06c8d41-db1a-0410-9941-cceddc491573
* Add abjuration protection for gifts from TSO and Trog, both friendly and dolorous2008-06-131-1/+16
| | | | | | | | hostile. (TSO currently doesn't send any abjurable hostile gifts, but the framework is in place for if/when that changes.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5786 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more minor cosmetic fixes.dolorous2008-06-131-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5772 c06c8d41-db1a-0410-9941-cceddc491573
* Implement the Petrify spell in a rather basic variant, and replace the j-p-e-g2008-06-121-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | player spell "Paralyse" with it, i.e. not the wand/potion/misc. effects. Petrify is a 4th level spell of the Enchantment/Transmigrations school (a unique combination, I believe), all other values (incl. the level) were shamelessly stolen from Paralysis. Anyway, it consists of two elements (so I actually added TWO new enchantments), Petrifying and Petrified. A monster that is petrifying cannot move around but can perform actions like hitting adjacent monsters or casting spells at a slowed rate (1.5 of the normal cost). Once this sub-enchantment runs out (happens faster) the monster cannot move or act anymore, so it works like Paralysis. The damage you do during stabbing is one third of what you'd do otherwise, for both states of enchantment, and for both stabbing counts as unchivalric behaviour. It has not been implemented as a monster spell, and ghosts of characters that had it will use Paralyse instead. Consequently, the effect on the player (in self targetting) only handles the Petrified part. Numbers, esp. enchantment timeout, will need tweaking. They're currently Petrifying: cturn = 50 / _mod_speed(10, mons->speed); Petrified: cturn = std::max(8, 150 / (1 + modded_speed(mons, 5))) because I wanted the first to always run out faster than the second, but at the same time make the ratio of Petrifying/Petrified tilt in favour of the first for powerful monsters. The numbers are more or less made up, and tested with different monsters in wizard mode. Still, could be anything between too weak and overpowered, though the latter is more likely. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5761 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-111-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5734 c06c8d41-db1a-0410-9941-cceddc491573
* Remove #define SHUT_LABYRINTH because I don't think it's needed anymore.j-p-e-g2008-06-111-2/+2
| | | | | | | Add more information to the version command. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5729 c06c8d41-db1a-0410-9941-cceddc491573
* Add more miscellaneous minor cleanups.dolorous2008-06-101-37/+30
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5718 c06c8d41-db1a-0410-9941-cceddc491573
* Modify Evaporate and Stinking Cloud to prompt when firing throughj-p-e-g2008-06-101-16/+34
| | | | | | | | 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
* Yikes, so many files! And all I did was add more item evaluationj-p-e-g2008-06-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | functions for menu colouring and pickup... Added: emergency_item, good_item, dangerous_item, bad_item, and useless_item, all taking into account player species and mutations, so e.g. =see invisible is useless for Naga, and !poison is always bad but only useless if you don't know Evaporate. Never autopickup useless, dangerous (e.g. ?immolation) or inedible items, and simplify the item colour/pickup options accordingly. I'll have to see if pickup.lua is still even needed after this. Removed the menu_colour_prefix_id option as I can't see any reason to turn it off. Oh, and fixed a bug where Kenku were unable to stop levitating if they gained level 15 while levitating. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5658 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1981533: Mouseclick allows eating inappropriate food types.j-p-e-g2008-06-021-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5434 c06c8d41-db1a-0410-9941-cceddc491573
* Add more noise-related cleanups.dolorous2008-05-281-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5318 c06c8d41-db1a-0410-9941-cceddc491573
* Use the "sound" message channel properly with some sound-related dolorous2008-05-281-1/+2
| | | | | | | messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5309 c06c8d41-db1a-0410-9941-cceddc491573
* Have cast_revitalisation() do all its own piety handling, as it's a bit dolorous2008-05-221-9/+11
| | | | | | | cleaner that way. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5183 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-05-221-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5182 c06c8d41-db1a-0410-9941-cceddc491573
* Fix vitalisation chain handling when we lose enough piety to break the dolorous2008-05-221-2/+4
| | | | | | | chain. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5181 c06c8d41-db1a-0410-9941-cceddc491573
* Improve player beam tracer for firing through friendlies:j-p-e-g2008-05-221-27/+29
| | | | | | | | | | | | | | * name the monster you're firing through ("your goblin zombie") * use maximum possible range * make it work for spells and abilities, as well Still todo: * apply the same logic to firing missiles * don't prompt for monsters that wouldn't be harmed (e.g. living allies for Dispel Undead, etc.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5177 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1941612: Zapping wands known to be empty shouldn't cost a turn, butj-p-e-g2008-05-211-2/+4
| | | | | | | | | | | | | | empty wands with unknown charges should cost a turn. Experimentally add a "Really fire through friendly creature?" prompt when a beam tracer passes through a friend. This currently uses the existing monster tracer and probably has huge problems because of this. In any case, it appears to only work sometimes, though consistently for wands in my testing, possibly because the range is fixed (?) when compared to spells. (This is part of FR 1962548.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5171 c06c8d41-db1a-0410-9941-cceddc491573
* Add another comment fix.dolorous2008-05-201-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5164 c06c8d41-db1a-0410-9941-cceddc491573
* Fix backward logic.dolorous2008-05-201-9/+9
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5163 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-05-201-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5162 c06c8d41-db1a-0410-9941-cceddc491573
* Properly scale the stat-boosting mutation level checks so that divine dolorous2008-05-201-9/+9
| | | | | | | stamina is disabled if you have all 14 levels of at least one. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5161 c06c8d41-db1a-0410-9941-cceddc491573
* Fix chaining when alternating between divine stamina and divine dolorous2008-05-201-2/+20
| | | | | | | robustness if mutations affect how the alternation goes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5160 c06c8d41-db1a-0410-9941-cceddc491573
* Clean Zin's Vitalisation up a bit more.dolorous2008-05-201-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5159 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-05-201-18/+23
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5158 c06c8d41-db1a-0410-9941-cceddc491573
* Rework the steps of Zin's Vitalisation a bit.dolorous2008-05-201-110/+112
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5157 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fixes.dolorous2008-05-161-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5072 c06c8d41-db1a-0410-9941-cceddc491573