summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mstuff2.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add minor cosmetic fixes.dolorous2008-07-071-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6441 c06c8d41-db1a-0410-9941-cceddc491573
* Add a function x_chance_in_y(x,y) to replace the variousj-p-e-g2008-07-061-7/+10
| | | | | | | | 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
* Fix 2005590: Branded darts unbranded when thrown.j-p-e-g2008-07-031-47/+49
| | | | | | | | | Thrown darts of ice or flame will correctly be displayed as puffs of frost/flame, will do the appropriate damage both to player and monsters and will be identified when thrown by a monster. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6367 c06c8d41-db1a-0410-9941-cceddc491573
* Revert the change on ammo handling for Tiles, and replace it with a morej-p-e-g2008-07-021-3/+12
| | | | | | | | | | | | | | | generic logic that uses item tiles for BEAM_MISSILE, else bolts according to flavour. Identify monster fired ammunition ego if the launcher ego is known, not that it has much of an effect because plain ammo gets no special description. In the message list the fired item as it will look to the player (i.e. "arrow of ice" for a plain arrow fired off a bow of frost), even though the item actually dropped will still be a plain one. I hope this isn't too confusing. (And if it is, it should be easy to revert. :p) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6331 c06c8d41-db1a-0410-9941-cceddc491573
* Add more message tweaks.dolorous2008-07-011-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6289 c06c8d41-db1a-0410-9941-cceddc491573
* Make initial sanctuary be circular in shape rather than square.zelgadis2008-07-011-7/+14
| | | | | | | | | | | | | | 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
* Add message tweak.dolorous2008-06-301-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6238 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify yet again.dolorous2008-06-301-4/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6237 c06c8d41-db1a-0410-9941-cceddc491573
* Sanctuary now protects friendly and neutral-good monsters from Abjure.zelgadis2008-06-301-0/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6234 c06c8d41-db1a-0410-9941-cceddc491573
* Only place a newly created monster (summons) on a sanctuary square if itzelgadis2008-06-291-14/+22
| | | | | | | | | | | | | | | 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
* Make sanctuary prevent giant eyeball and eye of draining stares, pluszelgadis2008-06-281-0/+9
| | | | | | | | | | moth of wrath goading/inciting. In monstuff.cc put "either monster or player in sanctuary" checks into convenience function. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6180 c06c8d41-db1a-0410-9941-cceddc491573
* Fix "Summon Undead" to summon what it did before its overhaul; I was dolorous2008-06-241-7/+8
| | | | | | | | going by the monster order in mon-data.h, when I should have been going by the monster order in enum.h. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6114 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-06-201-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6016 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-06-191-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5985 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1996837: Allow equipping spellcasters with ammunition on generation.j-p-e-g2008-06-191-1/+1
| | | | | | | Fix 1997179: Merge zombies correctly in the monster list. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5977 c06c8d41-db1a-0410-9941-cceddc491573
* Since mons_clear_trapping_net() checks if the monster is caught in a dolorous2008-06-191-6/+5
| | | | | | | | net, a separate check before calling it is redundant, so remove instances of that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5974 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-06-191-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5971 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-181-3/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5952 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up monsters' summoning undead.dolorous2008-06-181-9/+11
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5951 c06c8d41-db1a-0410-9941-cceddc491573
* Add more miscellaneous minor cleanups.dolorous2008-06-171-25/+11
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5906 c06c8d41-db1a-0410-9941-cceddc491573
* Add yet more cleanups.dolorous2008-06-171-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5899 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more cleanups.dolorous2008-06-161-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5895 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-06-151-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5850 c06c8d41-db1a-0410-9941-cceddc491573
* Properly treat "Summon Scorpions" as a no-op in setup_mons_cast().dolorous2008-06-151-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5849 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
* Add abjuration protection for gifts from TSO and Trog, both friendly and dolorous2008-06-131-0/+15
| | | | | | | | 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-5/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5784 c06c8d41-db1a-0410-9941-cceddc491573
* Fix compilation.dolorous2008-06-131-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5783 c06c8d41-db1a-0410-9941-cceddc491573
* Add more minor cosmetic fixes.dolorous2008-06-131-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5782 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more minor cosmetic fixes.dolorous2008-06-131-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5772 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-06-131-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5771 c06c8d41-db1a-0410-9941-cceddc491573
* Add explanatory comments to the pathfinding routines. I might have gonej-p-e-g2008-06-121-1/+2
| | | | | | | | overboard here :) - but I figured that it could be useful to occasionally explain *why* I implemented something a certain way. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5767 c06c8d41-db1a-0410-9941-cceddc491573
* Implement the Petrify spell in a rather basic variant, and replace the j-p-e-g2008-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* After some more thought (and discussion with dploog), remove the code dolorous2008-06-111-27/+21
| | | | | | | | marking creatures summoned by priestly monsters as god gifts. It can wait until priestly monsters get proper invocations. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5722 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more minor cosmetic fixes.dolorous2008-06-101-26/+26
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5715 c06c8d41-db1a-0410-9941-cceddc491573
* Add more minor cosmetic fixes.dolorous2008-06-101-53/+53
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5713 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-06-101-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5696 c06c8d41-db1a-0410-9941-cceddc491573
* Reorganize a bit.dolorous2008-06-101-15/+15
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5695 c06c8d41-db1a-0410-9941-cceddc491573
* Implement the monster equivalent of Summon Scorpions, and add it to the dolorous2008-06-101-0/+15
| | | | | | | ghost spell list. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5693 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-06-101-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5688 c06c8d41-db1a-0410-9941-cceddc491573
* Add spacing fix.dolorous2008-06-101-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5687 c06c8d41-db1a-0410-9941-cceddc491573
* Let the monster version of "Summon Wraiths" summon shadow wraiths again.dolorous2008-06-101-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5686 c06c8d41-db1a-0410-9941-cceddc491573
* Properly mark zombies created by a priest as god gifts.dolorous2008-06-091-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5665 c06c8d41-db1a-0410-9941-cceddc491573
* Go back to detecting priestly monsters by the flag instead of using a dolorous2008-06-091-1/+2
| | | | | | | function, as it'll be simpler in the long run. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5649 c06c8d41-db1a-0410-9941-cceddc491573
* Use the proper flag type to indicate god gifts (oops).dolorous2008-06-091-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5645 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-06-091-2/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5642 c06c8d41-db1a-0410-9941-cceddc491573
* Mark monsters summoned by priestly monsters as god gifts.dolorous2008-06-091-22/+32
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5641 c06c8d41-db1a-0410-9941-cceddc491573
* Revert previous reorganization.dolorous2008-06-091-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5640 c06c8d41-db1a-0410-9941-cceddc491573
* Reorganize things a bit.dolorous2008-06-091-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5638 c06c8d41-db1a-0410-9941-cceddc491573
* Add more miscellaneous minor cleanups.dolorous2008-06-091-26/+31
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5637 c06c8d41-db1a-0410-9941-cceddc491573