Angband
Data Structures | Macros | Enumerations | Variables
monster.h File Reference

Flags, structures and variables for monsters. More...

#include "h-basic.h"
#include "z-bitflag.h"
#include "z-rand.h"
#include "cave.h"
#include "mon-timed.h"
#include "mon-blows.h"
#include "list-mon-temp-flags.h"
#include "list-mon-race-flags.h"
#include "list-mon-spells.h"

Go to the source code of this file.

Data Structures

struct  monster_flag
 Structures. More...
 
struct  monster_blow
 Monster blows. More...
 
struct  monster_pain
 Monster pain messages. More...
 
struct  monster_spell
 Monster spell types. More...
 
struct  monster_base
 Base monster type. More...
 
struct  monster_drop
 Specified monster drops. More...
 
struct  monster_friends
 Monster friends (specific monster) More...
 
struct  monster_friends_base
 Monster friends (general type) More...
 
struct  monster_mimic
 How monsters mimic. More...
 
struct  monster_race
 Monster "race" information, including racial memories. More...
 
struct  monster
 Monster information, for a specific monster. More...
 

Macros

#define MFLAG(a, b)   MFLAG_##a,
 
#define MFLAG_SIZE   FLAG_SIZE(MFLAG_MAX)
 
#define mflag_has(f, flag)   flag_has_dbg(f, MFLAG_SIZE, flag, #f, #flag)
 
#define mflag_next(f, flag)   flag_next(f, MFLAG_SIZE, flag)
 
#define mflag_is_empty(f)   flag_is_empty(f, MFLAG_SIZE)
 
#define mflag_is_full(f)   flag_is_full(f, MFLAG_SIZE)
 
#define mflag_is_inter(f1, f2)   flag_is_inter(f1, f2, MFLAG_SIZE)
 
#define mflag_is_subset(f1, f2)   flag_is_subset(f1, f2, MFLAG_SIZE)
 
#define mflag_is_equal(f1, f2)   flag_is_equal(f1, f2, MFLAG_SIZE)
 
#define mflag_on(f, flag)   flag_on_dbg(f, MFLAG_SIZE, flag, #f, #flag)
 
#define mflag_off(f, flag)   flag_off(f, MFLAG_SIZE, flag)
 
#define mflag_wipe(f)   flag_wipe(f, MFLAG_SIZE)
 
#define mflag_setall(f)   flag_setall(f, MFLAG_SIZE)
 
#define mflag_negate(f)   flag_negate(f, MFLAG_SIZE)
 
#define mflag_copy(f1, f2)   flag_copy(f1, f2, MFLAG_SIZE)
 
#define mflag_union(f1, f2)   flag_union(f1, f2, MFLAG_SIZE)
 
#define mflag_inter(f1, f2)   flag_inter(f1, f2, MFLAG_SIZE)
 
#define mflag_diff(f1, f2)   flag_diff(f1, f2, MFLAG_SIZE)
 
#define RF(a, b, c)   RF_##a,
 
#define RF_SIZE   FLAG_SIZE(RF_MAX)
 
#define rf_has(f, flag)   flag_has_dbg(f, RF_SIZE, flag, #f, #flag)
 
#define rf_next(f, flag)   flag_next(f, RF_SIZE, flag)
 
#define rf_count(f)   flag_count(f, RF_SIZE)
 
#define rf_is_empty(f)   flag_is_empty(f, RF_SIZE)
 
#define rf_is_full(f)   flag_is_full(f, RF_SIZE)
 
#define rf_is_inter(f1, f2)   flag_is_inter(f1, f2, RF_SIZE)
 
#define rf_is_subset(f1, f2)   flag_is_subset(f1, f2, RF_SIZE)
 
#define rf_is_equal(f1, f2)   flag_is_equal(f1, f2, RF_SIZE)
 
#define rf_on(f, flag)   flag_on_dbg(f, RF_SIZE, flag, #f, #flag)
 
#define rf_off(f, flag)   flag_off(f, RF_SIZE, flag)
 
#define rf_wipe(f)   flag_wipe(f, RF_SIZE)
 
#define rf_setall(f)   flag_setall(f, RF_SIZE)
 
#define rf_negate(f)   flag_negate(f, RF_SIZE)
 
#define rf_copy(f1, f2)   flag_copy(f1, f2, RF_SIZE)
 
#define rf_union(f1, f2)   flag_union(f1, f2, RF_SIZE)
 
