summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove a few more unnecessary casts.haranp2009-01-211-2/+2
| | | | | | | Don't cheat on constness in _mons_has_path_to_player. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8651 c06c8d41-db1a-0410-9941-cceddc491573
* Fix casting Ball Lightning asserting. The Ball Lightning spell manually setszelgadis2009-01-171-1/+2
| | | | | | | | the "short-lived" duration on the summoned monsters, so it doesn't need to supply an abjuration longevity. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8502 c06c8d41-db1a-0410-9941-cceddc491573
* Introduce a number of new uniques taken from a patch by castamir.j-p-e-g2009-01-041-1/+3
| | | | | | | | | | | | | | | | | | | These are: * Roxanne (statue spellcaster) * Sonja (Kobold assassin) * Eustachio (human summoner, was: Francisco) * Azrael (efreet, was: Abdul) * Ilsuiw (Merfolk witch * Prince Ribbit (blink frog prince) * Nergalle (orc sorceress) * Saint Roka (orc priest of Beogh) Tweaked make_book_theme_randart() to allow for one forced spell and owner's name. Used to occasionally give Roxanne a randart book containing Statue Form. (Was: always book of earth) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8207 c06c8d41-db1a-0410-9941-cceddc491573
* For now, remove unused holy being class type.dolorous2009-01-031-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8163 c06c8d41-db1a-0410-9941-cceddc491573
* Expand the setting of spell_type in mgen_data to include all dolorous2009-01-031-23/+2
| | | | | | | | monster-creating spells, and avoid assertion failures caused by setting an abjuration duration of 0 and a spell_type to something other than 0. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8162 c06c8d41-db1a-0410-9941-cceddc491573
* Add more minor cosmetic fixes.dolorous2009-01-031-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8161 c06c8d41-db1a-0410-9941-cceddc491573
* Fix arena not placing water monsters correctly, remove monster habitat ↵dshaligram2009-01-021-2/+1
| | | | | | special-casing for "generation" time. Also fix arena "friendlies" not picking up items. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8130 c06c8d41-db1a-0410-9941-cceddc491573
* Make monster behaviour in arenas smarter, allow delay:N in arena spec to set ↵dshaligram2009-01-021-0/+1
| | | | | | arena_delay. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8129 c06c8d41-db1a-0410-9941-cceddc491573
* Add more spacing fixes.dolorous2008-12-311-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8062 c06c8d41-db1a-0410-9941-cceddc491573
* Differentiate between god gift monsters and non-gift monsters with a god viazelgadis2008-12-291-3/+3
| | | | | | | | | | | | MF_GOD_GIFT. When a non-god gift priestly monster is first created it will be given a god: orcs Beogh, mummies Kikubaaqudgha or Yredelemnul, and deep elves Kikubaaqudgha, Yredelemnul or Makhleb. Monster spell announcments/messages for priestly monsters now uses the name of their god. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8008 c06c8d41-db1a-0410-9941-cceddc491573
* Fix "suicidal travelling" towards monsters you can see through glass.j-p-e-g2008-12-261-1/+9
| | | | | | | Fix =sustenance not being treated as useless for Mummies. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7982 c06c8d41-db1a-0410-9941-cceddc491573
* Breaks savefile compatibility.zelgadis2008-12-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow Shadow Creatures spell (along with anything that uses create_monster(), mons_place(), place_monster() or pick_random_monster()) to work in portal vaults; only fixed ziggurats to use it. Must be done by manually calling dgn.set_random_mon_list(); can't automatically set it from MONS since the actual frequency of the monster specified that way is controlled by the number of 1/2/3/etc symbols that are in the map combined with symbol shufflings and substitutions. Can add an RMONS keyword to handle it if needed. Limitations: can only use level id or monster type + base type. Monster number (specific number of hydra heads), colour, items, band, and patrolling are all discarded/ignored. This can be improved if it's too limiting. New per-level env.properties CrawlHashTable stores the information. env.properties can be used to store new per-level data without breaking savefile compatibility (though changing the handling of old data in env.properties can still break compatibility). Random monster spawn rate is now controlled by the per-level env.spawn_random_rate (though the default rates are all the same as before), in case any weird portal vaults want to turn on random monster spawning. Could also be used to alter the random spawn rate for places like Vault:8 Prevented Shadow Creatues from working in the Temple. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7816 c06c8d41-db1a-0410-9941-cceddc491573
* Added BEAM_CHAOS and changed chaos launchers/ammo to use that. Currently onlyzelgadis2008-12-081-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | chooses a different, random beam flavour (which undoudtedly needs to have their relative weights changed after playtesting) for each square it passes through, but in the future it might do things like bounce off walls at weird angles or animate weapons left laying on the ground. Added CLOUD_CHAOS, though it doesn't do anything yet. Monsters which are marked summoned or otherwise given ENCH_ABJ can also be marked with the type of summoning that happened, which is stored in the until-now-unused ENCH_SUMMON. This is useful for figuring out if a monster has ENCH_ABJ but isn't really summoned (like fire vortices created by Fire Storm or dancing weapons created by Tukima's Dance) so that they won't be affected by abjuration. It's also currently used to do a different "dissapears in a puff of smoke" messages for summoned monsters based on the summoning type, so that monsters summoned by Shadow Creature "dissolve into shadows" and don't leave behind any clouds, and temporary god gift monsters from good gods "dissolve into sparkling lights". In the future it might be used to do temporarily animated corpses, which turn back into a corpse when killed or when the animation runs out. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7778 c06c8d41-db1a-0410-9941-cceddc491573
* Harpies now also eat food on the ground.j-p-e-g2008-12-031-1/+1
| | | | | | | | Add a description (as suggested by David) and two quotes. Since harpies will eat anything they are now resistant to poison. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7737 c06c8d41-db1a-0410-9941-cceddc491573
* Implement harpyes. They ...j-p-e-g2008-12-031-1/+2
| | | | | | | | | | | | | * appear in bands of 2-5 * use bat like movement * may steal (= destroy) the player's food. Still needs a tile. Also, actually use the M_BATTY flag instead of hardcoding batty monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7734 c06c8d41-db1a-0410-9941-cceddc491573
* More steps toward ziggurats.dshaligram2008-11-231-0/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7553 c06c8d41-db1a-0410-9941-cceddc491573
* Add comments for the labyrinth changes.j-p-e-g2008-11-041-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7388 c06c8d41-db1a-0410-9941-cceddc491573
* Implement second part of labyrinth tweaks:j-p-e-g2008-11-041-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allow mapping of labyrinths, but apply heavy map rot * lab walls shift from time to time * added a wizmode command (&k) to test the changes My usual sequence goes something like &l, >, &{, #, (copy map dump elsewhere), X, Ctrl-F, y, Esc, &k, &{, #. I've tweaked my monster pathfinding A* algorithm to only work for non-monsters, so I've been using that. Because of the mapping, labyrinths are now actually easier to solve. (It's a bit hard to tell, though, since I got *really* good at solving labyrinths over the 40 something trial runs. :) ) At the same time they are now much more interesting and flavourful because of the map rot, and the shifting provides some wonderful excitement. So, whoever came up with that idea, thanks! :D Still to do: * Exceptions for vaults. (Distinction between vault/non-vault walls.) * Better handling of walls. (They currently "teleport" to the chosen floor grid, leading to unusual wall types appearing somewhere else.) * Improve the feel of the shifted mazes. (They come really close to the original now but still do not look exactly the same.) The numbers may need tweaking. Currently, they are: shift rate : 10% chance, every 20 turns map rot rate: 45% of the map, every 20 turns size of shifted area: 12x12 to 24x24 number of shifted walls per round: 12-45 Shifting will only ever take place between unexplored (or forgotten) grids. Thus, the chance of changes taking place is greater in areas away from the player. I also increased the starting distance from the centre from 20*20 to 28*28. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7387 c06c8d41-db1a-0410-9941-cceddc491573
* Add more holy being-related cleanups.dolorous2008-10-301-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7315 c06c8d41-db1a-0410-9941-cceddc491573
* Add various holy being-related cleanups.dolorous2008-10-301-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7312 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-4/+0
| | | | | | | | | | into a file crawlhistory.txt in docs/obsolete. I used a perl script to do this under the assumption that all these change logs used the same system following the keyword "Change History". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6930 c06c8d41-db1a-0410-9941-cceddc491573
* Massive overhaul to move towards coord_def().haranp2008-07-301-7/+2
| | | | | | | | | | This might have introduced some bugs: I now get intermittent crashes on startup (this might have to do with the changes to special_room.) Sorry about that - committing before I need to do any more big conflict resolutions. Fixes coming later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6732 c06c8d41-db1a-0410-9941-cceddc491573
* Fix a bug in monster summoning that was causing crashes, for examplej-p-e-g2008-06-261-4/+5
| | | | | | | | | | 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
* Add more god gift-related fixes. First, expand mgen_data::hostile_at() dolorous2008-06-141-12/+8
| | | | | | | | | | | | | to allow specifying more parameters, and merge it with mgen_data::alert_hostile_at(), since their only difference after expansion is the hostile monster's target. Second, if a god makes you cast Fire Storm, any fire vortices produced will finally be marked as god gifts. Third, for consistency, don't immediately alert miscast-produced spatial vortices to your presence, since the aforementioned fire vortices aren't. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5818 c06c8d41-db1a-0410-9941-cceddc491573
* And use the proper target for mgen_data::sleeper_at().dolorous2008-06-141-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5816 c06c8d41-db1a-0410-9941-cceddc491573
* Make mgen_data::sleeper_at() actually use its flags parameter.dolorous2008-06-141-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5815 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up handling of killing mutators or rotters (i.e., chaotic beings), dolorous2008-06-121-2/+4
| | | | | | | | and make them become enraged by your lawful aura if you start worshipping Zin. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5750 c06c8d41-db1a-0410-9941-cceddc491573
* Overhaul god gift handling again so that we can tell which god sent dolorous2008-06-121-11/+18
| | | | | | | | | | | 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
* Enable monsters to move around glass structures if they can see thej-p-e-g2008-06-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | player through the walls. Don't use pathfinding to target other monsters, only the player! Monsters of different intelligence have different limits on the distance they may travel to circumvent an obstacle, i.e. zombies will only use a range of 2, whereas highly intelligent monsters can expertly find their way through (transparent) labyrinths, though there's a chance they'll forget their target if they don't see it, so for very long and winding paths it's likely they don't ever arrive. Will probably affect performance, though I did test on entire levels turned transparent with Vitrification and things seemed to run more or less smoothly. Ideally, monsters should also be able to move around other obstacles that don't affect visibility (such as water, lava, or statues) but that is currently not possible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5700 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more summoning-related cleanups.dolorous2008-06-091-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5655 c06c8d41-db1a-0410-9941-cceddc491573
* Use the proper flag type to indicate god gifts (oops).dolorous2008-06-091-5/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5645 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-06-081-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5589 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up handling of angered monsters.dolorous2008-06-081-1/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5579 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up summoning of random demons and random holy beings again.dolorous2008-06-071-1/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5560 c06c8d41-db1a-0410-9941-cceddc491573
* Generalize summoning of holy beings, in case any more of them are added.dolorous2008-06-071-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5556 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up yet more.dolorous2008-06-071-2/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5550 c06c8d41-db1a-0410-9941-cceddc491573
* Add a line on good gods disapproving of certain items to theirj-p-e-g2008-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | description (evil_item). Same for evil_eating. In another step on the way to monster pathfinding, take the shortest path and extract a vector of waypoints out of it. When experimenting with ways to do this I noticed that grid_see_grid is not symmetrical (A may see B but not vice versa); I'm not sure what effects that could have. It won't directly affect the player as the checks for monster sees player and player sees monster both use the player LoS, but it could have an effect on friendly monsters fighting enemy ones, I guess. Also, I don't think num_feats_between needs the shortest beam available (called with false now). In fact, that seemed to hurt visibility a bit, probably because of attempting to take vision obstructing shortcuts. If this reasoning is wrong, please speak up and/or correct it. (I sure hope not because the shortest beam calculation has some more overhead that can be avoided this way.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5501 c06c8d41-db1a-0410-9941-cceddc491573
* Implement pathfinding for monsters, using the A* algorithm.j-p-e-g2008-06-041-0/+39
| | | | | | | | | | | | | | | | It's not actually used anywhere yet, but I've implemented a wizmode testing function (x on monster, then 'w') that calculates the shortest path to any playerchosen destination on the level, and it seems to work quite well. The monsters tend to take zigzag paths but that should be easy enough to smooth out and in any case doesn't matter all that much since the player usually won't witness this. Oh, and though I tested the whole thing in a labyrinth, it went ridiculously fast! I'd rather doubted that but Darshan was completely right, as usually. :p Please don't remove the debugging output yet, I still need them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5476 c06c8d41-db1a-0410-9941-cceddc491573
* For (some) consistency, make monster::foe an unsigned short, since that dolorous2008-06-031-12/+12
| | | | | | | | matches player::pet_target, and because tags.cc seems to save monster::foe as a short anyway. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5461 c06c8d41-db1a-0410-9941-cceddc491573
* Fix wizard mode being unable to create monsters of nonfloor habitat.j-p-e-g2008-06-011-1/+1
| | | | | | | | | | | | | | | | Changed labyrinth handling for minotaurs: Instead of being magic mappable, labyrinths are plain mappable. Yes, that makes everything much easier, but allowing magic mapping and yet you still have to trudge along by hand (rather than use autotravel) is worse. To make up for it, we might want to boost the monster minotaur (trying to defend its home against a rival?) Or we could just remove the difference altogether... Cleaned up debug.cc a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5401 c06c8d41-db1a-0410-9941-cceddc491573
* Fix aborting unchivalric attacks costing a turn.j-p-e-g2008-05-251-5/+8
| | | | | | | | | | | | | | | | | | Implement ordering your friends to stay where they are. To do this, I've added a new variable to the monster struct: patrol_point, that is set by the new t sub-command "Wait here!" Once this is set, monsters will spend their time wandering around within the LOS radius centred on the patrol point. If they are attacked, or the player or other friends are attacked, they'll stop wandering to fight, but once the foe is gone, they continue doing so. Currently, the only way to make them stop again is to issue another command, "Follow me!" that is basically the already existing "Come here!" command. I've also added a "Stop fighting!" command that for non-patrolling monsters has the same effect as "Follow me!" - patrolling monsters are supposed to take up their wanderings again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5247 c06c8d41-db1a-0410-9941-cceddc491573
* Reorder snake selection to favour the nastier snakes when sticks to snakes ↵dshaligram2008-05-101-30/+16
| | | | | | works on big sticks. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4993 c06c8d41-db1a-0410-9941-cceddc491573
* Make Sticks to Snakes stronger.dshaligram2008-05-101-16/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4992 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify handling of monsters angered by the player, and expand it to dolorous2008-05-071-1/+1
| | | | | | | not allow Trog worshippers to have magic-using followers. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4898 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix god gift randarts being named after *other* gods.j-p-e-g2008-05-061-5/+6
| | | | | | | | | | * Reallow monster placement of bands (at least for Beogh's retribution; it might be similarly buggy for normal generation). * Extend documentation on orc naming, and sometimes name the band leader of a band sent after you for retribution. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4894 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up monster generation functions, separate monster zombie type from ↵dshaligram2008-05-051-15/+143
| | | | | | | | | monster number. May be buggy. Allow hydra zombies (they currently do not get the right number of heads). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4872 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [1947495]: Adjust orc bands.dolorous2008-04-211-5/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4433 c06c8d41-db1a-0410-9941-cceddc491573
* Give monsters better natural regeneration increasing with HD. Monsters will ↵dshaligram2008-03-311-0/+3
| | | | | | | | still never heal more than 1 hp per turn. Increase royal jelly movement speed, hp and attack damage. The royal jelly now spits out high-level jellies when it takes a high-damage hit of any kind. No experience for the expelled jellies, given that they're technically part of the royal jelly, and the royal jelly already gives a heap of xp. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3985 c06c8d41-db1a-0410-9941-cceddc491573
* Add more whitespace fixes, and allow reinforcement to summon bands dolorous2008-03-281-2/+2
| | | | | | | | again. Apparently, the bands aren't properly being marked as followers; this will have to be fixed another way. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3915 c06c8d41-db1a-0410-9941-cceddc491573
* Batch of tiny changes for MSVC compiles.pauldubois2008-03-101-1/+1
| | | | | | | | | | | | | | | Most of these fall into the category: - don't use struct to refer to a class, and vice versa - msvc doesn't like unistd.h or dirent.h Doesn't fix all the struct/class problems; I think I'll silence those for now and move on because it's not all that important. Tested on OS X. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3571 c06c8d41-db1a-0410-9941-cceddc491573