OSDN Git Service

[Refactor] #3677 object_known() をItemEntity のオブジェクトメソッドに繰り込んだ
[hengbandforosx/hengbandosx.git] / src / object / tval-types.h
1 /*
2  * The values for the "tval" field of various objects.
3  *
4  * This value is the primary means by which items are sorted in the
5  * player inventory_list, followed by "sval" and "cost".
6  *
7  * Note that a "BOW" with tval = 19 and sval S = 10*N+P takes a missile
8  * weapon with tval = 16+N, and does (xP) damage when so combined.  This
9  * fact is not actually used in the source, but it kind of interesting.
10  *
11  * Note that as of 2.7.8, the "item flags" apply to all items, though
12  * only armor and weapons and a few other items use any of these flags.
13  */
14
15 #pragma once
16
17 #include "util/enum-range.h"
18
19 enum class ItemKindType : short {
20     NONE = 0,
21     SKELETON = 1, /* Skeletons ('s'), not specified */
22     BOTTLE = 2, /* Empty bottles ('!') */
23     JUNK = 3, /* Sticks, Pottery, etc ('~') */
24     WHISTLE = 4, /* Whistle ('~') */
25     SPIKE = 5, /* Spikes ('~') */
26     CHEST = 7, /* Chests ('&') */
27     FIGURINE = 8, /* Magical figurines */
28     STATUE = 9, /* Statue, what a silly object... */
29     CORPSE = 10, /* Corpses and Skeletons, specific */
30     CAPTURE = 11, /* Monster ball */
31     NO_AMMO = 15, /* Ammo for crimson */
32     SHOT = 16, /* Ammo for slings */
33     ARROW = 17, /* Ammo for bows */
34     BOLT = 18, /* Ammo for x-bows */
35     BOW = 19, /* Slings/Bows/Xbows */
36     DIGGING = 20, /* Shovels/Picks */
37     HAFTED = 21, /* Priest Weapons */
38     POLEARM = 22, /* Axes and Pikes */
39     SWORD = 23, /* Edged Weapons */
40     BOOTS = 30, /* Boots */
41     GLOVES = 31, /* Gloves */
42     HELM = 32, /* Helms */
43     CROWN = 33, /* Crowns */
44     SHIELD = 34, /* Shields */
45     CLOAK = 35, /* Cloaks */
46     SOFT_ARMOR = 36, /* Soft Armor */
47     HARD_ARMOR = 37, /* Hard Armor */
48     DRAG_ARMOR = 38, /* Dragon Scale Mail */
49     LITE = 39, /* Lites (including Specials) */
50     AMULET = 40, /* Amulets (including Specials) */
51     RING = 45, /* Rings (including Specials) */
52     CARD = 50,
53     STAFF = 55,
54     WAND = 65,
55     ROD = 66,
56     PARCHMENT = 69,
57     SCROLL = 70,
58     POTION = 75,
59     FLASK = 77,
60     FOOD = 80,
61     LIFE_BOOK = 90,
62     SORCERY_BOOK = 91,
63     NATURE_BOOK = 92,
64     CHAOS_BOOK = 93,
65     DEATH_BOOK = 94,
66     TRUMP_BOOK = 95,
67     ARCANE_BOOK = 96,
68     CRAFT_BOOK = 97,
69     DEMON_BOOK = 98,
70     CRUSADE_BOOK = 99,
71     MUSIC_BOOK = 105,
72     HISSATSU_BOOK = 106,
73     HEX_BOOK = 107,
74     GOLD = 127, /* Gold can only be picked up by players */
75 };
76
77 constexpr auto TV_WEARABLE_RANGE = EnumRange(ItemKindType::BOW, ItemKindType::CARD);
78 constexpr auto TV_WEAPON_RANGE = EnumRange(ItemKindType::BOW, ItemKindType::SWORD);