#define rf_comp_union(f1, f2)   flag_comp_union(f1, f2, RF_SIZE)
 
#define rf_inter(f1, f2)   flag_inter(f1, f2, RF_SIZE)
 
#define rf_diff(f1, f2)   flag_diff(f1, f2, RF_SIZE)
 
#define RSF(a, b)   RSF_##a,
 
#define RSF_SIZE   FLAG_SIZE(RSF_MAX)
 

Enumerations

enum  { MFLAG_MAX }
 Special Monster Flags (all temporary) More...
 
enum  monster_flag_type {
  RFT_NONE = 0, RFT_OBV, RFT_DISP, RFT_GEN,
  RFT_NOTE, RFT_BEHAV, RFT_DROP, RFT_DET,
  RFT_ALTER, RFT_RACE_N, RFT_RACE_A, RFT_VULN,
  RFT_VULN_I, RFT_RES, RFT_PROT, RFT_MAX
}
 The monster flag types. More...
 
enum  { RF_MAX }
 Monster property and ability flags (race flags) More...
 
enum  
 Monster spell flag indices. More...
 

Variables

s16b num_repro
 Variables. More...
 
struct monster_painpain_messages
 
struct monster_spellmonster_spells
 
struct monster_baserb_info
 
struct monster_racer_info
 
const struct monster_raceref_race
 

Detailed Description

Flags, structures and variables for monsters.

Copyright (c) 2007 Andi Sidwell Copyright (c) 2010 Chris Carr

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.

Macro Definition Documentation

#define MFLAG (   a,
 
)    MFLAG_##a,
#define mflag_copy (   f1,
  f2 
)    flag_copy(f1, f2, MFLAG_SIZE)
#define mflag_diff (   f1,
  f2 
)    flag_diff(f1, f2, MFLAG_SIZE)
#define mflag_has (   f,
  flag 
)    flag_has_dbg(f, MFLAG_SIZE, flag, #f, #flag)
#define mflag_inter (   f1,
  f2 
)    flag_inter(f1, f2, MFLAG_SIZE)
#define mflag_is_empty (   f)    flag_is_empty(f, MFLAG_SIZE)
#define mflag_is_equal (   f1,
  f2 
)    flag_is_equal(f1, f2, MFLAG_SIZE)
#define mflag_is_full (   f)    flag_is_full(f, MFLAG_SIZE)
#define mflag_is_inter (   f1,
  f2 
)    flag_is_inter(f1, f2, MFLAG_SIZE)
#define mflag_is_subset (   f1,
  f2 
)    flag_is_subset(f1, f2, MFLAG_SIZE)
#define mflag_negate (   f)    flag_negate(f, MFLAG_SIZE)
#define mflag_next (   f,
  flag 
)    flag_next(f, MFLAG_SIZE, flag)
#define mflag_off (   f,
  flag 
)    flag_off(f, MFLAG_SIZE, flag)
#define mflag_on (   f,
  flag 
)    flag_on_dbg(f, MFLAG_SIZE, flag, #f, #flag)
#define mflag_setall (   f)    flag_setall(f, MFLAG_SIZE)
#define MFLAG_SIZE   FLAG_SIZE(MFLAG_MAX)
#define mflag_union (   f1,
  f2 
)    flag_union(f1, f2, MFLAG_SIZE)

Referenced by lore_update(), and update_mon().

#define mflag_wipe (   f)    flag_wipe(f, MFLAG_SIZE)
#define RF (   a,
  b,
 
)    RF_##a,
#define rf_comp_union (   f1,
  f2 
)    flag_comp_union(f1, f2, RF_SIZE)
#define rf_copy (   f1,
  f2 
)    flag_copy(f1, f2, RF_SIZE)

Referenced by monster_flags_known().

#define rf_count (   f)    flag_count(f, RF_SIZE)

Referenced by lore_append_clause().

