00001
00002
00003
00004
00005
00006
00007
00008 #ifndef ITEMPROP_H
00009 #define ITEMPROP_H
00010
00011 #include "itemprop-enum.h"
00012
00013 struct bolt;
00014
00015 void init_properties(void);
00016
00017
00018 bool item_known_cursed(const item_def &item);
00019 bool item_known_uncursed(const item_def &item);
00020 void do_curse_item(item_def &item, bool quiet = true);
00021 void do_uncurse_item(item_def &item, bool inscribe = true, bool no_ash = false);
00022
00023
00024 void set_item_stationary(item_def &item);
00025 void remove_item_stationary(item_def &item);
00026 bool item_is_stationary(const item_def &item);
00027
00028
00029 bool item_ident(const item_def &item, iflags_t flags);
00030 void set_ident_flags(item_def &item, iflags_t flags);
00031 void unset_ident_flags(item_def &item, iflags_t flags);
00032 bool fully_identified(const item_def &item);
00033 iflags_t full_ident_mask(const item_def& item);
00034
00035
00036 void set_equip_race(item_def &item, iflags_t flags);
00037 void set_equip_desc(item_def &item, iflags_t flags);
00038 iflags_t get_equip_race(const item_def &item);
00039 iflags_t get_equip_desc(const item_def &item);
00040
00041
00042 void set_helmet_desc(item_def &item, short flags);
00043 void set_helmet_random_desc(item_def &item);
00044 short get_helmet_desc(const item_def &item);
00045
00046 bool is_helmet(const item_def& item);
00047 bool is_hard_helmet(const item_def& item);
00048
00049 short get_gloves_desc(const item_def &item);
00050 void set_gloves_random_desc(item_def &item);
00051
00052
00053 bool set_item_ego_type(item_def &item, int item_type, int ego_type);
00054 int get_weapon_brand(const item_def &item);
00055 special_armour_type get_armour_ego_type(const item_def &item);
00056 bool missile_brand_obvious(special_missile_type brand);
00057 special_missile_type get_ammo_brand(const item_def &item);
00058
00059
00060 int armour_max_enchant(const item_def &item);
00061 bool armour_is_hide(const item_def &item, bool inc_made = false);
00062
00063 equipment_type get_armour_slot(const item_def &item);
00064 equipment_type get_armour_slot(armour_type arm);
00065
00066 bool jewellery_is_amulet(const item_def &item);
00067 bool jewellery_is_amulet(int sub_type);
00068
00069 bool hide2armour(item_def &item);
00070
00071 bool base_armour_is_light(const item_def &item);
00072 int fit_armour_size(const item_def &item, size_type size);
00073 bool check_armour_size(const item_def &item, size_type size);
00074
00075 bool item_is_rechargeable(const item_def &it, bool hide_charged = false,
00076 bool weapons = false);
00077 int wand_charge_value(int type);
00078 int wand_max_charges(int type);
00079 bool is_enchantable_weapon(const item_def &wpn, bool uncurse,
00080 bool first = true);
00081 bool is_enchantable_armour(const item_def &arm, bool uncurse,
00082 bool unknown = false);
00083
00084 bool is_shield(const item_def &item);
00085 bool is_shield_incompatible(const item_def &weapon,
00086 const item_def *shield = NULL);
00087 bool shield_reflects(const item_def &shield);
00088 void ident_reflector(item_def *item);
00089
00090
00091
00092 int weapon_rarity(int w_type);
00093
00094 int cmp_weapon_size(const item_def &item, size_type size);
00095 int fit_weapon_wieldable_size(const item_def &item, size_type size);
00096 bool check_weapon_wieldable_size(const item_def &item, size_type size);
00097
00098 int fit_item_throwable_size(const item_def &item, size_type size);
00099
00100 int weapon_ev_bonus(const item_def &wpn, int skill, size_type body, int dex,
00101 bool hide_hidden = false);
00102
00103 hands_reqd_type hands_reqd(const item_def &item, size_type size);
00104 hands_reqd_type hands_reqd(object_class_type base_type, int sub_type,
00105 size_type size);
00106
00107 bool is_demonic(const item_def &item);
00108 bool is_blessed(const item_def &item);
00109 bool is_blessed_convertible(const item_def &item);
00110 bool convert2good(item_def &item, bool allow_blessed = true);
00111 bool convert2bad(item_def &item);
00112
00113 int get_vorpal_type(const item_def &item);
00114 int get_damage_type(const item_def &item);
00115 bool does_damage_type(const item_def &item, int dam_type);
00116 int single_damage_type(const item_def &item);
00117
00118 int weapon_str_weight(const item_def &wpn);
00119 int weapon_dex_weight(const item_def &wpn);
00120
00121 skill_type weapon_skill(const item_def &item);
00122 skill_type weapon_skill(object_class_type wclass, int wtype);
00123
00124 skill_type range_skill(const item_def &item);
00125 skill_type range_skill(object_class_type wclass, int wtype);
00126
00127
00128 bool is_range_weapon(const item_def &item);
00129 bool is_range_weapon_type(weapon_type wtype);
00130 missile_type fires_ammo_type(const item_def &item);
00131 missile_type fires_ammo_type(weapon_type wtype);
00132 const char *ammo_name(missile_type ammo);
00133 const char *ammo_name(const item_def &bow);
00134 bool has_launcher(const item_def &ammo);
00135 bool is_throwable(const actor *actor, const item_def &wpn, bool force = false);
00136 launch_retval is_launched(const actor *actor, const item_def *launcher,
00137 const item_def &missile);
00138
00139
00140 bool item_is_rod(const item_def &item);
00141 bool item_is_staff(const item_def &item);
00142
00143
00144 bool item_is_rune(const item_def &item, rune_type which_rune = NUM_RUNE_TYPES);
00145 bool item_is_unique_rune(const item_def &item);
00146 bool item_is_orb(const item_def &orb);
00147
00148 bool item_is_corpse(const item_def &item);
00149
00150
00151 int ring_has_pluses(const item_def &item);
00152 bool ring_has_stackable_effect(const item_def &item);
00153
00154
00155 bool food_is_meat(const item_def &item);
00156 bool food_is_veg(const item_def &item);
00157 bool is_blood_potion(const item_def &item);
00158 bool is_fizzing_potion (const item_def &item);
00159 int food_value(const item_def &item);
00160 int food_turns(const item_def &item);
00161 bool can_cut_meat(const item_def &item);
00162 bool food_is_rotten(const item_def &item);
00163 int corpse_freshness(const item_def &item);
00164 bool is_fruit(const item_def & item);
00165 uint32_t item_fruit_mask(const item_def &item);
00166
00167
00168 int get_armour_res_fire(const item_def &arm, bool check_artp);
00169 int get_armour_res_cold(const item_def &arm, bool check_artp);
00170 int get_armour_res_poison(const item_def &arm, bool check_artp);
00171 int get_armour_res_elec(const item_def &arm, bool check_artp);
00172 int get_armour_life_protection(const item_def &arm, bool check_artp);
00173 int get_armour_res_magic(const item_def &arm, bool check_artp);
00174 int get_armour_res_sticky_flame(const item_def &arm);
00175 bool get_armour_see_invisible(const item_def &arm, bool check_artp);
00176
00177 int property(const item_def &item, int prop_type);
00178 bool gives_ability(const item_def &item);
00179 bool gives_resistance(const item_def &item);
00180 int item_mass(const item_def &item);
00181 size_type item_size(const item_def &item);
00182 equipment_type get_item_slot(object_class_type type, int sub_type);
00183 equipment_type get_item_slot(const item_def& item);
00184 bool in_shop(const item_def &item);
00185
00186 std::string item_base_name(const item_def &item);
00187 std::string item_base_name (object_class_type type, int sub_type);
00188 std::string food_type_name (const item_def &item);
00189 std::string food_type_name (int sub_type);
00190 const char* weapon_base_name(uint8_t subtype);
00191
00192 void seen_item(const item_def &item);
00193 #endif