summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-act.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove stuffNicholas Feinberg2014-07-291-1/+1
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Don't make adjacent archers melee 1/9 of the time (#8795, Grunt)Neil Moore2014-07-141-11/+14
| | | | They'll still switch to melee if they run out of ammo etc.
* Make draining temporary (for monsters)Nicholas Feinberg2014-07-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hit dice-reduction effect of draining has historically had several problems. It reduced monsters' maximum hp, which made it look like they were getting *less* injured, since they had a higher proportion of hp remaining. It lowered monster XP & piety gains, which was irrelevant but misled new players who somehow learned about it. It occasionally led to "degenerate" hit-and-run tactics. And most damningly of all, it hardly ever mattered - it triggered on ~13% of hits, which meant that on low HD monsters the extra damage would kill them before the effect was noticeable, and against high HD monsters, the effect would only ever be noticeable at all with the aforementioned hit-and-run tactics. So, to fix those problems, draining now gives a "drained" status, that reduces monster HD for most combat-related purposes (spellcasting, accuracy, damage, etc.), but not max hp, xp, or piety. This is temporary, but will last 20-30 turns, and refreshes every time the drain triggers - essentially, it should last until you kill the monster, unless you run away. The temp-status is now applied to the monster every time they get drained; the chance of the drain brand activating has been reduced to 1/2, from 2/3. This should focus the effects of the brand more on the unique part of it, the draining/weakening effect. As a bonus, this also means that players can no longer have their followers permanently weakened by draining effects. Beogh buff!
* Separate 'permanent' and 'temporary' monster hit diceNicholas Feinberg2014-07-131-2/+25
| | | | As part of a wider scheme to make draining temporary.
* Let BLOOD finally have its place in the sunNicholas Feinberg2014-07-011-0/+1
| | | | | | ...by moving bloodspatter functions into their own file. Death to misc.cc! Long live the new file hierarchy!
* Split butchering/bottling into a new fileNicholas Feinberg2014-07-011-0/+1
|
* Move blood rotting into a new fileNicholas Feinberg2014-07-011-0/+1
|
* Fix monsters reaching or throwing things while in nets (#8724)reaverb2014-06-221-1/+5
|
* Comment a function (SamB)Neil Moore2014-06-221-0/+9
|
* The great mon-stuff migration.Shmuale Mark2014-06-221-1/+1
| | | | | | | | | 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.
* Make torpor snails give Slow instead of -SwiftNicholas Feinberg2014-06-201-1/+1
| | | | | | | | | | | | To avoid certain issues with re-using durations in unexpected ways (-swift prevented casting Swiftness & gave a bad @ desc), and also allow the effect to straightforwardly be applied to player allies. (Answering the question, "wait, why does this only affect the player?) Their hd, ac, and damage have been shifted slightly downwards, and their xp multiplier has been shifted dramatically upward, in an attempt to avoid making them *too* much stronger.
* Make Mara's summoned clones time out when he dies.Neil Moore2014-06-191-1/+3
| | | | | | | Clones from chaos melee are not affected, but would be easy enough to change. Perhaps temporary clones could actually be is_summoned?
* Add torpor snailsNicholas Feinberg2014-06-151-0/+3
|
* Don't crash when Jiyvite slimes eat their net (#8692)Neil Moore2014-06-151-1/+2
| | | | | Don't destroy the net when breaking free, but only when actually eating the item later in the function.
* Tidy up some web/net behaviourNicholas Feinberg2014-06-131-6/+6
| | | | | | | | | | Monsters should now try to escape from Arachne's ensnare immediately (on whatever incredibly rare occasions that is relevant), and shouldn't try to break out of net traps on the turn they get netted. This technically breaks save compat with the old newly_webbed prop, but in a harmless way.
* Fix whitespace.Neil Moore2014-06-121-1/+0
|
* Make monsters target lightning/cloud rod reasonably.Neil Moore2014-06-121-25/+11
| | | | | | | | | | | | We were calculating (with _thunderbolt_tracer or mons_should_cloud_cone) whether the monster should fire---then ignoring the result for those two spells and always firing. Furthermore, mons_should_cloud_cone used a foe_ratio of zero, meaning it wouldn't care about collateral hits at all. Always use the result of the tracer to decide whether to zap, refactoring the surrounding code a bit in the process. Also, have mons_should_cloud_cone set a foe_ratio (the default 80), as well as a few other bolt members used by mons_should_fire.
* Merge branch 'mon-pickup'Shmuale Mark2014-06-111-4/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Don't let friendlies pick up anything at all.Shmuale Mark2014-05-281-4/+3
| | | | | | | | | | | | | | Since they can't pick up things you've seen, their only chance to get anything would be some kind of madness with tw, which seems like a bad thing to encourage. This only affects perma-allies, obviously, since summons can't pick up anything anyway.
* | Don't let monsters get free turns when escapingNicholas Feinberg2014-06-101-2/+148
| | | | | | | | From nets & webs.
* | Make monsters avoid traps while climbing stairs (7749, elliptic)Nicholas Feinberg2014-06-061-118/+1
| | | | | | | | | | | | As they would during normal movement. Shouldn't get allies triggering zot traps while following you up stairs, etc.
* | Rename nuke_wall() destroy_wall()reaverb2014-06-051-2/+2
| | | | | | | | and also change a temporary variable name to avoid overshadowing
* | Adjustments to Gozag's gold distraction (dpeg).Steve Melenchuk2014-06-031-1/+12
| | | | | | | | | | Monsters are now distracted for 1-5 turns on a 3% chance per pile of gold in LOS.
* | Remove M_VIGILANTreaverb2014-06-011-4/+1
| | | | | | | | | | | | | | It's unused now that curse skulls are stationary again. This reverts commit e381e79d48aaf3bf1e770f58b6abfcf0817f2b81. This reverts commit 5a745abeb842ba05116320a397ba05de73a94303.
* | Revert "Acquaint Curse Skulls with their inner mushroom"reaverb2014-06-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | As the original commit describes, this was experimental. The moving version wasn't well liked, at least the staionary version can be ignored. This reverts commit 2034c5180c8ce08fb2fb3c7955e200c7909a41d0. Conflicts: crawl-ref/source/mon-act.cc crawl-ref/source/mon-behv.cc crawl-ref/source/mon-data.h
* | Use a distribution instead of several random rolls.Neil Moore2014-05-311-8/+7
| |
* | Remove dart traps.Shmuale Mark2014-05-301-1/+0
|/ | | | | | They had minimal damage and mechanical traps hardly generate anywhere anyway. In ossuaries (the only vaults with them, thank god), they've been mostly replaced with arrow traps or the floor.
* Make corpses and skeletons stationary items (minmay)gammafunk2014-05-261-4/+1
| | | | | | | | | Moving corpses and skeletons to other levels or to other locations within a level is tedious but may be optimal for corpse rot and god abilities like Kiku's corpse prayer. This commit prevents the player from picking up or apporting carrion. It generalizes the code used for nets being stationary, and cleans up and documents various bits of related item pickup code.
* Don't let monsters resubmerge in clouds instead of trying to attack the playerChris Campbell2014-05-251-22/+0
| | | | | | | They can still resubmerge, but only if they would have done so anyway with no cloud (if they can't reach their target for example). Trapdoor spiders weren't even immune to the clouds while submerged, and so would previously just stay submerged under a cloud and die.
* Improve indentation.Neil Moore2014-05-201-6/+6
|
* Melt away lava orcs.Steve Melenchuk2014-05-141-0/+8
| | | | | | | | | | | | | | | | 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).
* Remove Shedureaverb2014-05-131-16/+0
| | | | | They never really worked as enemies - their only unique aspect, partner resurrection, was just annoying.
* Don't let monster avatars be distracted by goldChris Campbell2014-05-131-0/+1
|
* Formatting fixes (add braces).Neil Moore2014-05-121-0/+8
| | | | This fixes all the instances caught by unbrace.
* Don't distract sleeping monsters with gold eitherChris Campbell2014-05-091-1/+2
|
* Don't distract non-hostile monsters with gold under GozagChris Campbell2014-05-091-1/+1
|
* Replace Gozag's gold lust with gold distraction (dpeg).Steve Melenchuk2014-05-071-0/+13
| | | | | For every fresh pile of gold in LOS of a monster when they're acting, they have a 5% chance of doing nothing that turn.
* Remove spriggan enchanters.Shmuale Mark2014-05-051-12/+0
| | | | | The monster. It didn't really exist anywhere, nor did the idea seem to add too much to the good-sized danger that spriggans already posed.
* Fix clinging monsters "emerging from the water"Chris Campbell2014-04-061-1/+2
|
* Fix monster rod MP costs.Neil Moore2014-03-241-1/+1
| | | | | | For single-spell rods, they were always 1MP. For multispell rods, monsters were charged for the previous spell in the list (or 1MP if they picked the first spell).
* Remove some references to nonexistent rod spellsChris Campbell2014-03-241-16/+0
|
* Remove MONEAT_FOOD from harpies and GastronokChris Campbell2014-03-231-57/+0
| | | | | | They were the only two monsters using it (allowing them to occasionally eat food or corpses from the floor), and it was very unlikely to ever have a significant effect.
* Conjure Ball Lightning adjustmentsDracoOmega2014-03-151-0/+10
| | | | | | | | | | | | | | | | | | | The reduced CBL duration was so low that the ball lightning would frequently explode before even being able to reach targets in your LoS (or before you could step away, even if you did so immediately on open ground). This commit restores the old duration and makes a few other changes to reduce power level instead: Ball lightning conjured with less spellpower explode for less damage (and their explosion is less likely to be radius 3), the number of ball lightning conjured per cast has been reduced (and the variance decreased somewhat), and ball lightning which leave the player's line of sight immediately dissipate without exploding (so that it is no longer possible to aim them at things you cannot see and cannot harm you). The aim is that this will make it impractical against monsters out of sight, while being less awkward against those IN sight (and less likely to immediately engulf the caster before being able to reach anything else).
* Revamp RakshasaDracoOmega2014-03-111-0/+14
| | | | | | | | | | | | | | | | | | | Rakshasa were a monster that seemed to have little purpose. They couldn't really hurt you (barring picking up a rod or something), yet would duplicate in large numbers and make it rather hard to make them go away. This is aimed at turning their basic behavior into something that can present an actual threat, while simultaneously being less obtrusive. Rakshasa's new spellset consists of Phantom Mirror, IMB, and (less) blink. Phantom Mirror can be used only on other monsters - not themselves - allowing them to perform a support role by duplicating other threats. When they are reduced to 50% hp, as a one-time effect they will split into 3, but cannot otherwise copy themselves or do so continuously (they only regain this ability after recovering to full hp, which probably means you ran away and rested for a while). This commit also gives them actual equipment.
* An attempt at some AI improvements for spellforged servitorsDracoOmega2014-03-061-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | There are two main changes here: Firstly, given that this summon is more likely to be used by conjurers than a typical summon, the tendency for them to walk into your line of fire is more problematic than usual. I have added some fairly 'dumb' code to try and reduce their chances of doing this. All it does is refuse to let the servitor step anywhere in the direct line between the player and the servitor's current enemy target, unless it's already there (either you stepped behind it, or it acquired this target while already interposed). This target is not guaranteed to be what the player wants to fire at themselves, of course, but there's probably a reasonable chance that it often is. Secondly, make the servitor likely to hold position once its target is within range for all of its spells, rather than close further into melee. It has no melee attack in the first place, and I think that keeping its distance will help it avoid blocking the player's line of fire in other cases (as well as help the servitor's own survival). It will not actually retreat, however - simply not advance. My hope is that neither of these behaviors will obtrusively apparent (produce visibly strange behavior) and simply result in it causing fewer visible problems in actual games.
* Add a monster check to prevent a crash due to grand avatar.gammafunk2014-03-051-0/+4
|
* Purge some references to Forest.Shmuale Mark2014-03-031-4/+0
| | | | In particular, ctrl-O should no longer mention the branch.
* Rod of demonology -> Rod of shadows.Steve Melenchuk2014-02-261-2/+1
| | | | | Weaves shadow creatures roughly from D:<evocations power> (including out-of-depth D depths).
* Fix scroll of summoning being cappedDracoOmega2014-02-261-1/+1
| | | | | | | | | | | | | | | The code refactoring that happened when monster summon caps were added accidentally broke the fact that shadow creatures produced by the scroll were not supposed to be capped. However, it looks like it was probably always true that casting shadow creatures after reading a scroll could remove much of what the scroll generated and probably shouldn't be doing that either (I wonder if this ever actually happened?) Now the scroll and spell are treated as two difference sources, and the cap for the latter will not affect the former in any way. (cherry picked from commit 2dda36adbc4ae3e5666489b06bdda8f92ecae781)
* Rod of frigid destruction -> Rod of clouds.Steve Melenchuk2014-02-261-0/+10
| | | | | | | | | | | Sprays clouds over a cone-shaped area in front of the caster. At low power it gives rain, mist, or noxious fumes; mid-tier gives flames, freezing vapour, or poison gas; high-tier gives one of three new cloud types - acidic fog, negative energy, or storm clouds. The targeter is from an experimental implementation of a spell called "Scattershot", hence the name and some of the functionality it provides which goes unused here.