summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-place.h
Commit message (Collapse)AuthorAgeFilesLines
* Let draconians grow up.Shmuale Mark2014-05-051-0/+9
| | | | | | | | They will now be able to mature into whatever drac type they can (i.e. white scorchers will still be disallowed) upon reaching the appropriate HD. The goal is mostly to make draconian mercenaries more attractive, since if they can survive they can become rather strong.
* Treat lava as uninhabitable for derived undead (#8177).Steve Melenchuk2014-02-241-0/+3
|
* Properly pick locations for arena random demons/draconians/demonspawn.Steve Melenchuk2014-01-221-0/+2
|
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-1/+0
| | | | | Sometimes, they're there to emphasize a break between two sections of code, which is good. In a majority of cases, though, they're just inconsistent.
* Simplify find_newmons_square(), make it not crash.Adam Borowski2013-11-291-2/+4
| | | | | | | | | After the first failure, it kept calling find_newmons_square_near() (and that in turn radius_iterator) with an invalid starting spot which would then always fail. Passing the monster that's to be checked for clouds to inside functions removes the need to make many random tries.
* Allow summoning/recalling fliers over deep waterDracoOmega2013-04-021-2/+2
| | | | | | | | | | | | | | | The routine which finds free space to place these monsters now uses monster_habitable_grid directly instead of its own logic (which ignored flying entirely). Spells which can summon both fliers and non-fliers (ie: call imp, summon greater demon, etc.) will make no attempt to respect the surrounding terrain when choosing a monster type (and so will sometimes attempt to summon a monster that cannot be placed at that terrain, and fail as previously), though it is arguably better if players cannot influence what things they summon by where they are standing. In either case, this is certainly much better than Haunt and Battlesphere failing when over deep water for no clear reason.
* Rewrite zombie selection.Adam Borowski2013-03-201-3/+1
| | | | | | | | | | | | | | | It now uses regular mon_pick instead of an extremely quirky loop that spins around with a low chance of success, relaxing requirements slowly. If there are no zombifiables for the given branch, monsters from parallel branches get allowed too. Note that there are two code paths for zombie selection, the other one being requesting a zombie via mapdef. REAL CHANGE: depth is actually obeyed now, rather than merely kind of. This gets rid of all those rat and kobold zombies later on, at the cost of severely reducing variety in some cases. The base depth is current level+4, like before.
* Rewrite zombifiable monster requests.Adam Borowski2013-03-181-9/+3
| | | | | Probably would be good to handle skeletons/simulacra/spectrals here as well, instead of relying on zombies.
* Drop unused support for requesting corpse-capable monsters.Adam Borowski2013-03-181-2/+1
|
* Simplify summoning of demons by tier.Adam Borowski2013-02-261-1/+1
| | | | | Especially, don't encode two distinct types in mspec.type, use enums like draconians do.
* Remove layers upon layers of code for TSO summons.Adam Borowski2013-02-261-2/+0
|
* Pass the requested place as level_id during random monster selection.Adam Borowski2013-01-121-2/+1
|
* Fix vault OODness being applied twice.Adam Borowski2012-11-071-4/+1
| | | | | When we had separate power/monster_level and place, the code redundantly applied OOD logic to both, making them be in sync.
* Use std namespace.Raphael Langella2012-08-261-2/+2
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Make a bunch of functions static or gone.Adam Borowski2012-06-231-6/+0
|
* Make another bunch of functions static or gone.Adam Borowski2012-04-051-5/+0
|
* Use monster_type nearly everywhere.Adam Borowski2012-03-221-3/+3
| | | | | | | | | | | Omitted: * mspec.type (uses a lot of magic values in the negatives) * item_def.orig_monnum (todo, +1 trick) A few minor problems are fixed here: * renamed gas spores passed mindex for monster_type * demon summoning would break on addition/deletion of demon types * vaults spawning zombified uniques would fail to mark them as used
* Make high-level monster creation return monster*Adam Borowski2012-01-051-2/+2
|
* Make place_monster() return monster*Adam Borowski2012-01-051-1/+1
|
* Allow Fedhasites to sac corpses under friendly clouds.Adam Borowski2012-01-021-0/+1
| | | | | | | Since Fedhas protects plants against such clouds anyway, not allowing toadstools there meant you had to wait until clouds go away, especially tedious for Ignite Blood demonspawn who will have blood there most of the time.
* Fix Fedhas' turning zombies into skeletons.David Lawrence Ramsey2011-12-131-0/+2
| | | | | | | | | | monster::upgrade_type() wasn't adjusting their HP, AC or EV properly, and it really shouldn't have been used anyway, since zombie -> skeleton is a downgrade. The new function downgrade_zombie_to_skeleton() handles this now. mon-place.cc may not be the best place for it, but keeping it there means that all the zombified stat adjustment functions are in one place.
* Make enslaved/raised corpse-based undead hate Fedhas worshippers.Adam Borowski2011-12-101-8/+2
| | | | | | | | I'm not sure whether deep dwarf unborns should count, but since all other corporeal undead do, let's go for simplicity, at least until someone tells us what the hell unborns are. Also, adjust messages for other gods. Trog gives no "aura", for example.
* Make a bunch of functions static, delete some unused junk.Adam Borowski2011-11-111-9/+0
|
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Guarantee IOOD placement on tiny levels.Adam Borowski2011-03-261-1/+1
|
* Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-2/+2
| | | | | | I did review it manually to find places where they made sense (like some tables), but for a massive sed job like this there might be places that I missed.
* Preserve individual monster HD for zombified types when possible.David Lawrence Ramsey2010-10-021-0/+2
| | | | | | | | | | | | | | | | Corpse-type items now save HD in another hash table property, a la the number of hydra heads. Note that monsters with zero HD due to draining can currently still be zombified, with their hit dice reset to 1. (Adding a more common unanimatable corpse type besides hydra heads could be annoying for anyone trying to animate the dead en masse, enslave souls under Yred, etc.) HD preservation is done for all created zombified types except for those placed in e.g. the Crypt (newly created, so no HD change is possible), those made by Nergalle's Summon Spectral Orcs spell (same), and those created by the Simulacrum spell (hash table properties aren't transferred from corpse-type items to chunks; the same applies to the number of hydra heads, which has been the case for awhile).
* Simplify the previous stat preservation routines for zombies.David Lawrence Ramsey2010-09-301-2/+1
| | | | | | | | | | | The use of the original monster type for the stats and the base type is now the default, so the parameter is removed. Additionally, the original monster type is now properly passed in to the original mgen_data() calls where applicable, so define_zombie() no longer needs to effectively be called twice for spells and abilities that create zombified types. (Yred's Enslave Soul still needs to call it, since it bypasses the monster placement code entirely when it recreates the monster.)
* Make zombified monsters retain their stats (at least HD and HP).David Lawrence Ramsey2010-09-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | define_zombie() is no longer static, and is now used when creating all zombified monsters. This removes redundancy and inconsistency with regard to monster flag setting (e.g. the dual-wielding flag no longer needs to be set in multiple places, and zombified krakens created with Animate Dead now retain their spellcasting flag and, hence, their tentacles "spell"). This also fixes inconsistencies with regard to stats, as undead created with define_zombie() are made by creating the original monster and applying zombie downgrades. Now that other places in the code use it, they no longer create the zombified type and apply zombie downgrades to it. The stat retention is accomplished by adding a flag to define_zombie() to make it use the original monster type. One potentially controversial bit: this flag also makes define_zombie() use the original type as the base type (except for uniques, to avoid things like "Nergalle the spectral Nergalle"). The flag is used for all spells and abilities that create undead*, but not in the code to place them randomly (in e.g. the Crypt) or from card effects. This may be an issue, as players or monsters can now raise "orc warrior zombies" from orc corpses that were orc warriors in life, but since orc warrior zombies are now stronger than plain orc zombies, there should be an easy way to tell the difference. The Summon Spectral Orcs spell did this before anyway. Issues: The monster's original HD is not preserved yet; the monster class' original HD is always used. Also, I don't know at the moment if the base damage is preserved. * Animate Dead (spell and Yred power), Simulacrum, Death Channel, Enslave Soul, Summon Spectral Orcs (Nergalle spell)
* Shadow creatures summons only mobile monsters.Robert Vollmert2010-09-101-1/+2
| | | | Fixes issues #1789, #2400.
* Rename class "monsters" to "monster".Robert Vollmert2010-09-051-7/+7
|
* Rename variables named "monster" to "mons" or similar.Robert Vollmert2010-09-051-1/+1
|
* Add minor cosmetic fixes.David Lawrence Ramsey2010-07-251-2/+2
|
* Use mons_base_type() instead of manually checking (non)zombified status.David Lawrence Ramsey2010-07-251-1/+1
|
* Allow corpses to be placed in .des files.Darshan Shaligram2010-06-221-0/+24
| | | | | | | | | | | Add item property CORPSE_NO_DECAY to disallow decay on corpses/skeletons/chunks. Wizmode &% now creates an item using the .des file item name parser; &o remains the old wizmode item-gen command. Corpse decay for corpses placed by maps can be controlled using dgn.delayed_decay.
* Place Shoals monsters on land if possible to reduce empty-Shoals-syndrome ↵Darshan Shaligram2010-05-021-4/+6
| | | | from all monsters sleeping in water far from land (rob).
* Merge monster choice code for defining zombies.Robert Vollmert2010-04-061-2/+9
| | | | | _define_zombie and pick_local_zombifiable_monster_type had almost the same code...
* Document create_monster return value.Robert Vollmert2010-03-171-0/+1
|
* Disable bands for OOD monsters (due).Darshan Shaligram2010-02-071-2/+4
| | | | | OOD monsters can only be generated in bands after 1.4k turns spent on D:1, or 1.4k - 117 * depth turns spent on any level.
* Allow Mara to clone any foe, not just the player.Darshan Shaligram2010-01-301-0/+1
| | | | | | When cloning the player, Mara will now create MONS_PLAYER_ILLUSION instead of MONS_PLAYER_GHOST. Illusions are identical to ghosts, but will get the correct breath weapon (for draconian players) and the correct holiness (i.e. undead only if the player is undead). Clones also inherit appropriate enchantments from their original, so if the player/other target is berserk, the clone will also be berserk.
* Give boss merfolk small bands of regular merfolk as lackeys.Darshan Shaligram2009-12-301-0/+3
|
* Remove header includes from mon-place.h.Robert Vollmert2009-11-271-257/+3
|
* Remove unnecessary header-header includes.Robert Vollmert2009-11-271-0/+1
|
* New tags for monster specs: "hd" and "hp". (kilobyte)Jude Brown2009-11-271-2/+7
| | | | | | Both values override the default class values. Placing "rat hd:20" will generate a rat with a hit dice of 20, while placing "rat hp:20" will set its hp to 20.
* Flatten header dependencies a bit.Robert Vollmert2009-11-171-1/+0
| | | | | | This removes a couple of unnecessary includes from header files. I may have missed adding some tiles includes.
* Split monster_pathfind out into mon-pathfind.cc.Robert Vollmert2009-11-161-61/+2
|
* Rename fixary.h and fixvec.h.Robert Vollmert2009-11-151-1/+1
|
* Certain bands, mostly uniques, credit leader for killsStefan O'Rear2009-11-131-1/+2
|
* Add summoner and non_actor_summoner to mgen_dataStefan O'Rear2009-11-121-6/+18
| | | | | Monsters now know who summoned them. This will be important later. Probably breaks something; saves are not one of them.
* Extract funtion to find an unused monster.Robert Vollmert2009-11-121-0/+2
|