summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
Commit message (Collapse)AuthorAgeFilesLines
* Change a bunch of you.can_see(mon) to mon->observable.Robert Vollmert2009-11-071-2/+2
| | | | | Without player LOS, this was causing messaging errors in the arena.
* Simplify rain and sunlight a bitCharles Otto2009-11-061-0/+11
| | | | | | | Use dungeon_terrain_changed in rain and sunlight, inflict and remove ENCH_AQUATIC_LAND solely in monsters::apply_location_effects. Make sunlight alert monsters it affects.
* Remove the relation between royal jelly spawns and attack sizesStefan O'Rear2009-11-061-4/+8
| | | | It was too scummable, especially with Sticky Flames.
* Simplify.David Lawrence Ramsey2009-11-061-6/+5
|
* New unique: Aizul, disgraced guardian naga turned naga warrior.Jude Brown2009-11-071-1/+2
| | | | | | | | | | | | | | Casts Venom Bolt, Blink Other, Ensorcelled Hibernation, Slow and heals himself. Comes with a ruby-red naga barding, a shield, and a chance of a very nice weapon. Can appear on Snake:4 and Snake:5, and also on similar dungeon levels to Margery and co. Backstory: the guardian of a horde of treasure who fell asleep on the job. Thieves raided the place, and he was disgraced and kicked out. Turned to the role of a warrior, seeking redemption through battle. Currently, there's something weird with the debug build at 'xv' for monster description not displaying the right information all the time.
* Consolidate player/monster sleep checks.David Lawrence Ramsey2009-11-061-2/+27
|
* Replace global see_cell by observe_cell and disambiguate old uses.Robert Vollmert2009-11-061-5/+5
| | | | | | | Calls to plain see_cell(pos) were replaced with either observe_cell(pos) or you.see_cell(pos). observe_cell where related to drawing the interface and messaging, you.see_cell for game mechanics, and one or the other in less clear cases (targetting, say).
* Move checks for the berserk state into actor::berserk().David Lawrence Ramsey2009-11-061-8/+13
|
* Move mons_is_friendly to monsters::friendly.Vsevolod Kozlov2009-11-061-13/+18
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Implement actor::can_see.Robert Vollmert2009-11-061-5/+0
| | | | | This just relies on actor::visible_to and actor::see_cell. An arena special case was removed.
* Add actor::set_position.Robert Vollmert2009-11-061-2/+2
| | | | | | | | | | | | This should be used instead of setting position directly. actor::position could be made "protected" except for the arena's unwind_var(you.position), which is too difficult for me to fix. The reason behind this change is that actors should get their own LOS, whose origin should be synchronized with the actor's position. This change also removes the non-const "coord_def& actor::pos()" (yuk).
* Remove mons_friendly_real and mons_wont_attack_real.Vsevolod Kozlov2009-11-061-2/+2
| | | | | | They were the same as non-_real functions. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Rename is_valid_item to item_def::is_valid.Vsevolod Kozlov2009-11-061-2/+2
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Monster name flags fixupsMatthew Cline2009-11-061-1/+20
| | | | | | | Rename MF_NAME_NO_THE to MF_NAME_ADJECTIVE, since that's what it does. Make description_level_type apply properly to monsters with MF_NAME_FOO flags set.
* Add actor::petrified, which replaces mons_is_petrified.Vsevolod Kozlov2009-11-061-1/+6
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Move up the natural holiness/hellfire resistance check in is_evil().David Lawrence Ramsey2009-11-061-9/+9
|
* Tweak hell knights' resistances so that they resist hellfire, and markDavid Lawrence Ramsey2009-11-051-0/+9
| | | | | | | | | | natural monsters with hellfire resistance as evil (since they likely got it through evil pacts or the like, as opposed to things like fire elementals, which are just made of fire). This ensures that all hell knights are evil, even if they get the spellbook with only Bolt of Fire and Blink, without marking Harold as evil for getting that same spellbook.
* Remove the rest of the M_EVIL references.David Lawrence Ramsey2009-11-051-3/+0
|
* In is_evil(), mark monsters with evil attack flavors.David Lawrence Ramsey2009-11-051-0/+6
|
* Reorder a few functions.David Lawrence Ramsey2009-11-051-7/+7
|
* Make AF_HUNGER, AF_STEAL, and AF_STEAL_FOOD chaotic attack flavors.David Lawrence Ramsey2009-11-051-2/+5
| | | | | | Zin, as a lawful god, dislikes hunger-causing artefacts, so he would dislike hunger-causing effects as well. Also, he would probably frown on stealing in general.
* Revert erroneously committed bit.David Lawrence Ramsey2009-11-051-1/+1
|
* Name the checks for monsters with evil or chaotic spells consistently.David Lawrence Ramsey2009-11-051-9/+9
|
* In is_evil(), mark monsters with explicitly evil spells.David Lawrence Ramsey2009-11-051-5/+22
| | | | Unify checks for monsters with chaotic spells, and do the same for them.
* In is_chaotic(), mark player followers/monster priests of chaotic gods.David Lawrence Ramsey2009-11-051-1/+5
|
* In is_evil(), mark player followers and monster priests of evil gods.David Lawrence Ramsey2009-11-051-1/+11
|
* Create an is_evil() function in the actor interface.David Lawrence Ramsey2009-11-051-1/+6
| | | | Currently, only unholy monsters are marked as evil this way.
* Replace mons_is_caught with monsters::caught.Vsevolod Kozlov2009-11-051-2/+2
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Replace mons_is_paralysed with monsters::paralysed.Vsevolod Kozlov2009-11-051-1/+1
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Make many checks for monster (non)existence on squares use monster_at().David Lawrence Ramsey2009-11-051-3/+3
| | | | | | | Not all are changed yet, as there are several index checks still needed for debugging purposes. Also, make many checks for player/monster (non)existence use actor_at().
* Merge monsters,player::check_res_magic() (Zaba)Adam Borowski2009-11-051-35/+0
|
* Move *_res(ist)_magic to relevant classes, provide actor interface.Vsevolod Kozlov2009-11-051-0/+72
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* New monsters: golden eyes.Jude Brown2009-11-051-0/+1
| | | | | | | Small, blinking, and fast, these eyes come in packs and are found natively in Slime (though somewhat rarely). Their confusion ability does check MR before passing, however, and can be completely avoided by having Clarity.
* Allow each dancing weapon to have its own statsStefan O'Rear2009-11-041-0/+13
|
* Fix inconsistencies in checks for monsters' being slime creatures.David Lawrence Ramsey2009-11-041-1/+1
|
* Allow vaults to override monster spells with spells:<xyz>Darshan Shaligram2009-11-041-2/+36
| | | | | | | | | | Vaults can now override monster spell sets, or give non-casting monsters spells, and mark monsters as wizard or priest types. The M_ACTUAL_SPELLS, M_SPELLCASTER and M_PRIEST monster class flags are converted into MF_* flags at monster creation/polymorph time, and only the per-monster flags are checked when determining wizard/priestliness. See caveats in level_design.txt.
* Remove some hardcoded monster flags.David Lawrence Ramsey2009-11-041-0/+2
| | | | | | Since insubstantial monsters all resist sticky flame, move the check for insubstantiality into monsters::res_sticky_flame(), and remove the MR_RES_STICKY_FLAME flag from such monsters.
* Add formatting fixes.David Lawrence Ramsey2009-11-041-9/+11
|
* Disintegration can be very messy.Stefan O'Rear2009-11-041-0/+9
|
* monster.cc: More info than just INVALID MONSTERMatthew Cline2009-11-031-2/+54
| | | | | When trying to get the name of a monster with an invalid type, provide a little more information that just the fact that it's an invalid monster.
* Cope with old saves with 0-piece slime creatures.Adam Borowski2009-11-041-2/+2
| | | | Can be reverted once CDO is updated or purged.
* Make Chain Lightning a monster spell, add an user of it (Nikola).Adam Borowski2009-11-031-2/+6
|
* Add formatting fix.David Lawrence Ramsey2009-11-021-2/+2
|
* Add minor cosmetic fixes.David Lawrence Ramsey2009-11-021-0/+2
|
* Mark monsters with Summon Ugly Thing chaotic.Eino Keskitalo2009-11-021-1/+3
| | | | Signed-off-by: Eino Keskitalo <evktalo@users.sourceforge.net>
* Revert "Merge a few bits of Eino's chaotic_experiment branch that make sense"David Lawrence Ramsey2009-11-021-4/+1
| | | | This reverts commit d50bd43ba9936c27f4f90ecd324d14cb52c9f381.
* Merge a few bits of Eino's chaotic_experiment branch that make senseDavid Lawrence Ramsey2009-11-021-1/+4
| | | | | | | | | | | | with the current code: 1. Death oozes eating silver and holy wrath items take damage instead of gaining hp. 2. Mark monsters with Summon Ugly Thing chaotic. Also, until the issue of transformations' being chaotic or not is worked out, don't mark any players as chaotic.
* Special case source==target in num_feats_between.Robert Vollmert2009-11-011-0/+2
| | | | | This was causing a crash through monsters::mon_see_cell. Also special case monster position there.
* Move checks for a player or monster's being chaotic into anotherDavid Lawrence Ramsey2009-11-011-0/+22
| | | | convenience function in the actor interface.
* Split up monstuff.ccMatthew Cline2009-11-011-1/+2
| | | | | | | A lot of monstuff.cc was moved into mon-abil.cc (monster abilities), mon-act.cc (the main monster loop), mon-behv.cc (monster behaviour) and mon-cast.cc (monster spells). mstuff2.cc was completely merged into other files.