summaryrefslogtreecommitdiff
path: root/src/randart_part_type.hpp
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2020-05-23 00:33:19 -0700
committerManoj Srivastava <srivasta@debian.org>2020-05-23 00:33:19 -0700
commitd6b913d3ca2e84b75f3675fd6e9f5246c100cf27 (patch)
tree5fc28b7efc737bf2c79dc7d799e0a6013957fe11 /src/randart_part_type.hpp
parentc42f029316c0c004a795ca170bdb50644a800534 (diff)
parent73a0259be1d44fdb2ab34266ae0ff63f0d8f0b60 (diff)
Merge branch 'master' into dgit/siddebian/2.4.0-ah-1archive/debian/2.4.0-ah-1
Diffstat (limited to 'src/randart_part_type.hpp')
-rw-r--r--src/randart_part_type.hpp67
1 files changed, 34 insertions, 33 deletions
diff --git a/src/randart_part_type.hpp b/src/randart_part_type.hpp
index c2fa5386..5a4ca329 100644
--- a/src/randart_part_type.hpp
+++ b/src/randart_part_type.hpp
@@ -1,43 +1,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
{
- byte tval[20];
- byte min_sval[20];
- byte max_sval[20];
-
- byte level; /* Minimum level */
- byte rarity; /* Object rarity */
- byte mrarity; /* Object rarity */
-
- s16b max_to_h; /* Maximum to-hit bonus */
- s16b max_to_d; /* Maximum to-dam bonus */
- s16b max_to_a; /* Maximum to-ac bonus */
-
- s32b max_pval; /* Maximum pval */
-
- s32b value; /* power value */
- s16b max; /* Number of time it can appear on a single item */
-
- u32b flags1; /* Ego-Item Flags, set 1 */
- u32b flags2; /* Ego-Item Flags, set 2 */
- u32b flags3; /* Ego-Item Flags, set 3 */
- u32b flags4; /* Ego-Item Flags, set 4 */
- u32b flags5; /* Ego-Item Flags, set 5 */
- u32b esp; /* ESP flags */
- u32b fego; /* ego flags */
-
- u32b aflags1; /* Ego-Item Flags, set 1 */
- u32b aflags2; /* Ego-Item Flags, set 2 */
- u32b aflags3; /* Ego-Item Flags, set 3 */
- u32b aflags4; /* Ego-Item Flags, set 4 */
- u32b aflags5; /* Ego-Item Flags, set 5 */
- u32b aesp; /* ESP flags */
-
- s16b power; /* Power granted(if any) */
+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) */
+
};