Angband
Functions | Variables
obj-properties.c File Reference

functions to deal with object properties More...

#include "angband.h"
#include "init.h"
#include "object.h"

Functions

struct obj_propertylookup_obj_property (int type, int index)
 

Functions

More...
 
void create_obj_flag_mask (bitflag *f, bool id,...)
 Create a "mask" of object flags of a specific type or ID threshold. More...
 
void flag_message (int flag, char *name)
 Print a message when an object flag is identified by use. More...
 
int sustain_flag (int stat)
 Return the sustain flag of a given stat. More...
 

Variables

struct obj_propertyobj_properties
 

Detailed Description

functions to deal with object properties

Copyright (c) 2014 Chris Carr, 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

void create_obj_flag_mask ( bitflag f,
bool  id,
  ... 
)

Create a "mask" of object flags of a specific type or ID threshold.

Parameters
fis the flag array we're filling
idis whether we're masking by ID level
...is the list of flags or ID types we're looking for

N.B. OFT_MAX must be the last item in the ... list

References args, i, obj_property::id_type, obj_property::index, OBJ_PROPERTY_FLAG, of_on, of_wipe, OFT_MAX, angband_constants::property_max, obj_property::subtype, obj_property::type, and z_info.

Referenced by ego_apply_magic(), equip_learn_after_time(), object_learn_on_wield(), object_power_calculation_ALL_MISC(), object_power_calculation_ALL_PROTECTS(), object_power_calculation_ALL_SUSTAINS(), object_power_calculation_NUM_MISC(), object_power_calculation_NUM_PROTECTS(), and object_power_calculation_NUM_SUSTAINS().

void flag_message ( int  flag,
char *  name 
)

Print a message when an object flag is identified by use.

Parameters
flagis the flag being noticed
nameis the object name

References buf, lookup_obj_property(), msg, obj_property::msg, obj_property::next, OBJ_PROPERTY_FLAG, strnfcat(), and tag.

Referenced by equip_learn_after_time(), equip_learn_flag(), object_curses_find_flags(), and object_learn_on_wield().

struct obj_property* lookup_obj_property ( int  type,
int  index 
)
int sustain_flag ( int  stat)

Return the sustain flag of a given stat.

References STAT_MAX.

Referenced by describe_sustains(), display_player_sust_info(), effect_handler_DRAIN_STAT(), and object_learn_on_wield().

Variable Documentation

struct obj_property* obj_properties