diff options
author | Manoj Srivastava <srivasta@debian.org> | 2020-05-23 00:33:19 -0700 |
---|---|---|
committer | Manoj Srivastava <srivasta@debian.org> | 2020-05-23 00:33:19 -0700 |
commit | d6b913d3ca2e84b75f3675fd6e9f5246c100cf27 (patch) | |
tree | 5fc28b7efc737bf2c79dc7d799e0a6013957fe11 /src/artifact_type.hpp | |
parent | c42f029316c0c004a795ca170bdb50644a800534 (diff) | |
parent | 73a0259be1d44fdb2ab34266ae0ff63f0d8f0b60 (diff) |
Merge branch 'master' into dgit/siddebian/2.4.0-ah-1archive/debian/2.4.0-ah-1
Diffstat (limited to 'src/artifact_type.hpp')
-rw-r--r-- | src/artifact_type.hpp | 54 |
1 files changed, 22 insertions, 32 deletions
diff --git a/src/artifact_type.hpp b/src/artifact_type.hpp index 7a4340aa..9f866aa7 100644 --- a/src/artifact_type.hpp +++ b/src/artifact_type.hpp @@ -1,6 +1,7 @@ #pragma once #include "h-basic.h" +#include "object_flag_set.hpp" /** * Artifact descriptor. @@ -11,50 +12,39 @@ */ struct artifact_type { - char const *name; /* Artifact name */ - char *text; /* Artifact description */ + char const *name = nullptr; /* Artifact name */ + char *text = nullptr; /* Artifact description */ - byte tval; /* Artifact type */ - byte sval; /* Artifact sub type */ + byte tval = 0; /* Artifact type */ + byte sval = 0; /* Artifact sub type */ - s16b pval; /* Artifact extra info */ + s16b pval = 0; /* Artifact extra info */ - s16b to_h; /* Bonus to hit */ - s16b to_d; /* Bonus to damage */ - s16b to_a; /* Bonus to armor */ + s16b to_h = 0; /* Bonus to hit */ + s16b to_d = 0; /* Bonus to damage */ + s16b to_a = 0; /* Bonus to armor */ - s16b activate; /* Activation Number */ + s16b activate = 0; /* Activation Number */ - s16b ac; /* Base armor */ + s16b ac = 0; /* Base armor */ - byte dd, ds; /* Damage when hits */ + byte dd = 0; /* Damage dice */ + byte ds = 0; /* Damage sides */ - s16b weight; /* Weight */ + s16b weight = 0; /* Weight */ - s32b cost; /* Artifact "cost" */ + s32b cost = 0; /* Artifact "cost" */ - u32b flags1; /* Artifact Flags, set 1 */ - u32b flags2; /* Artifact Flags, set 2 */ - u32b flags3; /* Artifact Flags, set 3 */ - u32b flags4; /* Artifact Flags, set 4 */ - u32b flags5; /* Artifact Flags, set 5 */ + object_flag_set flags; /* Artifact Flags */ + object_flag_set oflags; /* Obvious Flags */ - u32b oflags1; /* Obvious Flags, set 1 */ - u32b oflags2; /* Obvious Flags, set 2 */ - u32b oflags3; /* Obvious Flags, set 3 */ - u32b oflags4; /* Obvious Flags, set 4 */ - u32b oflags5; /* Obvious Flags, set 5 */ + byte level = 0; /* Artifact level */ + byte rarity = 0; /* Artifact rarity */ - byte level; /* Artifact level */ - byte rarity; /* Artifact rarity */ + byte cur_num = 0; /* Number created (0 or 1) */ - byte cur_num; /* Number created (0 or 1) */ - byte max_num; /* Unused (should be "1") */ + s16b power = 0; /* Power granted, if any */ - u32b esp; /* ESP flags */ - u32b oesp; /* ESP flags */ + s16b set = 0; /* Which set does it belong it, if any? */ - s16b power; /* Power granted(if any) */ - - s16b set; /* Does it belongs to a set ?*/ }; |