00001
00002
00003
00004
00005
00006
00007 #ifndef MAKEITEM_H
00008 #define MAKEITEM_H
00009
00010 #include "decks.h"
00011 #include "itemprop-enum.h"
00012
00013 enum item_make_species_type
00014 {
00015 MAKE_ITEM_ELVEN = 1,
00016 MAKE_ITEM_DWARVEN = 2,
00017 MAKE_ITEM_ORCISH = 3,
00018
00019 MAKE_ITEM_NO_RACE = 100,
00020 MAKE_ITEM_RANDOM_RACE = 250,
00021 };
00022
00023 int create_item_named(std::string name, coord_def pos,
00024 std::string *error);
00025
00026 int items(int allow_uniques, object_class_type force_class, int force_type,
00027 bool dont_place, int item_level, int item_race,
00028 uint32_t mapmask = 0, int force_ego = 0, int agent = -1);
00029
00030 void item_colour(item_def &item);
00031 void init_rod_mp(item_def &item, int ncharges = -1, int item_level = -1);
00032
00033 jewellery_type get_random_ring_type();
00034 jewellery_type get_random_amulet_type();
00035 armour_type get_random_body_armour_type(int level);
00036 armour_type get_random_armour_type(int item_level);
00037 void item_set_appearance(item_def &item);
00038
00039 bool is_weapon_brand_ok(int type, int brand, bool strict);
00040 bool is_armour_brand_ok(int type, int brand, bool strict);
00041 bool is_missile_brand_ok(int type, int brand, bool strict);
00042
00043 bool got_curare_roll(const int item_level);
00044 void reroll_brand(item_def &item, int item_level);
00045
00046 deck_rarity_type random_deck_rarity();
00047
00048 #if defined(DEBUG_DIAGNOSTICS) || defined(DEBUG_TESTS)
00049 void makeitem_tests();
00050 #endif
00051 #endif