SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
power_definitions.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2019 SEGS Team (see AUTHORS.md)
5  * This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.
6  */
7 
8 #pragma once
9 #include <QtCore/QHash>
10 #include <vector>
11 #include <qobjectdefs.h>
12 
13 namespace SEGS_Enums
14 {
15 enum class SeqBitNames : uint32_t;
16 }
17 using namespace SEGS_Enums;
18 
20 {
21 Q_NAMESPACE
22 
23 enum class StoredPower_Type
24 {
25  Click = 0,
26  Auto = 1,
27  Toggle = 2,
28  Boost = 3,
29  Inspiration = 4,
30 };
31 
32 enum class StoredEntEnum : uint32_t
33 {
34  None = 0,
35  Caster = 1,
36  Player = 2,
37  DeadPlayer = 3,
38  Teammate = 4,
39  Enemy = 5,
40  DeadVillain = 6,
41  NPC = 7,
42  Friend = 8,
43  Foe = 9,
44  Location = 10,
45  Any = 11,
46  DeadTeammate = 12,
48  Teleport = 14,
49 };
50 
51 enum StoredVisibility : uint32_t
52 {
55 };
56 
57 enum class StoredAffectArea : uint32_t
58 {
59  Character = 0,
60  Cone = 1,
61  Sphere = 2,
62  Location = 3,
63 };
64 
65 enum class StoredAiReport : uint32_t
66 {
67  Always = 0,
68  Never = 1,
69  HitsOnly = 2,
70  MissOnly = 3,
71 };
72 
73 enum DurationEnum : int32_t
74 {
75  kInstant = -1,
76  kUntilKilled = 999999, // Until Shut Off
77 };
78 
79 enum class AttribStackType
80 {
81  Stack = 0,
82  Ignore = 1,
83  Extend = 2,
84  Replace = 3
85 };
86 
87 enum class AttribModType : uint32_t
88 {
89  Duration = 0,
90  Magnitude = 1,
91  Constant = 2,
92 };
93 
94 enum class AttribModTarget : uint32_t
95 {
96  Self = 0,
97  Target = 1,
98 };
99 
100 enum class AttribMod_Aspect : uint32_t
101 {
102  Current = 0,
103  Maximum = 4,
104  Strength = 8,
105  Resistance = 0xC,
106  Absolute = 0x10,
107  CurrentAbsolute = 0x10,
108 };
109 
110 enum class PowerType : uint32_t
111 {
112  Click = 0,
113  Auto = 1,
114  Toggle = 2,
115  Boost = 3,
116  Inspiration = 4,
117  NumTypes = 5,
118 };
119 
120 // I'm unsure as to the validity of this
121 enum class AttackType : uint32_t {
122  None = 0,
123  Claw = 1,
124  Kunfu = 2,
125  Gun = 3,
126  Blade = 4,
127  Blunt = 5,
128  Handgun = 6,
129  Combat = 7,
130  Weapon = 8,
131  Speed = 9,
132  Teleport = 10,
133  Carry = 11,
134  Club = 12,
135  Ranged = 108,
136  Melee = 112,
137  Aoe = 116,
138  Smashing = 120,
139  Lethal = 124,
140  Fire = 128,
141  Cold = 132,
142  Energy = 136,
143  Negative_Energy = 140
144 };
145 Q_ENUM_NS(AttackType)
146 
147 } // end of SEGS_Enums_Power namespace
148 using namespace SEGS_Enums_Power;
149 
151 {
152  // Older combinations of Qt/moc/CMake require Q_GADGET macro and granting public access
153  // to members. Otherwise, moc files are not generated properly under certain conditions.
154  Q_GADGET
155 public:
156  QByteArray name;
158  QByteArray DisplayAttackerHit;
159  QByteArray DisplayVictimHit;
162  QByteArray Table;
163  float Scale;
164  int Attrib; //
167  float Duration; // Special values in DurationEnum
168  float Magnitude;
169  int Delay;
170  int Period;
171  int Chance;
177  std::vector<int> ContinuingBits;
178  QByteArray ContinuingFX;
179  std::vector<int> ConditionalBits; // 5c
180  QByteArray ConditionalFX;
181  QByteArray EntityDef;
185 };
186 
188 {
189  QByteArray m_Name;
195  QByteArray DisplayName;
196  QByteArray DisplayHelp;
197  QByteArray DisplayShortHelp;
199  QByteArray DisplayAttackerHit;
200  QByteArray DisplayVictimHit;
201  QByteArray IconName;
202  std::vector<SeqBitNames> ModeSeqBits;
203  std::vector<SeqBitNames> ActivationBits;
204  std::vector<SeqBitNames> WindUpBits; // 3c
205  std::vector<SeqBitNames> InitialAttackBits;
206  std::vector<SeqBitNames> AttackBits;
207  std::vector<SeqBitNames> HitBits;
208  std::vector<SeqBitNames> BlockBits;
209  std::vector<SeqBitNames> DeathBits;
210  QByteArray ActivationFX;
211  QByteArray WindUpFX;
212  QByteArray InitialAttackFX;
213  QByteArray AttackFX;
214  QByteArray BlockFX;
215  QByteArray HitFX;
216  QByteArray DeathFX;
223  std::vector<AttackType> AttackTypes;
224  std::vector<QByteArray> Requires;
225  float Accuracy;
230  int AIReport;
232  float Radius;
233  float Arc;
234  float Range;
246  float m_UsageTime;
248  float m_Lifetime;
252  std::vector<StoredEntEnum> EntsAffected;
253  std::vector<StoredEntEnum> EntsAutoHit;
254  std::vector<uint32_t> BoostsAllowed;
255  std::vector<uint32_t> GroupMembership;
256  std::vector<QByteArray> AIGroups;
257  std::vector<StoredAttribMod> pAttribMod;
259  int iCntUsed;
260  int iCntHits;
262 };
263 
265 {
266  QByteArray m_Name;
268  QByteArray DisplayName;
269  QByteArray DisplayHelp;
270  QByteArray DisplayShortHelp;
271  QByteArray IconName;
272  std::vector<Power_Data> m_Powers;
273  QHash<QString, Power_Data *> m_hash_table;
274  std::vector<int32_t> Available;
275 };
276 
277 enum
278 {
280 };
281 
283 {
284  QByteArray name;
285  QByteArray disp_name;
286  QByteArray disp_help;
287  QByteArray disp_short_help;
288  std::vector<Parse_PowerSet> m_PowerSets;
289  QHash<QString, Parse_PowerSet *> m_powers_hash;
290 };
291 
293 {
294  std::vector<StoredPowerCategory> m_categories;
295  QHash<QString, StoredPowerCategory *> categories_hash;
296 };
QByteArray name
Definition: power_definitions.h:156
QByteArray m_Name
Definition: power_definitions.h:189
float FramesBeforeHit_seconds
Definition: power_definitions.h:237
std::vector< StoredEntEnum > EntsAffected
Definition: power_definitions.h:252
int IgnoreStrength
Definition: power_definitions.h:226
int ptr_powerset_available
Definition: power_definitions.h:190
int DelayedHit
Definition: power_definitions.h:220
float Range
Definition: power_definitions.h:234
std::vector< SeqBitNames > ActivationBits
Definition: power_definitions.h:203
int m_InitialFramesBeforeHit
Definition: power_definitions.h:217
StoredVisibility
Definition: power_definitions.h:51
QByteArray m_Name
Definition: power_definitions.h:266
int fDamageGiven
Definition: power_definitions.h:258
int m_AttackFrames
Definition: power_definitions.h:219
QByteArray InitialAttackFX
Definition: power_definitions.h:212
float Magnitude
Definition: power_definitions.h:168
std::vector< uint32_t > BoostsAllowed
Definition: power_definitions.h:254
Definition: Character.h:47
QByteArray EntityDef
Definition: power_definitions.h:181
std::vector< SeqBitNames > InitialAttackBits
Definition: power_definitions.h:205
std::vector< uint32_t > GroupMembership
Definition: power_definitions.h:255
Definition: power_definitions.h:282
QByteArray BlockFX
Definition: power_definitions.h:214
int Period
Definition: power_definitions.h:170
int CancelOnMiss
Definition: power_definitions.h:172
QByteArray disp_help
Definition: power_definitions.h:286
std::vector< int > ContinuingBits
Definition: power_definitions.h:177
Definition: power_definitions.h:279
std::vector< int32_t > Available
Definition: power_definitions.h:274
Definition: power_definitions.h:76
StoredPower_Type
Definition: power_definitions.h:23
std::vector< QByteArray > Requires
Definition: power_definitions.h:224
QByteArray DisplayShortHelp
Definition: power_definitions.h:197
AttribModType Type
Definition: power_definitions.h:166
int m_FramesBeforeHit
Definition: power_definitions.h:218
std::vector< StoredAttribMod > pAttribMod
Definition: power_definitions.h:257
int AllowResistance
Definition: power_definitions.h:175
float Scale
Definition: power_definitions.h:163
QByteArray ContinuingFX
Definition: power_definitions.h:178
QByteArray DisplayName
Definition: power_definitions.h:195
AttribMod_Aspect Aspect
Definition: power_definitions.h:165
QByteArray IconName
Definition: power_definitions.h:271
std::vector< Parse_PowerSet > m_PowerSets
Definition: power_definitions.h:288
QByteArray DisplayHelp
Definition: power_definitions.h:196
AttribStackType StackType
Definition: power_definitions.h:176
QByteArray ActivationFX
Definition: power_definitions.h:210
QByteArray Table
Definition: power_definitions.h:162
float InitialFramesBeforeHit_seconds
Definition: power_definitions.h:236
PowerType Type
Definition: power_definitions.h:222
std::vector< AttackType > AttackTypes
Definition: power_definitions.h:223
QByteArray DisplayAttackerHit
Definition: power_definitions.h:199
std::vector< SeqBitNames > WindUpBits
Definition: power_definitions.h:204
struct Power_Data * parent_StoredPower
Definition: power_definitions.h:160
float EnduranceCost
Definition: power_definitions.h:242
int Delay
Definition: power_definitions.h:169
float m_Lifetime
Definition: power_definitions.h:248
std::vector< int > ConditionalBits
Definition: power_definitions.h:179
std::vector< Power_Data > m_Powers
Definition: power_definitions.h:272
QByteArray WindUpFX
Definition: power_definitions.h:211
int category_idx
Definition: power_definitions.h:192
struct Parse_PowerSet * parent_StoredPowerSet
Definition: power_definitions.h:191
StoredEntEnum Target
Definition: power_definitions.h:250
float TimeToActivate
Definition: power_definitions.h:238
std::vector< StoredEntEnum > EntsAutoHit
Definition: power_definitions.h:253
float ActivatePeriod
Definition: power_definitions.h:241
QByteArray IconName
Definition: power_definitions.h:201
float Radius
Definition: power_definitions.h:232
std::vector< SeqBitNames > DeathBits
Definition: power_definitions.h:209
std::vector< SeqBitNames > ModeSeqBits
Definition: power_definitions.h:202
std::vector< SeqBitNames > BlockBits
Definition: power_definitions.h:208
Definition: power_definitions.h:13
int ProjectileSpeed
Definition: power_definitions.h:221
QHash< QString, Power_Data * > m_hash_table
Definition: power_definitions.h:273
QByteArray HitFX
Definition: power_definitions.h:215
StoredEntEnum
Definition: power_definitions.h:32
SeqBitNames
Definition: seq_definitions.h:47
Definition: Friend.h:15
int powerset_idx
Definition: power_definitions.h:193
Definition: power_definitions.h:264
int power_index
Definition: power_definitions.h:194
float Arc
Definition: power_definitions.h:233
QHash< QString, Parse_PowerSet * > m_powers_hash
Definition: power_definitions.h:289
int m_NumCharges
Definition: power_definitions.h:245
StoredAffectArea
Definition: power_definitions.h:57
Definition: power_definitions.h:54
int AIReport
Definition: power_definitions.h:230
AttribStackType
Definition: power_definitions.h:79
QByteArray AttackFX
Definition: power_definitions.h:213
struct StoredPowerCategory * parent_PowerCategory
Definition: power_definitions.h:267
QByteArray PriorityListDefense
Definition: power_definitions.h:183
QByteArray ConditionalFX
Definition: power_definitions.h:180
QByteArray DisplayHelp
Definition: power_definitions.h:269
float Accuracy
Definition: power_definitions.h:225
Definition: power_definitions.h:187
std::vector< StoredPowerCategory > m_categories
Definition: power_definitions.h:294
QByteArray PriorityListOffense
Definition: power_definitions.h:182
int Chance
Definition: power_definitions.h:171
float InterruptTime
Definition: power_definitions.h:240
float Duration
Definition: power_definitions.h:167
int iCntHits
Definition: power_definitions.h:260
int NearGround
Definition: power_definitions.h:173
QByteArray DisplayAttackerHit
Definition: power_definitions.h:158
Definition: power_definitions.h:292
PowerType
Definition: power_definitions.h:110
Definition: power_definitions.h:19
StoredEntEnum TargetSecondary
Definition: power_definitions.h:251
AttribMod_Aspect
Definition: power_definitions.h:100
AttribModType
Definition: power_definitions.h:87
std::vector< SeqBitNames > HitBits
Definition: power_definitions.h:207
QByteArray PriorityListPassive
Definition: power_definitions.h:184
int Attrib
Definition: power_definitions.h:164
QByteArray DisplayShortHelp
Definition: power_definitions.h:270
int DestroyOnLimit
Definition: power_definitions.h:243
int iCntMisses
Definition: power_definitions.h:261
std::vector< SeqBitNames > AttackBits
Definition: power_definitions.h:206
int AllowStrength
Definition: power_definitions.h:174
QByteArray DisplayAttackerAttack
Definition: power_definitions.h:198
int limited_use
Definition: power_definitions.h:244
QByteArray DeathFX
Definition: power_definitions.h:216
AttribModTarget Target
Definition: power_definitions.h:161
int index_in_power
Definition: power_definitions.h:157
AttackType
Definition: power_definitions.h:121
QByteArray disp_name
Definition: power_definitions.h:285
int NearGround
Definition: power_definitions.h:227
float m_UsageTime
Definition: power_definitions.h:246
int iCntUsed
Definition: power_definitions.h:259
StoredVisibility TargetVisibility
Definition: power_definitions.h:249
StoredAffectArea EffectArea
Definition: power_definitions.h:231
int TargetNearGround
Definition: power_definitions.h:228
float RangeSecondary
Definition: power_definitions.h:235
QByteArray DisplayVictimHit
Definition: power_definitions.h:200
StoredAiReport
Definition: power_definitions.h:65
int CastableAfterDeath
Definition: power_definitions.h:229
QHash< QString, StoredPowerCategory * > categories_hash
Definition: power_definitions.h:295
std::vector< QByteArray > AIGroups
Definition: power_definitions.h:256
QByteArray name
Definition: power_definitions.h:284
int has_lifetime
Definition: power_definitions.h:247
Definition: power_definitions.h:75
QByteArray DisplayVictimHit
Definition: power_definitions.h:159
Definition: power_definitions.h:53
AttribModTarget
Definition: power_definitions.h:94
QByteArray disp_short_help
Definition: power_definitions.h:287
float RechargeTime
Definition: power_definitions.h:239
DurationEnum
Definition: power_definitions.h:73
QByteArray DisplayName
Definition: power_definitions.h:268
Definition: power_definitions.h:150