Angband
Macros | Typedefs | Enumerations | Functions
mon-lore.c File Reference

Monster memory code. More...

#include "angband.h"
#include "init.h"
#include "mon-blow-effects.h"
#include "mon-init.h"
#include "mon-lore.h"
#include "mon-make.h"
#include "mon-spell.h"
#include "mon-util.h"
#include "obj-gear.h"
#include "obj-identify.h"
#include "obj-tval.h"
#include "obj-util.h"
#include "player-attack.h"
#include "player-timed.h"
#include "z-textblock.h"
#include "list-mon-race-flags.h"
#include "list-blow-methods.h"
#include "list-blow-effects.h"

Macros

#define RF(a, b, c)   c,
#define LORE_INSERT_FLAG_DESCRIPTION(x)   lore_insert_flag_description((x), known_flags, descs, list_index)
#define LORE_INSERT_UNKNOWN_VULN(x)   lore_insert_unknown_vulnerability((x), known_flags, lore, descs, list_index)
#define LORE_INSERT_SPELL_DESCRIPTION(x)   lore_insert_spell_description((x), race, lore, spell_colors, know_hp, name_list, color_list, damage_list, list_index)
#define LORE_RESET_LISTS()   { list_index = 0; for(i = 0; i < list_size; i++) { damage_list[i] = 0; color_list[i] = COLOUR_WHITE; } }
#define RBM(x, c, s, miss, p, m, a, d)   #x,
#define RBE(x, p, e, d)   #x,

Typedefs

typedef enum monster_sex monster_sex_t

Enumerations

enum  monster_sex { MON_SEX_NEUTER = 0, MON_SEX_MALE, MON_SEX_FEMALE, MON_SEX_MAX }
 Monster genders. More...

Functions

void get_attack_colors (int melee_colors[RBE_MAX], int spell_colors[RSF_MAX])
 Initializes the color-coding of monster attacks / spells.
void lore_update (const monster_race *race, monster_lore *lore)
 Update which bits of lore are known.
void cheat_monster_lore (const monster_race *r_ptr, monster_lore *l_ptr)
 Learn everything about a monster.
void wipe_monster_lore (const monster_race *r_ptr, monster_lore *l_ptr)
 Forget everything about a monster.
void lore_do_probe (struct monster *m)
 Learn about a monster (by "probing" it)
void lore_treasure (struct monster *m_ptr, int num_item, int num_gold)
 Take note that the given monster just dropped some treasure.
