summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.h
Commit message (Collapse)AuthorAgeFilesLines
* "Maras are frozen" -> "The Maras are frozen" (5054)Jesse Luehrs2014-08-141-1/+2
|
* Make ranged weapon delay display properly on @Nicholas Feinberg2014-07-251-1/+2
| | | | | | | | It only works if you have the appropriate projectile type quivered (otherwise it shows you as if using the weapon in melee, i.e. breadswing speed), but that's still an improvement. Also, constify.
* Handle another engulf ender (#7437)Neil Moore2014-07-181-3/+2
| | | | | | | | | This time when your engulfer is trampled away. We don't handle the case where a monster's engulfer is trampled away, sorry: if we want to do that, we should generalise the constriction code and remove the engulf enchantment/duration. Make clear_far_engulf() public to support this change.
* Clear Engulf status when forcibly separated (#7437)Neil Moore2014-07-181-0/+3
| | | | | The status still doesn't end immediately when the engulfer dies etc.: see bug #7394.
* Separate 'permanent' and 'temporary' monster hit diceNicholas Feinberg2014-07-131-1/+6
| | | | As part of a wider scheme to make draining temporary.
* Refactor duplicate code from can_wield()Nicholas Feinberg2014-07-131-1/+2
|
* Improve sleep codeNicholas Feinberg2014-07-111-2/+1
| | | | | | Refactor put_to_sleep() and hibernate() together. Also improve messenging for resisting repeated sleep (by replacing a generic canned message).
* Fix magical shields being unable to block most ranged attacks (#8772)Chris Campbell2014-07-091-0/+1
| | | | | | | | They checked that the player either had a shield equipped or had the bone plates mutation, so TSO's divine shield, Qazlal shielding and Condensation shield could all never block ranged attacks (except for those from ranged weapons, since those now follow the same codepath as melee attacks!).
* Remove unused parameters from umbra() and backlit().Neil Moore2014-07-051-2/+2
|
* Don't mistake ranged weapons for melee weaponsNicholas Feinberg2014-06-241-0/+1
|
* The great mon-stuff migration.Shmuale Mark2014-06-221-0/+4
| | | | | | | | | A good deal of functions move to the two new files, mon-poly and mon-message. Of the others, some go to where they are used, some to mon-util, and a few are made member methods of monster. This probably breaks Xcode compilation, and I'm not able to test the changes I made to MSVC that will (hopefully) keep it working.
* Get rid of a function.Shmuale Mark2014-06-191-1/+0
| | | | | | | The term "insanity" is used for several different things (and there's even ENCH_MAD which is not the same either). It would be weird to allow Discorded monsters to be extra-Recitable, and as it stands the function name is just misleading.
* Rename functions (|amethyst).Shmuale Mark2014-06-191-2/+2
|
* Try to reduce duplication in Recite code.Shmuale Mark2014-06-191-3/+4
| | | | | | | | | | | | | | is_chaotic() and is_unclean() have been changed to return an int roughly equal to what would have been returned before by the Zin recite function. Some bool flags were added to the function to make it still work right for the other uses (e.g. silver). Prince Ribbit is no longer specially vulnerable to Recite, and insane/ sluggish uniques are unclean rather than chaotic, which seems more consistent with the other uses of the terms. The special case for nonliving and plant monsters to be unrecitable is removed.
* Don't make TSO mad when attacking an illusion (RoboCicero)Nicholas Feinberg2014-06-191-0/+1
| | | | Specifically, a Mara-spawned illusion of an angel.
* Make profane servitors ignore holy wrath, like holy energy (#7089).Shmuale Mark2014-06-171-0/+1
|
* Merge branch 'mon-pickup'Shmuale Mark2014-06-111-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem with monster pickup of the type that this branch removes is that it encourages tedious behaviour to achieve the optimum result. While in general people don't bother to pick up every weapon and armour and stuff it upstairs, that would be a way to prevent monsters from ever picking up items you've seen. With Apportation, you don't even have to reach the item, and on a mummy, say, you don't even have to worry about the infintesimal food cost. People do already do this for chaos and distortion weapons, and it is not a very good thing. Not allowing allies to pick up items is related, in that it means that the code can be simpler, but it also has problems of micromanagement, weirdnesses with the ctrl-T command, and allies already have their share of problems. I hope that the compensations for Beogh and mercenaries make up for what is lost in terms of fun. Conflicts: crawl-ref/source/tag-version.h
| * Move some of Maurice's stealing code into its own function.Shmuale Mark2014-05-281-0/+1
| |
* | Don't let monsters get free turns when escapingNicholas Feinberg2014-06-101-0/+1
| | | | | | | | From nets & webs.
* | Remove vestiges of Simulacrum-chunk interactions.Neil Moore2014-06-091-1/+0
| | | | | | | | | | Wieldability, usefulness of butchery and chunks, tile wield tip, and monster food pickup.
* | Make monsters avoid traps while climbing stairs (7749, elliptic)Nicholas Feinberg2014-06-061-0/+1
| | | | | | | | | | | | As they would during normal movement. Shouldn't get allies triggering zot traps while following you up stairs, etc.
* | Move go_berserk() out of misc.ccNicholas Feinberg2014-06-041-1/+1
| |
* | Destroy item destructiongammafunk2014-05-281-1/+0
|/ | | | | | | | | | | | | | | | | | | Now that inventory weight and player burden states are gone, item destruction doesn't serve one purpose it clearly accomplished: help prevent the player from being at or next to burden capacity at all times. Outright destruction of strategic consumables encourages more needless inventory management, so we'd like to exclude these from any form of destruction and possibly prevent them from taking up inventory space at all. Denial of tactical consumables, either temporarily or permanently, is something we're going to look into later on, possibly in the release after next, since it can create interesting and generally not frustrating gameplay if done correctly. Needless to say, item destruction wasn't a player favorite and may have a sparsely attended funeral. RIP in peace. For now we aren't adjusting the rate of consumable generation to compensate for no item destruction, but that balancing will happen after play-testing shows how much adjustment is necessary.
* Don't use inventory weight for the chance of activating a shaft trapgammafunk2014-05-261-1/+0
| | | | | | | Shaft traps previously considered the actor's total inventory weight in addition to body weight, but the player burden calculation code isn't worth keeping for this consideration alone. The chance of a shaft trap activating now depends only on the actor's body weight.
* Remove an unused method for the monster class.gammafunk2014-05-241-1/+0
|
* Melt away lava orcs.Steve Melenchuk2014-05-141-0/+2
| | | | | | | | | | | | | | | | When you strip away the fundamentally broken tension mechanic, you're left with a species that is essentially "Hill Orcs WITH FIRE". No effort has come forward with code to fix either aspect of them despite the length of time they've been around in trunk, and the code is littered with a very large number of special cases in their presence. Current lava orcs should be able to finish their games fine, but new starts are disallowed. There are a couple of bits I've left present but which will have no function for the moment, mostly related to interactions with lava (as there are a couple of species proposals floating around that benefit from having those interactions).
* Fix rounding errors with drained skills.elliptic2014-05-141-1/+2
| | | | | | | | | Previously you could have a drained skill display as 10.5 on the m screen but have you.skill(SK_blah) return 9 for it because of inconsistent rounding. This fixes that issue, though I wonder if it might be simpler to just use a fixed large scale during all the skill calculations and then convert to the requested scale at the end.
* Don't trigger berserkitis on ranged attacks (#8516).Steve Melenchuk2014-05-081-1/+1
| | | | Oops.
* Ranged weapon delay.Steve Melenchuk2014-04-271-0/+2
| | | | | | Moves the delay calculations into player and monster respectively so that it can properly be done at the start of the ranged attack; it doesn't make sense to have them in attack or ranged_attack.
* Make all abyss teleports shift the Abyss (minmay).Shmuale Mark2014-03-081-1/+0
| | | | | | | | | | | | | | | | Partly this is to (somewhat) make the Abyss a little easier. Teleports still take longer than orbrun teleports to kick in on average, and in general letting the player know what an action will do is a good thing. But the main reason is that, due to maprot, same-area abyss teleports are a pretty awful interface screw. You are prevented from remembering what monsters were around (this was quite annoying when being marked was more common in the abyss), and though you can see for one second what direction you came from, immediately after the screen refreshes and you can't anymore. Possibly this could lead to improving/removing altogether maprot.
* Fix various issues with invisible monster indicators.gammafunk2014-03-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if a monster enters LOS and goes invisible on the same turn, it can disappear from the screen before the player has a proper indication of where it was. This commit makes the following changes: 1. Fixes invisible monster indicators so that they can reliably be set in the monster map knowledge update code at locations that of the current monster being processed in this loop. The previous code tried to set this indicator, but due to how the old loop cleared all flags other than MAP_SEEN_FLAG and did tiles cell draws in the same pass as map knowledge updates, these wouldn't work. This commit adds a MAP_INVISIBLE_UPDATE flag to help retain MAP_INVISIBLE_MONSTER when necessary, as well as a second loop in show_init that loops over a vector of the updated cells found in the radius_iterator loop. This second loop should be fast enough that it doesn't significantly affect performance. 2. Add 'bool went_unseen_this_turn' and 'coord_def unseen_pos' to the monster class (with the necessary save compat code) to allow monsters that go invisible in LOS to always get an invisible indicator. The code prefers to use indicators arising from the monster failing stealth checks if those occur; they are based on the monster's true position and hence are usually more accurate. 3. Somewhat simplify the stealth check code for invis indicators, and only ever allow one invis indicator per monster. The stealth check logic perhaps could be simplified further (there are multiple checks), but I've preserved the existing checks for now. Also turned a coinflip() in one of the secondary checks into a seeded/hashed coinflip so it won't change over screen updates. This commit lets players with antennae always see the location of an invisible monster through an invis indicator, and sets the invis indicator on the monster's last position whenever a monster becomes unseen (e.g. going invis or already being invis but the player removes sinv). If the monster fails a stealth check, that potentially more accurate information is favored over the unseen position.
* Convert alignment of a monster avatar when its summoner's alignment changes.gammafunk2014-02-191-0/+2
| | | | | | | | | | | | | | | | | | | When the alignment of the summoner of a spectral weapon, battlesphere, or grand avatar changes, previously these avatars were not changing alignment along with the summoner. This adds monster::align_avatars() which is called appropriately in mons_att_changed() and in monster::add_ench() for the case of ENCH_CHARM. When summoners go to any form of ATT_*NEUTRAL, we remove all their avatars. For grand avatars, I've added an end_grand_avatar() function to help with this. Monsters with ENCH_GRAND_AVATAR that change attitude but who are not the summoner also lose that enchantment. This also adds monster::remove_avatars() which is called by ::align_avatars() when necessary as well as when a monster's soul is enslaved. There is also a bugfix in setting of ENCH_GRAND_AVATAR upon casting where it would skip setting enchantment on the summoner if summoner was charmed. Always set the enchant on the owner, and never set the enchant on any kind of avatar to avoid having an avatar of an avatar.
* Rework the monster Ozocubu's Armour effect and give back to Fannar.Steve Melenchuk2014-01-311-1/+1
| | | | | | | | | | | | | Primarily, this introduces an M_OZOCUBUS_ARMOUR that pre-generates tagged monsters with the enchantment already in effect and that does not time out. The spell still exists, and also gives armour that doesn't time out; this would be most likely to be used a monster that has M_OZOCUBUS_ARMOUR. Since the original implementation was for Fannar, it makes sense that he's the first to get it back. I haven't touched his current spell set because he's probably still going to die quickly enough that he won't waste a turn casting it again.
* Augmentation for torturous demonspawn.Steve Melenchuk2014-01-211-0/+3
| | | | | | | | Melee-wise, this adds a 15% damage bonus per augmentation tier; spell-wise, it adds an effective 2 HD per tier. There's a framework here to allow for other monster spell enhancers if we decide we want to go down that road at some future date.
* Remove Mislead.Adam Borowski2013-12-151-1/+0
| | | | | | It was a pure interface screw, and even worse, required a large amount of support code that's a maintenance burden, causing crashes we need to fix from time to time.
* Fix spelling of "targeting" (#7837)Chris Campbell2013-12-101-1/+1
| | | | See Mantis for discussion.
* Remove moths of suppressionChris Campbell2013-11-111-1/+0
| | | | | | | | | | | Suppression is a hugely complicated and inconsistent mechanic. Its original purpose was to be a way of overriding rPois in Spider but there are now plenty of monsters that do this effectively (and much more simply). [1KB: I moved this to trunk, as it made an already extremely hard to review branch massively more so. There's nothing but a single enum to preserve, so compat break doesn't make this removal any easier or harder.]
* Merge branch 'dwants'. Bring some Raid.Adam Borowski2013-11-061-0/+4
|\
| * Merge branch 'master' into dwantsAdam Borowski2013-11-011-1/+2
| |\
| * \ Merge branch 'master' into dwantspubby2013-10-011-2/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: crawl-ref/source/dat/des/variable/mini_monsters.des crawl-ref/source/enum.h crawl-ref/source/itemprop.cc crawl-ref/source/main.cc crawl-ref/source/mutation-data.h crawl-ref/source/mutation.cc crawl-ref/source/newgame.cc crawl-ref/source/ng-restr.cc crawl-ref/source/rltiles/dc-player.txt crawl-ref/source/spl-selfench.cc crawl-ref/source/throw.cc crawl-ref/source/tilepick-p.cc crawl-ref/source/wiz-you.cc
| * \ \ Merge branch 'master' into dwantspubby2013-08-311-9/+12
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: crawl-ref/docs/crawl_manual.reST crawl-ref/source/abl-show.cc crawl-ref/source/dat/descript/ability.txt crawl-ref/source/delay.cc crawl-ref/source/enum.h crawl-ref/source/main.cc crawl-ref/source/mon-cast.cc crawl-ref/source/mon-gear.cc crawl-ref/source/mon-spll.h crawl-ref/source/mutation-data.h crawl-ref/source/mutation.cc crawl-ref/source/ng-restr.cc crawl-ref/source/ng-setup.cc crawl-ref/source/output.cc crawl-ref/source/player-act.cc crawl-ref/source/player.cc crawl-ref/source/species.cc crawl-ref/source/spl-data.h crawl-ref/source/wiz-you.cc
| * | | | Fix whitespace.Neil Moore2013-08-281-2/+2
| | | | |
| * | | | Create Formicid species and monsters.pubby2013-08-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tavern post: https://crawl.develz.org/tavern/viewtopic.php?f=8&t=8298 Wierdness & mutations: - poison weakness - retractable antennae (can wear headgear and ignore mutation) - chitin skin (+3 AC) - most weapons 1-handed, big weapons 2-handed - permanent stasis - ability to shaft self - ability to dig - Starts with 2 curing pots 3 monster versions of formicids were added: formicid, a weak fighter formicid drone, a stronger fighter formicid venom mage, a magician with olgreb's and mass cure poison [ Pushing to a branch for experimental playtesting on CSZO. Also optimised the new tiles. -nfm ]
* | | | | Drop "soul auras".Adam Borowski2013-11-051-5/+4
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | They costed us complex bookkeeping every turn if there were any lost souls on the level. Instead, just check the "hard way" (faster than one turn worth of aura processing) whenever a monster dies. No functional changes.
* | | | Fix an use-after-free crash.Adam Borowski2013-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When doing bad things to a monster from within an enchantment, sometimes the enchantment goes away -- most often together with the monster's life. Trying to decay it at that moment is unwise.
* | | | Evokable Jump attack abilitygammafunk2013-10-011-0/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Player chooses a monster target within range where there's at least one valid landing site adjacent to the target. * There must be a monster to target to use the ability, but the monster can be friendly or neutral. * A random valid landing site is chosen, the player is moved to that square, and weapon melee occurs against the target at the landing site. * Jump attacks are melee with the wielded weapon and get a 20% damage bonus * Valid landing sites are always habitable squares with no monster and no thing that's dangerous to the player. * Flying monsters or giant monsters not standing in deep water or lava can 'block' the path of a landing site by being in the ray path from the player to the landing site. * If a visible monster blocks the path to a landing site, it won't be considered as a valid landing site. * If something invisible blocks a landing site, the site will be shown as valid and can be randomly chosen, in which case the player 'rebounds off something unseen' and never leaves the starting square, but wastes a turn (delay 10aut). * If the player is adjacent to the monster, sites adjacent to the player are not valid; you have to 'jump over' the monster in this case. * Player can't jump if exhausted or standing in water/lava/liquefied ground * Exhaustion duration is set after jump (regardless of success) to prevent a second jump, with a duration formula that's the same as the breath duration. * The usual melee checks wielded weapon/friendly etc. checks are performed for the jump melee. * If any of the valid landing sites would cause problems with self-electrocution or sanctuary violation, the player is warned first. * Range is determined by evocations training; starting attack range is 3 (movement 2), and it increases by one at evocations 5 and 10. * The cost of the jump is 2MP and a hunger cost using the same calculation as for flame breath. * The delay of a successful jump is the same as melee delay. * Fail rate for the ability calculation based on evoke taken from breath fail rate code
* | | Purge a small part of monster thrown weapon AI.Adam Borowski2013-09-221-2/+2
| | |
* | | Move mons_is_stationary() to struct actor.Adam Borowski2013-09-131-0/+1
| |/ |/| | | | | Simplifies code in a number of places, and also fixes a few tree-moving bugs.
* | Store the summoner in struct monster.Adam Borowski2013-08-251-0/+1
| | | | | | | | Nothing queries it yet -- the blame chain uses a string resolved at monster creation time.
* | Revert "Bye bye clinging."Raphael Langella2013-08-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Clinging might be a minor feature, but it's a distinguishing one, it's thematic and it's working quite well. Player/monster symmetry has never been a goal, so it seems dubious to invoke it as the reason to throw away all the work that has been put into clinging. We can always say that the player turns into a different kind of spider which is unable to cling for some reason. This reverts commit bdc56382eacf7af1b2330dc6444916d368741fec. This reverts commit d689486464fcaaac025a6f469ab69674a2f4d173. This reverts commit 1addaaf8ee92de5060fdb436f93251843abd2035.