#define rf_diff (   f1,
  f2 
)    flag_diff(f1, f2, RF_SIZE)
#define rf_has (   f,
  flag 
)    flag_has_dbg(f, RF_SIZE, flag, #f, #flag)

Referenced by add_monster_lights(), become_aware(), cave_generate(), cave_light(), compact_monsters(), count_known_monsters(), delete_monster_idx(), describe_origin(), display_monster(), do_animation(), do_cmd_knowledge_monsters(), do_cmd_query_symbol(), does_resist(), draw_path(), effect_handler_BALL(), effect_handler_BANISH(), effect_handler_BREATH(), effect_handler_DETECT_EVIL(), effect_handler_DETECT_INVISIBLE_MONSTERS(), effect_handler_DETECT_VISIBLE_MONSTERS(), effect_handler_EARTHQUAKE(), effect_handler_MASS_BANISH(), effect_handler_THRUST_AWAY(), find_range(), find_safety(), get_message_type(), get_mon_name(), get_mon_num(), get_moves(), get_moves_flow(), get_subject(), grid_data_as_text(), improve_attack_modifier(), lore_append_abilities(), lore_append_attack(), lore_append_drop(), lore_append_exp(), lore_append_friends(), lore_append_kills(), lore_append_movement(), lore_append_spells(), lore_append_toughness(), lore_description(), lore_monster_sex(), lore_title(), make_attack_normal(), make_attack_spell(), mon_create_drop(), mon_create_drop_count(), mon_pit_hook(), mon_restrict(), mon_select(), mon_summary(), mon_take_hit(), monster_death(), monster_desc(), monster_is_unusual(), monster_list_entry_line_color(), monster_swap(), object_origin_combine(), place_friends(), place_monster(), place_monster_base_okay(), place_new_monster_one(), player_init(), poly_race(), process_monster(), process_monster_can_move(), process_monster_grab_objects(), process_monster_multiply(), process_monster_should_stagger(), process_monster_try_push(), process_player_cleanup(), project_m_apply_side_effects(), project_m_monster_attack(), project_monster_dispel(), project_monster_handler_LIGHT(), project_monster_handler_NETHER(), project_monster_hurt_immune(), project_monster_hurt_only(), project_monster_resist_element(), project_monster_resist_other(), project_monster_scare(), project_monster_teleport_away(), quest_check(), rd_monster_memory(), react_to_specific_slay(), regen_monster(), remove_bad_spells(), saving_throw(), spoil_mon_desc(), spoil_mon_info(), summon_specific_okay(), target_set_interactive_aux(), unset_spells(), update_mon(), and update_smart_learn().

#define rf_inter (   f1,
  f2 
)    flag_inter(f1, f2, RF_SIZE)
#define rf_is_empty (   f)    flag_is_empty(f, RF_SIZE)

Referenced by lore_append_abilities().

#define rf_is_equal (   f1,
  f2 
)    flag_is_equal(f1, f2, RF_SIZE)
#define rf_is_full (   f)    flag_is_full(f, RF_SIZE)
#define rf_is_inter (   f1,
  f2 
)    flag_is_inter(f1, f2, RF_SIZE)

Referenced by mon_pit_hook().

#define rf_is_subset (   f1,
  f2 
)    flag_is_subset(f1, f2, RF_SIZE)

Referenced by mon_pit_hook().

#define rf_negate (   f)    flag_negate(f, RF_SIZE)
#define rf_next (   f,
  flag 
)    flag_next(f, RF_SIZE, flag)
#define rf_off (   f,
  flag 
)    flag_off(f, RF_SIZE, flag)

Referenced by lore_append_abilities().

#define rf_on (   f,
  flag 
)    flag_on_dbg(f, RF_SIZE, flag, #f, #flag)
#define rf_setall (   f)    flag_setall(f, RF_SIZE)
#define RF_SIZE   FLAG_SIZE(RF_MAX)
#define rf_union (   f1,
  f2 
)    flag_union(f1, f2, RF_SIZE)
#define rf_wipe (   f)    flag_wipe(f, RF_SIZE)
#define RSF (   a,
 
)    RSF_##a,
#define RSF_SIZE   FLAG_SIZE(RSF_MAX)

Enumeration Type Documentation

anonymous enum

Special Monster Flags (all temporary)

Enumerator
MFLAG_MAX 
anonymous enum

Monster property and ability flags (race flags)

Enumerator
RF_MAX 
anonymous enum

Monster spell flag indices.

The monster flag types.

Enumerator
RFT_NONE 
RFT_OBV 
RFT_DISP 
RFT_GEN 
RFT_NOTE 
RFT_BEHAV 
RFT_DROP 
RFT_DET 
RFT_ALTER 
RFT_RACE_N 
RFT_RACE_A 
RFT_VULN 
RFT_VULN_I 
RFT_RES 
RFT_PROT 
RFT_MAX 

Variable Documentation

struct monster_spell* monster_spells
s16b num_repro
struct monster_pain* pain_messages
struct monster_race* r_info
struct monster_base* rb_info
const struct monster_race* ref_race