void monster_flags_known (const monster_race *r_ptr, const monster_lore *l_ptr, bitflag flags[RF_SIZE])
 Copies into flags the flags of the given monster race that are known to the given lore structure (usually the player's knowledge).
static const char * lore_describe_blow_method (int method)
 Return a description for the given monster blow method flags.
static const char * lore_describe_blow_effect (int effect)
 Return a description for the given monster blow effect flags.
static const char * lore_describe_awareness (s16b awareness)
 Return a description for the given monster race awareness value.
static const char * lore_describe_speed (byte speed)
 Return a description for the given monster race speed value.
static monster_sex_t lore_monster_sex (const monster_race *race)
 Return a value describing the sex of the provided monster race.
static const char * lore_pronoun_nominative (monster_sex_t sex, bool title_case)
 Return a pronoun for a monster; used as the subject of a sentence.
static const char * lore_pronoun_possessive (monster_sex_t sex, bool title_case)
 Return a possessive pronoun for a monster.
static int lore_insert_flag_description (int flag, const bitflag known_flags[RF_SIZE], const char *list[], int index)
 Insert into a list the description for a given flag, if it is set.
static int lore_insert_unknown_vulnerability (int flag, const bitflag known_flags[RF_SIZE], const monster_lore *lore, const char *list[], int index)
 Insert into a list the description for a given flag, if a flag is not known to the player as a vulnerability.
static int lore_insert_spell_description (int spell, const monster_race *race, const monster_lore *lore, const int spell_colors[RSF_MAX], bool know_hp, const char *name_list[], int color_list[], int damage_list[], int index)
 Insert into a list the description for a spell if it is known to the player.
static void lore_append_list (textblock *tb, const char *list[], int count, byte attr, const char *conjunction)
 Append a list of items to a textblock, with each item using the provided attribute.
static void lore_append_spell_descriptions (textblock *tb, const char *name_list[], int color_list[], int damage_list[], int count, const char *conjunction)
 Append a list of spell descriptions.
void lore_append_kills (textblock *tb, const monster_race *race, const monster_lore *lore, const bitflag known_flags[RF_SIZE])
 Append the kill history to a texblock for a given monster race.
void lore_append_flavor (textblock *tb, const monster_race *race, bool append_utf8)
 Append the monster race description to a textblock.
void lore_append_movement (textblock *tb, const monster_race *race, const monster_lore *lore, bitflag known_flags[RF_SIZE])
 Append the monster type, location, and movement patterns to a textblock.
void lore_append_toughness (textblock *tb, const monster_race *race, const monster_lore *lore, bitflag known_flags[RF_SIZE])
 Append the monster AC, HP, and hit chance to a textblock.
void lore_append_exp (textblock *tb, const monster_race *race, const monster_lore *lore, bitflag known_flags[RF_SIZE])
 Append the experience value description to a textblock.
void lore_append_drop (textblock *tb, const monster_race *race, const monster_lore *lore, bitflag known_flags[RF_SIZE])
 Append the monster drop description to a textblock.
void lore_append_abilities (textblock *tb, const monster_race *race, const monster_lore *lore, bitflag known_flags[RF_SIZE])
 Append the monster abilities (resists, weaknesses, other traits) to a textblock.
void lore_append_awareness (textblock *tb, const monster_race *race, const monster_lore *lore, bitflag known_flags[RF_SIZE])
 Append how the monster reacts to intruders and at what distance it does so.
void lore_append_friends (textblock *tb, const monster_race *race, const monster_lore *lore, bitflag known_flags[RF_SIZE])
 Append information about what other races the monster appears with and if they work together.
void lore_append_spells (textblock *tb, const monster_race *race, const monster_lore *lore, bitflag known_flags[RF_SIZE], const int spell_colors[RSF_MAX])
 Append the monster's attack spells to a textblock.
void lore_append_attack (textblock *tb, const monster_race *race, const monster_lore *lore, bitflag known_flags[RF_SIZE], const int melee_colors[RBE_MAX])
 Append the monster's melee attacks to a textblock.
monster_loreget_lore (const monster_race *race)
 Get the lore record for this monster race.
bool lore_save (const char *name)
 Save the lore to a file in the user directory.

Detailed Description

Monster memory code.

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

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 LORE_INSERT_FLAG_DESCRIPTION (   x)    lore_insert_flag_description((x), known_flags, descs, list_index)

Referenced by lore_append_abilities().

#define LORE_INSERT_SPELL_DESCRIPTION (   x)    lore_insert_spell_description((x), race, lore, spell_colors, know_hp, name_list, color_list, damage_list, list_index)

Referenced by lore_append_spells().

#define LORE_INSERT_UNKNOWN_VULN (   x)    lore_insert_unknown_vulnerability((x), known_flags, lore, descs, list_index)

Referenced by lore_append_abilities().

#define LORE_RESET_LISTS ( )    { list_index = 0; for(i = 0; i < list_size; i++) { damage_list[i] = 0; color_list[i] = COLOUR_WHITE; } }

Referenced by lore_append_spells().

#define RBE (   x,
  p,
  e,
 
)    #x,
#define RBM (   x,
  c,
  s,
  miss,
  p,
  m,
  a,
 
)    #x,
#define RF (   a,
  b,
 
)    c,

Typedef Documentation

typedef enum monster_sex monster_sex_t

Enumeration Type Documentation

Monster genders.

Enumerator:
MON_SEX_NEUTER 
MON_SEX_MALE 
MON_SEX_FEMALE 
MON_SEX_MAX 

Function Documentation

void cheat_monster_lore ( const monster_race r_ptr,
monster_lore l_ptr 
)

Learn everything about a monster.

Sets the all_known variable, all flags and all relevant spell flags.

References monster_lore::all_known, monster_lore::flags, lore_update(), rf_setall, rsf_copy, monster_lore::spell_flags, monster_race::spell_flags, and TRUE.

Referenced by get_debug_command(), and lore_description().

void get_attack_colors ( int  melee_colors[RBE_MAX],
int  spell_colors[RSF_MAX] 
)

Initializes the color-coding of monster attacks / spells.

