summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.h
Commit message (Collapse)AuthorAgeFilesLines
* Add minor cosmetic fix.dolorous2008-07-021-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6359 c06c8d41-db1a-0410-9941-cceddc491573
* Only place a newly created monster (summons) on a sanctuary square if itzelgadis2008-06-291-1/+2
| | | | | | | | | | | | | | | 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
* After some pointers from jpeg, rework the routine for monsters' leaving dolorous2008-06-281-3/+1
| | | | | | | | | the level to use the pathfinding routines for patrolling. The monsters still sometimes disappear when near the exit instead of on it, which needs to be fixed, but it's vastly closer to working properly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6186 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-271-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6165 c06c8d41-db1a-0410-9941-cceddc491573
* Improve pathfinding for monsters leaving the level again.dolorous2008-06-221-2/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6047 c06c8d41-db1a-0410-9941-cceddc491573
* When going back to one level from another, make all pacified monsters on dolorous2008-06-211-0/+2
| | | | | | | | it leave the level. Currently, this happens instantly, although there should probably be a time limit added. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6027 c06c8d41-db1a-0410-9941-cceddc491573
* Smooth out the routines to find all the level exits.dolorous2008-06-201-0/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6002 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-06-171-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5903 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up handling of killing mutators or rotters (i.e., chaotic beings), dolorous2008-06-121-2/+0
| | | | | | | | 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
* Expand the SAME_ATTITUDE() macro to account for the good neutral dolorous2008-06-101-2/+4
| | | | | | | attitude. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5714 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [1967456]: Change "horribly wounded" to "severely wounded".dolorous2008-05-191-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5143 c06c8d41-db1a-0410-9941-cceddc491573
* [1956565] Fix issues with monster names.dshaligram2008-05-041-11/+13
| | | | | | | | | Monster names are now stored in the monster struct and saved. Changed some monster-finding functions to return monsters* instead of monster index for type-safety. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4859 c06c8d41-db1a-0410-9941-cceddc491573
* Add more minor cosmetic fixes.dolorous2008-05-031-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4840 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify checks for monsters susceptible to Ignite Poison.dolorous2008-04-291-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4760 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-04-291-2/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4759 c06c8d41-db1a-0410-9941-cceddc491573
* Remove Beogh recalling orcs for you, and instead try harder to findj-p-e-g2008-04-261-0/+6
| | | | | | | | | | | | | | | | | existing followers on the level (with decreasing chances) to bless them. This lowers probability of the reinforcement effect from 10% to 2.5% if bless_follower() is called without any parameters in the first place. Greatly reduce chances for orcs talking, and tidy up monspeak.txt a bit to make comparing chances easier. Add the promised friendly pickup toggle (command on Ctrl-T), and a new option for its default value. Modify documentation accordingly. Fix 1947256: hunger state not shown at game reload. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4662 c06c8d41-db1a-0410-9941-cceddc491573
* Two changes:j-p-e-g2008-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | 1.) If Beogh can't find a nearby follower in LOS to bless, try again without the LOS restriction (but still nearby). If this also fails, recall a small amount of followers (1 + rnd(4) + rnd(4)) on the level. I don't think there's much harm in Beogh actively doing something you already have as an invocation as long as it doesn't make the invocation superfluous (and this doesn't). In this case, the chance of this happening should probably be lowered, and actual reinforcement should be rarer still. 2.) Identify magical staves if you have at least 4 skill levels in the corresponding spell school when wielding it, or gain the 4th level while wielding it. (I decided on 4 because that is what most mages start out with in their special school, and it seems a good enough treshold.) Prior to that, there's still the random identification chance at casting an appropriate spell, as before. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4639 c06c8d41-db1a-0410-9941-cceddc491573
* Fix blessing routine -- oops!j-p-e-g2008-04-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Fix choose_random_nearby_monster() to really pick a random monster rather than the first one that fits, and allow named monsters to get higher chances. Use this when deciding which monster to bless (only happens if the one doing the kill, usually the player, is not eligible for blessing). At high xp levels allow reinforcement (if there are no orcs nearby) to send in high xp orcs: orc warrior, orc knight, or orc warlord, rather than the normal ones (orc, orc wizard, orc priest). At xl 27 the probability for this happening is about 31%. Problem: From the code, it appears that scumming for large armies is possible by deliberately losing your followers somewhere and then killing monsters until you get the reinforcement effect. This will have to be controlled somehow, while still allowing for genuinely lost allies somewhere on the level. Maybe use recall instead or something like that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4598 c06c8d41-db1a-0410-9941-cceddc491573
* Change mummy curses to only turn part of a stack of potions into decay.j-p-e-g2008-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Instead, the amount is 2 + random2(quantity - 1), so ranging anywhere from 2 to the entire stack. Yes, I know this is probably highly controversial, but I've thought about it some, and I think that this will actually change little for most characters: You still won't take large stacks of valuable potions into the Tomb since even if only part of the stack is destroyed it's a huge loss. On the other hand, this is easier on newbies who had no idea this could happen, and makes it a bit more harder for Transmuters to turn their twenty-something potions of water into decay. I also added a message ("Your potions of xyz decay.") if you know the decay type. Otherwise the message is suppressed, so as to replicate the current situation of "Hey, what's this? When did I pick up those? (q)uaff..." For consistency, I also added a message when stuff is cursed, or rather I merged all those "Your foo glows black" messages into do_curse_stuff() that now takes a parameter "quiet" to control whether it's printed ot not. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4438 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic cleanups.dolorous2008-04-191-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4380 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed monsters not regenerating at the right rate when catching up time ↵dshaligram2008-04-011-0/+2
| | | | | | spent off-level. Slightly dropped the generation of bucklers in the Elven Halls. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4031 c06c8d41-db1a-0410-9941-cceddc491573
* Pull out some code from print_wounds() into new function mons_get_damage_level.pauldubois2008-03-301-22/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3950 c06c8d41-db1a-0410-9941-cceddc491573
* Revert the splitting out of monster_change_type() from dolorous2008-03-211-2/+0
| | | | | | | | | | | monster_polymorph(), as it still doesn't do everything needed. Replace it with monsters::change_type(), split out from monsters::level_up_change(), which does do everything needed, and in a cleaner way. Unfortunately, it's still a hack, but it should be easier to deal with for now. Sorry for the mess. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3783 c06c8d41-db1a-0410-9941-cceddc491573
* Remove duplicate code from the priest promotion function, consolidate dolorous2008-03-201-0/+3
| | | | | | | | | the code to change one monster type into another into its own function, and use it. The code handling net trapping should probably be somewhere else, though. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3772 c06c8d41-db1a-0410-9941-cceddc491573
* Expand choose_random_nearby_monster() to optionally allow choosing only dolorous2008-03-191-0/+5
| | | | | | | | | | | | | | | particular types of monsters. Accordingly, make it global, and move it from decks.cc to monstuff.cc. In xom.cc, remove get_random_nearby_monster(), as it's duplicate code, and replace it with a call to choose_random_nearby_monster(), filtering out those monsters that shouldn't be mutated. All this should eventually allow choosing a random friendly monster near you, for the proposed TSO/Beogh blessings. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3714 c06c8d41-db1a-0410-9941-cceddc491573
* Batch of tiny changes for MSVC compiles.pauldubois2008-03-101-8/+8
| | | | | | | | | | | | | | | 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
* Change conducts of Zin and TSO (!)j-p-e-g2008-01-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zin: - DID_UNDEAD_KILLED_BY_SERVANT - DID_DEMON_KILLED_BY_SERVANT + DID_KILL_MUTATOR_OR_ROTTER (shapeshifters and monsters that have an attack AF_MUTATE or AF_ROT) TSO: + DID_KILL_NATURAL_EVIL + DID_NATURAL_EVIL_KILLED_BY_SERVANT Removed M_EVIL flag from a number of early monsters such as goblins and hobgoblins, and also from orcs, ogres, trolls and big kobold. Reasoning: The corresponding species are not considered evil themselves and are allowed to worship the good gods). Note that this weakens all forms of holy attacks! Any attempt to charm evil, undead or demonic monsters will fail (no effect) for worshippers of TSO. Like Makhleb, TSO now gets returning power (arguable) and hp from killing evil, undead and demonic monsters. Zin's piety pool (from donations) is drained much quicker now, on average once every 5 turns. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3213 c06c8d41-db1a-0410-9941-cceddc491573
* Add rock wall to the habitats list (for rock worms), and move monster dolorous2008-01-041-7/+0
| | | | | | | classes' associated habitats into the monsterentry struct. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3182 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed vampiric healing on death using raw damage instead of actual damage, ↵dshaligram2007-10-011-1/+1
| | | | | | which produced super-healing for stabbing (jarpiain). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2283 c06c8d41-db1a-0410-9941-cceddc491573
* No longer id ego weapons of monsters simply because the monster is alreadyzelgadis2007-09-211-3/+0
| | | | | | | | | | | wielding them. However, if a monster wields or unwields a weapon and it gives a message like "The dagger is surrounded by flames!", that still id's the ego. Also, wand zaps by visible monster now update the wand's zap count. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2167 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+22
| | | | | | | | | | | | | crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573
* Identification overhaul part II. Okay, not really. ;)j-p-e-g2007-09-101-0/+3
| | | | | | | | Applying Matthew's latest patch (1789869): Identify items you see monsters use. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2068 c06c8d41-db1a-0410-9941-cceddc491573
* Condensed monster descriptions.j-p-e-g2007-08-221-1/+1
| | | | | | | | | | This has two effecs: 1. Monster name and equipment are combined in one line, and enchantments are condensed as well. 2. It's now "The monster wielding a foo comes into view." git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2024 c06c8d41-db1a-0410-9941-cceddc491573
* Give Lugonu Banishment and Corruption. I've left the old Bend Space in, becausedshaligram2007-08-111-1/+2
| | | | | | | | | | | | | | | | | | | | there needs to be an invocation that can train Invocations, and Banishment is too costly to use for everyday training. Corruption is still a first-cut, needs more work and playtesting: - Terrain modification is one-time only. Creeping modification requires too much savegame magic. - The monsters gated in during the corruption effect are occasionally hostile, but mostly neutral. Neutrals will attack hostile monsters and also pets, but will leave other neutrals and the player alone (in general). A neutral that wants to go somewhere, but finds the player in the way will still take a swing at the player. - Beams are still not fixed to handle neutrals correctly (so neutrals do not target and shoot right yet), will fix soon. Breaks save compatibility. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1990 c06c8d41-db1a-0410-9941-cceddc491573
* Type-safety on mpr() and friends channel argument.haranp2007-08-041-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1970 c06c8d41-db1a-0410-9941-cceddc491573
* [1746247] Award experience for confused monsters killing themselves and otherdshaligram2007-07-081-1/+2
| | | | | | monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1800 c06c8d41-db1a-0410-9941-cceddc491573
* [1747353] Allies shouldn't be noted as "defeated" by you. haranp2007-07-031-2/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1739 c06c8d41-db1a-0410-9941-cceddc491573
* Experimental monster weapon swapping implementation. Allow monsters to usedshaligram2007-07-021-0/+7
| | | | | | | | | | throwing weapons (hand axes, spears, clubs, daggers). Give orcs and orc warriors a chance of being generated with throwing weapons (axes or spears). Throwing weapons are stacked in monster inventory, but unstack when dropped. We may want to consider fully stackable throwing weapons at some point. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1717 c06c8d41-db1a-0410-9941-cceddc491573
* Some more cards and bugfixes.haranp2007-06-171-1/+1
| | | | | | | | | | | Still not implemented: Shuffle, trowel, minefield, spade, blade. Partially implemented: Battlelust, helm, shadow, damage cards. Breaks savefiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1595 c06c8d41-db1a-0410-9941-cceddc491573
* [1738010] Stash-tracker now also tracks traps and other dungeon features.dshaligram2007-06-171-1/+1
| | | | | | | | Changed env.grid to dungeon_feature_type. (The special-level builder still stores map characters directly into env.grid and then translates them to features.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1592 c06c8d41-db1a-0410-9941-cceddc491573
* Preliminary integration of Zooko's Xom patch (untested).dshaligram2007-05-281-6/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1489 c06c8d41-db1a-0410-9941-cceddc491573
* Fix for bug 1571295: should be 'an orc suddenly appears', notharanp2007-04-291-1/+2
| | | | | | | 'the orc suddenly appears.' git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1400 c06c8d41-db1a-0410-9941-cceddc491573
* Allow injured monsters to use teleport traps.dshaligram2007-04-141-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1312 c06c8d41-db1a-0410-9941-cceddc491573
* Allow "any trap" and "any shop" (alternatives to "random trap" and "randomdshaligram2007-04-101-2/+0
| | | | | | | | | | shop") in des files. Allow using '8', '9' and '0' in monster specifications. Tossed out some unused functions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1281 c06c8d41-db1a-0410-9941-cceddc491573
* Dialogue for Murray contributed by Jordan Lewis.dshaligram2007-04-011-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1172 c06c8d41-db1a-0410-9941-cceddc491573
* Allow maps to place water/lava creatures explicitly. The dungeon builder willdshaligram2007-03-121-1/+1
| | | | | | | automatically convert floor to water/lava as appropriate to place these monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1025 c06c8d41-db1a-0410-9941-cceddc491573
* Better handling of confused monsters - they can finally accidentally hit otherdshaligram2007-02-251-1/+3
| | | | | | monsters, fall into water, etc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@962 c06c8d41-db1a-0410-9941-cceddc491573
* Break up you_attack() into a slew of smaller functions. The functions aredshaligram2007-02-121-0/+1
| | | | | | | | | | | | | still fairly tangled, but they're better than the old monster. The idea is to also put monster-vs-player and monster-vs-monster into the melee_attack framework so that refactoring combat code with elements of 4.1 becomes easier. This is a big refactoring, so it's likely to be buggy. Some of the combat diagnostics - notably the damage rolls - are also AWOL. Will fix going forward. Note: The combat code is still classic b26. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@950 c06c8d41-db1a-0410-9941-cceddc491573
* Handle monster paralysis as an enchantment instead of the old speed manglingdshaligram2007-02-101-1/+1
| | | | | | hack. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@949 c06c8d41-db1a-0410-9941-cceddc491573
* Merged stone_soup r15:451 into trunk.dshaligram2006-11-221-2/+12
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573