mon-move.h File Reference

Monster movement. More...

Go to the source code of this file.


bool multiply_monster (const struct monster *m)
void process_monsters (struct chunk *c, int minimum_energy)
 Process all the "live" monsters, once per game turn.
void reset_monsters (void)
 Clear 'moved' status from all monsters.

Detailed Description

Monster movement.

Copyright (c) 1997 Ben Harrison, David Reeve Sward, Keldon Jones.

This work is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation, version 2, or

b) the "Angband licence": This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.

Function Documentation

bool multiply_monster ( const struct monster m)
void process_monsters ( struct chunk c,
int  minimum_energy 

Process all the "live" monsters, once per game turn.

During each game turn, we scan through the list of all the "live" monsters, (backwards, so we can excise any "freshly dead" monsters), energizing each monster, and allowing fully energized monsters to move, attack, pass, etc.

This function and its children are responsible for a considerable fraction of the processor time in normal situations, greater if the character is resting.

References cave, cave_monster(), cave_monster_max(), monster::energy, FALSE, player_upkeep::generate_level, i, player::is_dead, is_mimicking(), monster::m_timed, monster::mflag, mflag_has, mflag_on, chunk::mon_current, monster_check_active(), angband_constants::move_energy, monster::mspeed, process_monster(), process_monster_timed(), PU_MONSTERS, monster::race, regen_monster(), TRUE, turn, turn_energy(), player_upkeep::update, player::upkeep, and z_info.

Referenced by run_game_loop().

void reset_monsters ( void  )

Clear 'moved' status from all monsters.

Clear noise if appropriate.

References cave, cave_monster(), cave_monster_max(), i, monster::mflag, and mflag_off.

Referenced by run_game_loop().