summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Cope with old saves with 0-piece slime creatures.Adam Borowski2009-11-041-1/+1
| | | | Can be reverted once CDO is updated or purged.
* Add various color-related fixes.David Lawrence Ramsey2009-11-011-11/+4
|
* Move checks for a player or monster's being chaotic into anotherDavid Lawrence Ramsey2009-11-011-25/+3
| | | | convenience function in the actor interface.
* Split up monstuff.ccMatthew Cline2009-11-011-0/+7
| | | | | | | 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.
* monster.cc: Split of monsters clasxs methodsMatthew Cline2009-10-311-5635/+28
| | | | | First step in splitting up mon-util.cc: move monsters class methods out into monster.cc
* Simplify (very) ugly thing color-related functions.David Lawrence Ramsey2009-10-311-24/+13
|
* Add minor cosmetic fixes.David Lawrence Ramsey2009-10-311-0/+2
|
* Make creatures with AF_KLOWN considered chaotic. (doy, sorear)Eino Keskitalo2009-11-011-1/+2
| | | | Signed-off-by: Eino Keskitalo <evktalo@users.sourceforge.net>
* Implement [2888962]: Disallow shapeshifters from changing form whileDavid Lawrence Ramsey2009-10-311-10/+11
| | | | sleeping.
* Merge mons_holiness() into monster::holiness(), and add an is_unholy()David Lawrence Ramsey2009-10-311-37/+29
| | | | convenience function.
* Fix a few things in previous commit.Robert Vollmert2009-10-311-17/+17
|
* Combine mons_res_foo(monsters *m) into monsters::res_foo()abrahamwl2009-10-311-249/+204
| | | | | | | | | | ...and replace all references to mons_res_foo() with res_foo(). Where "foo" is one of the many different things monsters can resist that happened to have a function of that format. TGfR! (Thank God for Regex!) Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Fix polymorphing monsters into slime creatures by setting the monsterDavid Lawrence Ramsey2009-10-311-0/+5
| | | | number properly in define_monster().
* Implement [2889948]: In the console version, make (very) ugly thingDavid Lawrence Ramsey2009-10-311-0/+10
| | | | | corpses randomly cycle through all their available colors instead of always being (light)red.
* Combine mons_is_submerged(monsters *m) into monsters::submerged()abrahamwl2009-10-311-19/+16
| | | | | | ...and replace all references to mons_is_submerged() with submerged(). It's a dirty job, but someone's got to do it. (Thank God for regex!)
* Fix more missing includes. Sorry.Robert Vollmert2009-10-311-0/+1
|
* Combine mons_is_sleeping(monsters *m) into monsters::asleep()abrahamwl2009-10-301-7/+2
| | | | ...and replace all references to mons_is_sleeping with asleep.
* Add minor cosmetic fixes.David Lawrence Ramsey2009-10-301-23/+16
|
* A few slime creature tweaksCharles Otto2009-10-301-2/+1
| | | | | | On second thought don't stack HD when merging. Merge monster flags when merging. Merging costs the merged slime a turn.
* Various slime creature improvementsCharles Otto2009-10-301-10/+5
| | | | | | | | | | | | | | Make splitting while out of sight actually work When merging average enchantment durations for the two slimes When splitting add the parents ench durations to the offspring slime Better messaging for merging/splitting Cap the merge count to 5, use size adjectives instead of numbers for the combiend slime creature names. Don't group different size slime creatures together in the monster list
* Preliminary support for slime creatures merging and splitting.Charles Otto2009-10-301-2/+38
| | | | | | | | | | | | | | | | | | | | A slime creatures will merge onto an adjacent slime creature if the merge brings it closer to its target, merging only happens when slime creatures aren't wandering, sleeping, or fleeing. A slime creature will split (if it merged previously) if it is at full hp and is resting or wandering. I added a hack to make the experienced gained for merged slime creatures approximately equal to killing however many were merged individually, exp from merged slimes may be too low now. For now the number of slime creatures merged into one J is given explicitly in their description (one-blob slime creature), that should get changed at some point. Damage and maxHP for merged slime creatures are linear with the number merged, an arbitrary cap of 8 is currently in place.
* Splitting up stuff.cc.Robert Vollmert2009-10-301-0/+2
| | | | New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
* Rename shadows brand into reaping for unique name.Eino Keskitalo2009-10-301-1/+1
| | | | Signed-off-by: Eino Keskitalo <evktalo@users.sourceforge.net>
* Bolt of Iron->Iron Shot, Ice Bolt->Fling Icicleabrahamwl2009-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | Based on FR 1801710 Bolt of Iron and Ice Bolt were both mechanically different from the other "bolts" in that they didn't penetrate targets. In addition, Ice Bolt was very easy to confuse with Bolt of Cold. So they got their names changed to Iron Shot and Fling Icicle, respectively. This change is both external (in the game output) and internal (how the code refers to the spells). This commit also changes the names of the spells in the data files (ie. for tiles) and the names of some data files themselves (tile images). (See the file list.) Note that Lemuel's comment about the concept (and tile art)of "bolt" not fitting with the way the "bolt" spells behave is still valid, but that's another issue. I think this stems from a confusion between lightning "bolts" and crossbow "bolts." Signed-off-by: Eino Keskitalo <evktalo@users.sourceforge.net>
* Remove mons_friendly special casing in arena.Robert Vollmert2009-10-291-3/+0
| | | | | | | | This was preventing _mons_check_set_foe from choosing targets in the arena. Also some checks to avoid setting MHITYOU and you.pet_target to fail triggering arena asserts.
* Reset seen_context in monsters::reset.Robert Vollmert2009-10-291-0/+1
|
* rC+ protects monsters from being slowed by cold.abrahamwl2009-10-281-1/+1
|
* (MONS_PROGRAM_BUG || -1) --> MONS_NO_MONSTERMatthew Cline2009-10-271-10/+11
| | | | | | | | | Change MONS_PROGRAM_BUG to MONS_NO_MONSTER when "no monster" is what was meant. Now all instances of MONS_PROGRAM_BUG should indicated some sort of failure or error. Also, fixed some places which were still using -1 instead of MONS_NO_MONSTER.
* Get rid of part of mons_near.Robert Vollmert2009-10-271-0/+6
| | | | | mons_near now only checks player proximity. Checking for foe proximity is now handled by monsters::near_foe.
* Convert some ints to monster_type.Robert Vollmert2009-10-271-16/+16
| | | | | | | | | There's a whole lot of places that pass monster_type as int, often with varying meanings for the value -1. This moves some of these to monster_type, introducing MONS_NO_MONSTER and MONS_PLAYER as new invalid special values. Also improve on the autoexclude descriptions.
* Preliminarily add a new fungus species to replace fungus w.r.t. sporesCharles Otto2009-10-251-2/+2
| | | | | | | | Add a fungus species ('ballistomycete') to use in place of fungus in spores explosions etc. Fix a couple message leaks (wrong version of see_cell used in monaters::apply_enchantment)
* Extract newgame character restrictions from newgame.cc.Robert Vollmert2009-10-241-1/+1
| | | | | | | | | | | | | | | | | The functions in the new ng-restr.cc are "pure": They don't access global state; data is passed in via the new and incomplete newgame_def. Eventually, new_game should be split into something like newgame_def choose_game(); that doesn't access "you", and void setup_game(newgame_def); that sets up the player. Also get rid of player_size in favour of player::body_size. Rename player_size_type to size_part_type since it's not really player-specific (used in actor::body_size). Move parts of player_genus, player::has_claws, body_size out into species.cc.
* When mutating (very) ugly things due to the proximity of other (very)David Lawrence Ramsey2009-10-231-2/+2
| | | | ugly things, bias their colors toward those of very ugly things.
* Moving data out of newgame.cc.Robert Vollmert2009-10-231-0/+1
| | | | Also move species<->string translation from player.cc to species.cc.
* Fix a crash caused by monsters::check_redraw using the wrong see_cellCharles Otto2009-10-221-2/+2
| | | | | | | | Fix an assertion failure triggered by view_update_at getting called for out of sight squares. view_update_at was getting called for out of LOS squares because monsters::check_redraw was using monsters::see_cell instead of the global function see_cell for the LOS check.
* Also remove monster::visible.Robert Vollmert2009-10-221-6/+1
|
* Get rid of player_monster_visible.Robert Vollmert2009-10-221-9/+9
| | | | | | The special casing for drowning monsters appears to have been obsoloted by checking ENCH_SUBMERGED instead of calling mons_is_submerged.
* Fold mon_can_see_monster and mons_monster_visible into monsters.Robert Vollmert2009-10-221-32/+2
|
* Move mons_player_visible into player::visible_to.Robert Vollmert2009-10-221-18/+0
|
* Remove mons_see_invis in favour of monsters::can_see_invisible.Robert Vollmert2009-10-221-15/+9
|
* Move player_see_invis into player class.Robert Vollmert2009-10-221-3/+3
|
* Introduce actor::see_cell.Robert Vollmert2009-10-221-9/+10
| | | | | Implemented using the existing LOS functions for now. In particular, monster-monster visibility still uses num_feats_between.
* Make Chronos account for player's haste/slow/statue form.Adam Borowski2009-10-221-2/+3
|
* Fix another case of reversed speed.Adam Borowski2009-10-221-0/+4
|
* Fix the Chronos speed reversal bug. It's now bad to be spriggan, good to be ↵Adam Borowski2009-10-221-2/+3
| | | | naga.
* Slightly reduce religion.cc by yanking item-handling stuff to goditem.ccAdam Borowski2009-10-211-0/+1
|
* gods: added "Chronos", the slow godSteven Noonan2009-10-201-1/+6
| | | | | Signed-off-by: Brendan Hickey <brendan@bhickey.net> Acked-by: Steven Noonan <steven@uplinklabs.net>
* Kraken tentacles shouldn't zerk.Adam Borowski2009-10-191-1/+1
|
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Keep krakens from submerging unless you're away from water.Adam Borowski2009-10-181-0/+13
|