summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
Commit message (Collapse)AuthorAgeFilesLines
* "Maras are frozen" -> "The Maras are frozen" (5054)Jesse Luehrs2014-08-141-1/+5
|
* Remove 2 more parameters from items()reaverb2014-08-081-1/+1
| | | | | They were only used in one place, and the relevant code was moved to that one place in the previous commit.
* Hide a hack better.Shmuale Mark2014-08-031-3/+2
| | | | | | | Ideally, we wouldn't be using special for unrands totally different from how items of the same type do, but that's less trivial than this commit. A centralised place to check for being an unrand should at least make such a change easier.
* Remove stuffNicholas Feinberg2014-07-291-1/+2
| | | | | | | .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 mark friendly illusions/ghosts as interesing (#8817)Neil Moore2014-07-261-1/+1
|
* Make ranged weapon delay display properly on @Nicholas Feinberg2014-07-251-1/+13
| | | | | | | | 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.
* Make draining temporary (for monsters)Nicholas Feinberg2014-07-131-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-19/+29
| | | | As part of a wider scheme to make draining temporary.
* Refactor weapon_skill()Nicholas Feinberg2014-07-131-5/+5
| | | | | | | | | | | | | | This function was misleadingly named (it only provided the skill used for melee weapons, not ranged weapons), and incomplete; code along the lines of "is_ranged_weapon(*it) ? range_skill(*it) : weapon_skill(*it)" was scattered in about half a dozen different functions. I've corrected both of those problems (renaming weapon_ skill() to melee_skill() and adding item_weapon_skill()), and also possibly fixed two bugs in the process - an l_you.cc function that claimed to provide the skill used for the starting weapon (but actually only gave the melee skill), and unrand creation code that checked if a potential unrand swap used the same (melee) skill as the weapon type being generated.
* Refactor duplicate code from can_wield()Nicholas Feinberg2014-07-131-1/+10
|
* Refactor item handedness codeNicholas Feinberg2014-07-131-1/+1
| | | | | | | | | | | | | | Instead of specifying HANDS_ONE or HANDS_TWO in Weapon_prop[] (which were... misleading at best), there's now a min_2h_size and min_1h_size field. The former controls the minimum size a player or monster must be to wield the weapon at all; the latter is the minimum size required to wield it with one hand. This means that giants can now wield daggers (unlike before); if necessary, a max_size field can be added, but this seems a low priority to preserve. This breaks formatting of Weapon_prop[] a bit; apologies.
* Remove code for monster formicids wielding giant clubsNicholas Feinberg2014-07-131-8/+2
|
* Give pigs trotters.Neil Moore2014-07-121-0/+2
| | | | | | Burning your own trotters might not be such a smart idea! A thick slime forms on your front trotters.
* Remove sharks from the gamereaverb2014-07-121-1/+1
| | | | | They had all the same problems as big fish or other melee liquid-only monsters.
* Improve sleep codeNicholas Feinberg2014-07-111-13/+5
| | | | | | Refactor put_to_sleep() and hibernate() together. Also improve messenging for resisting repeated sleep (by replacing a generic canned message).
* Remove Davy Jones' Locker (let monster undead drown)Nicholas Feinberg2014-07-101-7/+1
| | | | | | | | | | | Previously they'd sink to the bottom of deep water & lurk forever. Thematic, but extremely unintuitive and not really accomplishing much. It'd be cool to let them move slowly through deep water, maybe, but hiding at the bottom was clearly the wrong answer. Also touch up player drowning messages a little bit, and fix one that would never show up.
* Don't let monsters sometimes block attacks while incapacitatedChris Campbell2014-07-091-2/+1
| | | | They could very rarely block melee attacks.
* Fix magical shields being unable to block most ranged attacks (#8772)Chris Campbell2014-07-091-0/+8
| | | | | | | | 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 Lava Wormsreaverb2014-07-071-1/+0
| | | | | Lava Worms had all the problems of Big Fish and Sharks, and furthermore only appeared in a few volcano vaults and a serial vault.
* Fix (?) blood potion stack mergingNicholas Feinberg2014-07-051-1/+1
|
* Remove ISFLAG_DROPPED_BY_ALLY.Neil Moore2014-07-061-9/+0
| | | | | Since the removal of ally pickup modes, the flag has still been tracked but never actually read.
* Remove unused parameters from umbra() and backlit().Neil Moore2014-07-051-14/+8
|
* Let BLOOD finally have its place in the sunNicholas Feinberg2014-07-011-1/+1
| | | | | | ...by moving bloodspatter functions into their own file. Death to misc.cc! Long live the new file hierarchy!
* Move blood rotting into a new fileNicholas Feinberg2014-07-011-0/+1
|
* Give stasis to formicid ghosts (#8741)Neil Moore2014-07-021-1/+4
|
* Remove an unused argument from the items() functiongammafunk2014-06-291-1/+1
|
* Reduce code duplicationreaverb2014-06-261-1/+1
|
* Make living lost soul revival more like the undead one.Shmuale Mark2014-06-261-0/+3
| | | | | | | | | | | | Turning the monster into a spectre is a really cool effect and causes some useful things automatically, like making it evil, but has interface problems (with showing the base monster type, not just the species) and also monster-monster consistency ones (in general, spectral things can't cast spells). There are minor gameplay differences, mostly in that the new monster will not have any of the resistances/vulnerabities of being undead, but in general it should play similarly to how it already does.
* Invert a checkNicholas Feinberg2014-06-251-2/+2
|
* Fix a shadowed variable nameNicholas Feinberg2014-06-241-9/+9
|
* Don't mistake ranged weapons for melee weaponsNicholas Feinberg2014-06-241-0/+25
|
* Cleanup some monster throwing weapon pickup codeNicholas Feinberg2014-06-241-6/+4
| | | | | They probably don't need to be checking for plusses on darts. Or, at all.
* Fix a crash when recalling monsters onto shafts (8717)Nicholas Feinberg2014-06-221-7/+6
| | | | | Also removes a layer of indentation from recall_offlevel_ally(); apologies for the messy diff!
* The great mon-stuff migration.Shmuale Mark2014-06-221-2/+90
| | | | | | | | | 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-13/+3
| | | | | | | 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-3/+3
|
* Try to reduce duplication in Recite code.Shmuale Mark2014-06-191-35/+97
| | | | | | | | | | | | | | 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/+6
| | | | Specifically, a Mara-spawned illusion of an angel.
* Remove an unused variable.Neil Moore2014-06-191-2/+0
|
* Remove the dragon slaying brandreaverb2014-06-181-4/+0
| | | | | | | | Generally it doesn't create interesting decisions because dragons are such a small group and are mostly a subset of monsters slowed by the freezing brand. In addition, it has rather arbitrary effects against players, hitting some for an degenerate amount of damage while ignoring others.
* Get rid of a few spurious uses of mons_base_char().Shmuale Mark2014-06-181-2/+2
|
* Replace randomly-generate teleport traps with 1-shot versionsNicholas Feinberg2014-06-171-1/+2
|
* Unbreak compilation.Shmuale Mark2014-06-171-1/+1
|
* Make profane servitors ignore holy wrath, like holy energy (#7089).Shmuale Mark2014-06-171-0/+5
|
* Combine plus/plus2 for rings of slaying, and Acc+/Dam+ on artefactsChris Oelmueller2014-06-131-3/+0
| | | | | | | | | | Phase out ARTP_ACCURACY, rename ARTP_DAMAGE to ARTP_SLAYING which now combines both Acc+ and Dam+ bonuses. Bracers of archery are +4 now instead of +5,+3. [Committer's note: fixed a description and cleaned up various other small issues.]
* Make spriggan riders ride wasps instead of mosquitosChris Campbell2014-06-131-6/+2
| | | | Since mixing holinesses on a single monster has some weird results.
* Allow giving misc/books to monsters (#8678)Neil Moore2014-06-121-8/+4
| | | | | | They still won't pick them up, but they can now be explicitly given via monspecs or mon-gear.cc; in particular, Geryon and Roxanne will once again get their horn and book, respectively.
* Rename BEAM_NAPALM to BEAM_STICKY_FLAMEreaverb2014-06-111-1/+1
|
* Tell calling function that mimic pickup was actually successful (#8674).Shmuale Mark2014-06-111-1/+1
|
* Merge branch 'mon-pickup'Shmuale Mark2014-06-111-68/+66
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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