This function assigns a color to each monster melee attack type and each monster spell, depending on how dangerous the attack is to the player given current gear and state. Attacks may be colored green (least dangerous), yellow, orange, or red (most dangerous). The colors are stored in melee_colors and spell_colors, which the calling function then uses when printing the monster recall.

TODO: Is it possible to simplify this using the new monster spell refactor? We should be able to loop over all spell effects and check for resistance in a nicer way.

References adj_dex_safe, object::artifact, player::au, player::body, COLOUR_L_GREEN, COLOUR_L_RED, COLOUR_ORANGE, COLOUR_YELLOW, player_state::el_info, player_state::flags, player::gear, i, player::known_state, player::lev, object::next, object_flags_known(), object_is_equipped(), object_is_known(), of_has, OF_SIZE, object::pval, element_info::res_level, SKILL_SAVE, player_state::skills, player_state::stat_ind, player::timed, object::timeout, object::to_a, object::to_d, object::to_h, tval_can_have_charges(), tval_is_food(), and tval_is_light().

Referenced by lore_description().

monster_lore* get_lore ( const monster_race race)
void lore_append_abilities ( textblock tb,
const monster_race race,
const monster_lore lore,
bitflag  known_flags[RF_SIZE] 
)

Append the monster abilities (resists, weaknesses, other traits) to a textblock.

Known race flags are passed in for simplicity/efficiency. Note the macros that are used to simplify the code.

Parameters
tbis the textblock we are adding to.
raceis the monster race we are describing.
loreis the known information about the monster race.
known_flagsis the preprocessed bitfield of race flags known to the player.

References COLOUR_L_UMBER, COLOUR_ORANGE, COLOUR_VIOLET, COLOUR_WHITE, FALSE, monster_lore::flags, lore_append_list(), LORE_INSERT_FLAG_DESCRIPTION, LORE_INSERT_UNKNOWN_VULN, lore_monster_sex(), lore_pronoun_nominative(), lore_pronoun_possessive(), MON_SEX_NEUTER, prev, rf_has, textblock_append(), textblock_append_c(), and TRUE.

Referenced by lore_description().

void lore_append_attack ( textblock tb,
const monster_race race,
const monster_lore lore,
bitflag  known_flags[RF_SIZE],
const int  melee_colors[RBE_MAX] 
)

Append the monster's melee attacks to a textblock.

Known race flags are passed in for simplicity/efficiency.

Parameters
tbis the textblock we are adding to.
raceis the monster race we are describing.
loreis the known information about the monster race.
known_flagsis the preprocessed bitfield of race flags known to the player.
melee_colorsis a list of colors that is associated with each RBE_ effect.

References random::base, monster_race::blow, monster_lore::blow_known, COLOUR_L_GREEN, random::dice, monster_blow::dice, monster_blow::effect, FALSE, i, lore_describe_blow_effect(), lore_describe_blow_method(), lore_monster_sex(), lore_pronoun_nominative(), lore_pronoun_possessive(), random::m_bonus, monster_blow::method, angband_constants::mon_blows_max, MON_SEX_NEUTER, rf_has, random::sides, textblock_append(), textblock_append_c(), TRUE, and z_info.

Referenced by lore_description().

void lore_append_awareness ( textblock tb,
const monster_race race,
const monster_lore lore,
bitflag  known_flags[RF_SIZE] 
)

Append how the monster reacts to intruders and at what distance it does so.

Parameters
tbis the textblock we are adding to.
raceis the monster race we are describing.
loreis the known information about the monster race.
known_flagsis the preprocessed bitfield of race flags known to the player.

References monster_race::aaf, COLOUR_L_BLUE, FALSE, lore_describe_awareness(), lore_monster_sex(), lore_pronoun_nominative(), MON_SEX_NEUTER, monster_race::sleep, monster_lore::sleep_known, textblock_append(), textblock_append_c(), and TRUE.

Referenced by lore_description().

void lore_append_drop ( textblock tb,
const monster_race race,
const monster_lore lore,
bitflag  known_flags[RF_SIZE] 
)

Append the monster drop description to a textblock.

Known race flags are passed in for simplicity/efficiency.

Parameters
tbis the textblock we are adding to.
raceis the monster race we are describing.
loreis the known information about the monster race.
known_flagsis the preprocessed bitfield of race flags known to the player.

