Angband
|
definitions and functions for object flags and modifiers More...
#include "z-file.h"
#include "z-bitflag.h"
#include "list-tvals.h"
#include "list-object-flags.h"
#include "list-kind-flags.h"
#include "list-stats.h"
#include "list-object-modifiers.h"
Go to the source code of this file.
Data Structures | |
struct | obj_property |
StructuresMore... | |
Enumerations | |
enum | { TV_MAX } |
ConstantsMore... | |
enum | { OF_NONE } |
The object flags. More... | |
enum | |
The object kind flags. More... | |
enum | { OBJ_MOD_MAX } |
The object modifiers. More... | |
enum | object_flag_type { OFT_NONE = 0, OFT_SUST, OFT_PROT, OFT_MISC, OFT_LIGHT, OFT_MELEE, OFT_BAD, OFT_DIG, OFT_THROW, OFT_MAX } |
The object flag types. More... | |
enum | object_flag_id { OFID_NONE = 0, OFID_NORMAL, OFID_TIMED, OFID_WIELD } |
How object flags are IDd. More... | |
enum | obj_property_type { OBJ_PROPERTY_NONE = 0, OBJ_PROPERTY_STAT, OBJ_PROPERTY_MOD, OBJ_PROPERTY_FLAG, OBJ_PROPERTY_IGNORE, OBJ_PROPERTY_RESIST, OBJ_PROPERTY_VULN, OBJ_PROPERTY_IMM, OBJ_PROPERTY_MAX } |
The object property types. More... | |
Functions | |
struct obj_property * | lookup_obj_property (int type, int index) |
FunctionsMore... | |
void | create_obj_flag_mask (bitflag *f, int 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_property * | obj_properties |
definitions and functions for object flags and modifiers
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.
#define KF | ( | a, | |
b | |||
) | KF_##a, |
#define kf_has | ( | f, | |
flag | |||
) | flag_has_dbg(f, KF_SIZE, flag, #f, #flag) |
Referenced by ammo_damage_power(), calc_bonuses(), collect_artifact_data(), describe_ego(), design_artifact(), display_object(), easy_know(), ego_apply_magic(), get_base_item(), ignore_collect_kind(), kind_is_good(), make_artifact(), make_artifact_special(), mon_create_drop(), obj_desc_combat(), parse_artifact_graphics(), spoil_obj_desc(), test_flags0(), textui_browse_object_knowledge(), wiz_create_item_action(), and wiz_create_item_all_items().
#define kf_is_empty | ( | f | ) | flag_is_empty(f, KF_SIZE) |
#define kf_is_full | ( | f | ) | flag_is_full(f, KF_SIZE) |
#define kf_negate | ( | f | ) | flag_negate(f, KF_SIZE) |
#define kf_on | ( | f, | |
flag | |||
) | flag_on_dbg(f, KF_SIZE, flag, #f, #flag) |
Referenced by write_book_kind(), and write_dummy_object_record().
#define kf_setall | ( | f | ) | flag_setall(f, KF_SIZE) |
#define KF_SIZE FLAG_SIZE(KF_MAX) |
Referenced by parse_ego_flags(), parse_object_base_flags(), and parse_object_flags().
Referenced by finish_parse_object().
#define OBJ_MOD | ( | a | ) | OBJ_MOD_##a, |
#define OBJ_MOD_MIN_STAT OBJ_MOD_STR |
Referenced by add_stat(), and display_player_sust_info().
#define OF | ( | a | ) | OF_##a, |
Referenced by artifact_prep(), object_flags(), object_prep(), player_know_object(), remove_bad_spells(), and shape_learn_on_assume().
#define of_count | ( | f | ) | flag_count(f, OF_SIZE) |
Referenced by ego_apply_magic(), get_known_flags(), and object_flags_known().
#define of_has | ( | f, | |
flag | |||
) | flag_has_dbg(f, OF_SIZE, flag, #f, #flag) |
Referenced by add_curse(), add_flag(), append_object_curse(), apply_curse(), artifact_curse_conflicts(), blow_color(), breakage_chance(), calc_bonuses(), calc_light(), chance_of_missile_hit(), class_help(), count_abilities(), count_bow_abilities(), count_high_resists(), count_nonweapon_abilities(), count_weapon_abilities(), describe_combat(), describe_curses(), describe_misc_magic(), describe_protects(), describe_sustains(), display_player_sust_info(), display_resistance_panel(), do_cmd_refill(), effect_handler_DRAIN_LIGHT(), equip_learn_after_time(), equip_learn_flag(), get_new_attr(), inven_wield(), make_ranged_throw(), o_ranged_damage(), obj_can_refill(), obj_desc_light(), obj_has_flag(), obj_known_light(), object_curses_find_flags(), object_flag_is_known(), object_has_rune(), object_learn_on_wield(), object_prep(), object_value_real(), player_best_digger(), player_can_refuel(), player_inc_check(), player_know_object(), player_knows_rune(), player_of_has(), player_update_light(), prt_binary(), race_help(), ranged_damage(), refill_lamp(), remove_contradictory(), spell_color(), store_carry(), store_will_buy(), test_flags0(), uncurse_object(), unset_spells(), and update_bonuses().
#define of_is_empty | ( | f | ) | flag_is_empty(f, OF_SIZE) |
Referenced by equip_learn_after_time(), and remove_bad_spells().
Referenced by find_inven(), and object_stackable().
#define of_is_full | ( | f | ) | flag_is_full(f, OF_SIZE) |
Referenced by object_non_curse_runes_known(), and player_knows_ego().
#define of_negate | ( | f | ) | flag_negate(f, OF_SIZE) |
Referenced by equip_learn_after_time().
Referenced by artifact_prep(), copy_artifact_data(), remove_contradictory(), and update_smart_learn().
#define of_on | ( | f, | |
flag | |||
) | flag_on_dbg(f, OF_SIZE, flag, #f, #flag) |
#define of_setall | ( | f | ) | flag_setall(f, OF_SIZE) |
#define OF_SIZE FLAG_SIZE(OF_MAX) |
Referenced by add_sustain(), artifact_set_data_free(), calc_bonuses(), count_abilities(), display_player_sust_info(), display_resistance_panel(), ego_apply_magic(), equip_learn_after_time(), equip_learn_flag(), flags_power(), object_curses_find_flags(), object_info_out(), object_learn_on_wield(), parse_artifact_flags(), parse_class_obj_flags(), parse_curse_conflict_flags(), parse_curse_flags(), parse_ego_flags(), parse_ego_flags_off(), parse_object_base_flags(), parse_object_flags(), parse_p_race_obj_flags(), parse_shape_obj_flags(), parse_trap_save_flags(), rd_misc(), rd_object_memory(), remove_bad_spells(), shape_learn_on_assume(), wiz_display_item(), wr_item(), wr_misc(), wr_monster(), and wr_object_memory().
#define STAT | ( | a | ) | OBJ_MOD_##a, |
#define TV | ( | a, | |
b, | |||
c | |||
) | TV_##a, |
anonymous enum |
anonymous enum |
The object kind flags.
enum obj_property_type |
enum object_flag_id |
enum object_flag_type |
Create a "mask" of object flags of a specific type or ID threshold.
f | is the flag array we're filling |
id | is 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(), and shape_learn_on_assume().
Print a message when an object flag is identified by use.
flag | is the flag being noticed |
name | is 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 | ||
) |
References i, obj_property::index, OBJ_PROPERTY_MOD, OBJ_PROPERTY_STAT, angband_constants::property_max, obj_property::type, and z_info.
Referenced by add_flag(), add_mod(), desc_stat(), describe_effect(), describe_misc_magic(), describe_protects(), describe_stats(), describe_sustains(), flag_message(), flags_power(), init_rune(), modifier_power(), and player_outfit().
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().
struct obj_property* obj_properties |
Referenced by cleanup_object_property(), and finish_parse_object_property().