forked from miki151/keeperrl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathitem_type.h
76 lines (64 loc) · 1.25 KB
/
item_type.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef _ITEM_TYPE_H
#define _ITEM_TYPE_H
#include "enum_variant.h"
#include "effect_type.h"
enum class ItemId {
SPECIAL_KNIFE,
KNIFE,
SPEAR,
SWORD,
SPECIAL_SWORD,
ELVEN_SWORD,
SPECIAL_ELVEN_SWORD,
BATTLE_AXE,
SPECIAL_BATTLE_AXE,
WAR_HAMMER,
SPECIAL_WAR_HAMMER,
CLUB,
HEAVY_CLUB,
SCYTHE,
BOW,
ARROW,
LEATHER_ARMOR,
LEATHER_HELM,
TELEPATHY_HELM,
CHAIN_ARMOR,
IRON_HELM,
LEATHER_BOOTS,
IRON_BOOTS,
SPEED_BOOTS,
LEVITATION_BOOTS,
LEATHER_GLOVES,
DEXTERITY_GLOVES,
STRENGTH_GLOVES,
ROBE,
SCROLL,
FIRE_SCROLL,
POTION,
MUSHROOM,
WARNING_AMULET,
HEALING_AMULET,
DEFENSE_AMULET,
FRIENDLY_ANIMALS_AMULET,
RING,
FIRST_AID_KIT,
ROCK,
IRON_ORE,
GOLD_PIECE,
WOOD_PLANK,
RANDOM_TECH_BOOK,
TECH_BOOK,
TRAP_ITEM,
BOULDER_TRAP_ITEM,
};
struct TrapInfo : public NamedTupleBase<TrapType, EffectType> {
NAMED_TUPLE_STUFF(TrapInfo);
NAME_ELEM(0, trapType);
NAME_ELEM(1, effectType);
};
typedef EnumVariant<ItemId, TYPES(EffectType, TrapInfo, LastingEffect, TechId),
ASSIGN(EffectType, ItemId::SCROLL, ItemId::POTION, ItemId::MUSHROOM),
ASSIGN(TrapInfo, ItemId::TRAP_ITEM),
ASSIGN(LastingEffect, ItemId::RING),
ASSIGN(TechId, ItemId::TECH_BOOK)> ItemType;
#endif