References COLOUR_BLUE, monster_lore::drop_known, format(), lore_monster_sex(), lore_pronoun_nominative(), mon_create_drop_count(), MON_SEX_NEUTER, PLURAL, rf_has, textblock_append(), textblock_append_c(), and TRUE.

Referenced by lore_description().

void lore_append_exp ( textblock tb,
const monster_race race,
const monster_lore lore,
bitflag  known_flags[RF_SIZE] 
)

Append the experience value description to a textblock.

Known race flags are passed in for simplicity/efficiency.

Parameters
tbis the textblock we are adding to.
raceis the monster race we are describing.
loreis the known information about the monster race.
known_flagsis the preprocessed bitfield of race flags known to the player.

References buf, COLOUR_BLUE, format(), player::lev, monster_race::level, level, monster_race::mexp, my_strcat(), PLURAL, rf_has, strnfmt(), textblock_append(), and textblock_append_c().

Referenced by lore_description().

void lore_append_flavor ( textblock tb,
const monster_race race,
bool  append_utf8 
)

Append the monster race description to a textblock.

Parameters
tbis the textblock we are adding to.
raceis the monster race we are describing.
append_utf8indicates if we should append the flavor text as UTF-8 (which is preferred for spoiler files).

References monster_race::text, textblock_append(), and textblock_append_utf8().

Referenced by lore_description().

void lore_append_friends ( textblock tb,
const monster_race race,
const monster_lore lore,
bitflag  known_flags[RF_SIZE] 
)

Append information about what other races the monster appears with and if they work together.

Parameters
tbis the textblock we are adding to.
raceis the monster race we are describing.
loreis the known information about the monster race.
known_flagsis the preprocessed bitfield of race flags known to the player.

References monster_race::friends, monster_race::friends_base, lore_monster_sex(), lore_pronoun_nominative(), MON_SEX_NEUTER, rf_has, textblock_append(), and TRUE.

Referenced by lore_description().

void lore_append_kills ( textblock tb,
const monster_race race,
const monster_lore lore,
const bitflag  known_flags[RF_SIZE] 
)

Append the kill history to a texblock for a given monster race.

Known race flags are passed in for simplicity/efficiency.

Parameters
tbis the textblock we are adding to.
raceis the monster race we are describing.
loreis the known information about the monster race.
known_flagsis the preprocessed bitfield of race flags known to the player.

References COLOUR_RED, monster_lore::deaths, FALSE, lore_monster_sex(), lore_pronoun_nominative(), monster_race::max_num, MON_SEX_NEUTER, monster_lore::pkills, rf_has, textblock_append(), textblock_append_c(), monster_lore::tkills, TRUE, and VERB_AGREEMENT.

Referenced by lore_description().

static void lore_append_list ( textblock tb,
const char *  list[],
int  count,
byte  attr,
const char *  conjunction 
)
static

Append a list of items to a textblock, with each item using the provided attribute.

The text that joins the list is drawn using the default attributes. The list uses a serial comma ("a, b, c, and d").

Parameters
tbis the textblock we are adding to.
listis a list of strings that should be joined and appended; drawn with the attribute in attribute.
countis the number of items in list.
attris the attribute each list item will be drawn with.
conjunctionis a string that is added before the last item.

References i, textblock_append(), and textblock_append_c().

Referenced by lore_append_abilities().

void lore_append_movement ( textblock tb,
const monster_race race,
const monster_lore lore,
bitflag  known_flags[RF_SIZE] 
)

Append the monster type, location, and movement patterns to a textblock.

Known race flags are passed in for simplicity/efficiency.

Parameters
tbis the textblock we are adding to.
raceis the monster race we are describing.
loreis the known information about the monster race.
known_flagsis the preprocessed bitfield of race flags known to the player.

References COLOUR_GREEN, COLOUR_L_BLUE, COLOUR_L_GREEN, COLOUR_RED, FLAG_END, monster_race::flags, flags_test(), monster_race::level, lore_describe_speed(), player::max_depth, rf_has, monster_race::speed, textblock_append(), and textblock_append_c().

Referenced by lore_description().

static void lore_append_spell_descriptions ( textblock tb,
const char *  name_list[],
int  color_list[],
int  damage_list[],
int  count,
const char *  conjunction 
)
static

