summaryrefslogtreecommitdiff
path: root/src/randart_part_type.hpp
blob: 5a4ca3291174fc7686b52300c973474a64ccc4da (plain)
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
#pragma once

#include "ego_flag_set.hpp"
#include "h-basic.h"
#include "object_flag_set.hpp"

#include <vector>

/**
 * Random artifact part descriptor.
 */
struct randart_part_type
{
public:
	struct kind_filter_t {
		byte tval;
		byte min_sval;
		byte max_sval;
	};

	std::vector<kind_filter_t> kind_filter;

	byte level = 0;                          /* Minimum level */
	byte rarity = 0;                         /* Object rarity */
	byte mrarity = 0;                        /* Object rarity */

	s16b max_to_h = 0;                       /* Maximum to-hit bonus */
	s16b max_to_d = 0;                       /* Maximum to-dam bonus */
	s16b max_to_a = 0;                       /* Maximum to-ac bonus */

	s32b max_pval = 0;                       /* Maximum pval */

	s32b value = 0;                          /* power value */
	s16b max = 0;                            /* Number of time it can appear on a single item */

	object_flag_set flags;                   /* Ego item flags */

	ego_flag_set fego;                       /* Ego flags */

	object_flag_set aflags;                  /* Antagonistic ego item flags */

	s16b power = -1;                         /* Power granted(if any) */

};