Angband
Functions
mon-predicate.c File Reference

Monster predicates. More...

#include "angband.h"
#include "mon-util.h"

Functions

bool monster_is_nonliving (const struct monster *mon)
 

Permanent monster properties

More...
 
bool monster_is_destroyed (const struct monster *mon)
 Nonliving and stupid monsters are destroyed rather than dying. More...
 
bool monster_passes_walls (const struct monster *mon)
 Monster can pass through walls. More...
 
bool monster_is_invisible (const struct monster *mon)
 Monster is invisible. More...
 
bool monster_is_unique (const struct monster *mon)
 Monster is unique. More...
 
bool monster_is_stupid (const struct monster *mon)
 Monster is. More...
 
bool monster_is_smart (const struct monster *mon)
 Monster is smart. More...
 
bool monster_is_evil (const struct monster *mon)
 Monster is evil. More...
 
bool monster_is_powerful (const struct monster *mon)
 Monster is powerful. More...
 
bool monster_is_in_view (const struct monster *mon)
 

Temporary monster properties

More...
 
bool monster_is_visible (const struct monster *mon)
 Monster is visible to the player. More...
 
bool monster_is_camouflaged (const struct monster *mon)
 Player doesn't recognise the monster as a monster. More...
 
bool monster_is_obvious (const struct monster *mon)
 Monster is recognisably a monster to the player. More...
 
bool monster_is_mimicking (const struct monster *mon)
 Monster is currently mimicking an item. More...
 

Detailed Description

Monster predicates.

Copyright (c) 1997-2007 Ben Harrison, James E. Wilson, Robert A. Koeneke Copyright (c) 2017 Nick McConnell

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 monster_is_camouflaged ( const struct monster mon)
bool monster_is_destroyed ( const struct monster mon)

Nonliving and stupid monsters are destroyed rather than dying.

References monster_race::flags, monster_is_nonliving(), monster::race, and rf_has.

Referenced by look_mon_desc(), mon_take_hit(), project_m(), and ranged_helper().

bool monster_is_evil ( const struct monster mon)

Monster is evil.

References monster_race::flags, monster::race, and rf_has.

Referenced by effect_handler_DETECT_EVIL(), and make_attack_normal().

bool monster_is_in_view ( const struct monster mon)


Temporary monster properties

Monster is in the player's field of view

References monster::mflag, and mflag_has.

Referenced by process_monster(), process_monster_try_push(), and update_mon().

bool monster_is_invisible ( const struct monster mon)
bool monster_is_mimicking ( const struct monster mon)
bool monster_is_nonliving ( const struct monster mon)


Permanent monster properties

Nonliving monsters are immune to life drain

References FLAG_END, monster_race::flags, flags_test(), monster::race, RF_DEMON, and RF_SIZE.

Referenced by monster_is_destroyed(), and project_monster_handler_MON_DRAIN().

bool monster_is_obvious ( const struct monster mon)

Monster is recognisably a monster to the player.

References monster_is_camouflaged(), and monster_is_visible().

Referenced by mon_set_timed(), monster_reduce_sleep(), run_test(), target_able(), target_accept(), and target_set_interactive_aux().

bool monster_is_powerful ( const struct monster mon)

Monster is powerful.

References monster_race::flags, monster::race, and rf_has.

Referenced by effect_handler_BALL(), and effect_handler_BREATH().

bool monster_is_smart ( const struct monster mon)
bool monster_is_stupid ( const struct monster mon)
bool monster_is_unique ( const struct monster mon)
bool monster_is_visible ( const struct monster mon)
bool monster_passes_walls ( const struct monster mon)

Monster can pass through walls.

References FLAG_END, monster_race::flags, flags_test(), monster::race, and RF_SIZE.

Referenced by get_moves_advance(), and monster_check_active().