Append a list of spell descriptions.

This is a modified version of lore_append_list() to format spells, without have to do a lot of allocating and freeing of formatted strings.

Parameters
tbis the textblock we are adding to.
name_listis a list of base spell description.
color_listis the list of attributes which the description should be drawn with.
damage_listis a value that should be appended to the base spell description (if it is greater than zero).
countis the number of items in the lists.
conjunctionis a string that is added before the last item.

References i, textblock_append(), and textblock_append_c().

Referenced by lore_append_spells().

void lore_append_spells ( textblock tb,
const monster_race race,
const monster_lore lore,
bitflag  known_flags[RF_SIZE],
const int  spell_colors[RSF_MAX] 
)

Append the monster's attack spells to a textblock.

Known race flags are passed in for simplicity/efficiency. Note the macros that are used to simplify the code.

Parameters
tbis the textblock we are adding to.
raceis the monster race we are describing.
loreis the known information about the monster race.
known_flagsis the preprocessed bitfield of race flags known to the player.
spell_colorsis a list of colors that is associated with each RSF_ spell.

References monster_lore::armour_known, breath, monster_lore::cast_innate, monster_lore::cast_spell, COLOUR_L_GREEN, COLOUR_L_RED, FALSE, monster_race::freq_innate, monster_race::freq_spell, i, lore_append_spell_descriptions(), LORE_INSERT_SPELL_DESCRIPTION, lore_monster_sex(), lore_pronoun_nominative(), LORE_RESET_LISTS, MON_SEX_NEUTER, rf_has, monster_lore::spell_freq_known, textblock_append(), textblock_append_c(), and TRUE.

Referenced by lore_description().

void lore_append_toughness ( textblock tb,
const monster_race race,
const monster_lore lore,
bitflag  known_flags[RF_SIZE] 
)

Append the monster AC, HP, and hit chance to a textblock.

Known race flags are passed in for simplicity/efficiency.

Parameters
tbis the textblock we are adding to.
raceis the monster race we are describing.
loreis the known information about the monster race.
known_flagsis the preprocessed bitfield of race flags known to the player.

References monster_race::ac, monster_lore::armour_known, monster_race::avg_hp, COLOUR_L_BLUE, equipped_item_by_slot_name(), lore_monster_sex(), lore_pronoun_nominative(), MON_SEX_NEUTER, py_attack_hit_chance(), rf_has, textblock_append(), textblock_append_c(), and TRUE.

Referenced by lore_description().

static const char* lore_describe_awareness ( s16b  awareness)
static

Return a description for the given monster race awareness value.

Descriptions are in a table within the function. Returns a sensible string for values not in the table.

Parameters
awarenessis the inactivity counter of the race (monster_race.sleep).

References MAX_SHORT.

Referenced by lore_append_awareness().

static const char* lore_describe_blow_effect ( int  effect)
static

Return a description for the given monster blow effect flags.

References monster_blow_effect_description().

Referenced by lore_append_attack().

static const char* lore_describe_blow_method ( int  method)
static

Return a description for the given monster blow method flags.

References monster_blow_method_description().

Referenced by lore_append_attack().

static const char* lore_describe_speed ( byte  speed)
static

Return a description for the given monster race speed value.

Descriptions are in a table within the function. Returns a sensible string for values not in the table.

Parameters
speedis the speed rating of the race (monster_race.speed).

References MAX_UCHAR.

Referenced by lore_append_movement().

void lore_do_probe ( struct monster m)
static int lore_insert_flag_description ( int  flag,
const bitflag  known_flags[RF_SIZE],
const char *  list[],
int  index 
)
static

Insert into a list the description for a given flag, if it is set.

Return the next index available for insertion.

The function returns an incremented index if it inserted something; otherwise, it returns the same index (which is used for the next insertion attempt).

Parameters
flagis the RF_ flag to check for in known_flags.
known_flagsis the preprocessed set of flags for the lore/race.
listis the list in which the description will be inserted.
indexis where in list the description will be inserted.

References rf_has.

static int lore_insert_spell_description ( int  spell,
const monster_race race,
const monster_lore lore,
const int  spell_colors[RSF_MAX],
bool  know_hp,
const char *  name_list[],
int  color_list[],
int  damage_list[],
int  index 
)
static

Insert into a list the description for a spell if it is known to the player.

Return the next index available for insertion.

The function returns an incremented index if it inserted something; otherwise, it returns the same index (which is used for the next insertion attempt).

Parameters
spellis the RSF_ flag to describe.
raceis the monster race of the spell.
loreis the player's current knowledge about the monster.
spell_colorsis where the color for spell will be chosen from.
know_hpindicates whether or know the player has determined the monster's AC/HP.
name_listis the list in which the description will be inserted.
color_listis the list in which the selected color will be inserted.
damage_listis the list in which the max spell damage will be inserted
indexis where in name_list, color_list, and damage_list the description will be inserted.

References mon_spell_lore_damage(), mon_spell_lore_description(), rsf_has, and monster_lore::spell_flags.

static int lore_insert_unknown_vulnerability ( int  flag,
const bitflag  known_flags[RF_SIZE],
const monster_lore lore,
const char *  list[],
int  index 
)
static

Insert into a list the description for a given flag, if a flag is not known to the player as a vulnerability.

Return the next index available for insertion.

The function returns an incremented index if it inserted something; otherwise, it returns the same index (which is used for the next insertion attempt).

Parameters
flagis the RF_ flag to check for in known_flags.
known_flagsis the preprocessed set of flags for the lore/race.
loreis the base knowledge about the monster.
listis the list in which the description will be inserted.
indexis where in list the description will be inserted.

References monster_lore::flags, and rf_has.

static monster_sex_t lore_monster_sex ( const monster_race race)
static
static const char* lore_pronoun_nominative ( monster_sex_t  sex,
bool  title_case 
)
static

Return a pronoun for a monster; used as the subject of a sentence.

Descriptions are in a table within the function. Table must match monster_sex_t values.

Parameters
sexis the gender value (as provided by lore_monster_sex().
title_caseindicates whether the initial letter should be capitalized; TRUE is capitalized, FALSE is not.

References MON_SEX_MAX, and MON_SEX_NEUTER.

Referenced by lore_append_abilities(), lore_append_attack(), lore_append_awareness(), lore_append_drop(), lore_append_friends(), lore_append_kills(), lore_append_spells(), and lore_append_toughness().

static const char* lore_pronoun_possessive ( monster_sex_t  sex,
bool  title_case 
)
static

Return a possessive pronoun for a monster.

Descriptions are in a table within the function. Table must match monster_sex_t values.

Parameters
sexis the gender value (as provided by lore_monster_sex().
title_caseindicates whether the initial letter should be capitalized; TRUE is capitalized, FALSE is not.

References MON_SEX_MAX, and MON_SEX_NEUTER.

Referenced by lore_append_abilities(), and lore_append_attack().

bool lore_save ( const char *  name)

Save the lore to a file in the user directory.

Parameters
nameis the filename
Returns
TRUE on success, FALSE otherwise.

References ANGBAND_DIR_USER, FALSE, msg, path, path_build(), text_lines_to_file(), and TRUE.

Referenced by close_game().

void lore_treasure ( struct monster m_ptr,
int  num_item,
int  num_gold 
)

Take note that the given monster just dropped some treasure.

Note that learning the "GOOD"/"GREAT" flags gives information about the treasure (even when the monster is killed for the first time, such as uniques, and the treasure has not been examined yet).

This "indirect" method is used to prevent the player from learning exactly how much treasure a monster can drop from observing only a single example of a drop. This method actually observes how much gold and items are dropped, and remembers that information to be described later by the monster recall code.

References monster_lore::drop_gold, monster_lore::drop_item, monster_lore::flags, get_lore(), player_upkeep::monster_race, PR_MONSTER, monster::race, player_upkeep::redraw, rf_on, and player::upkeep.

Referenced by monster_death().

void lore_update ( const monster_race race,
monster_lore lore 
)
void monster_flags_known ( const monster_race r_ptr,
const monster_lore l_ptr,
bitflag  flags[RF_SIZE] 
)

Copies into flags the flags of the given monster race that are known to the given lore structure (usually the player's knowledge).

Known flags will be 1 for present, or 0 for not present. Unknown flags will always be 0.

References monster_lore::flags, monster_race::flags, flags, rf_copy, and rf_inter.

Referenced by lore_description().

void wipe_monster_lore ( const monster_race r_ptr,
monster_lore l_ptr 
)