annotate Monsters.h @ 0:8b8875f5b359

Initial commit
author Nomad
date Fri, 05 Oct 2012 16:07:14 +0200
parents
children e62134245ab0
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #pragma once
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5 /* 334 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6 enum MONSTER_TYPE
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8 MONSTER_DEVIL_1 = 0x16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9 MONSTER_DEVIL_3 = 0x18,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10 MONSTER_DRAGON_1 = 0x19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11 MONSTER_DRAGON_3 = 0x1B,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12 MONSTER_ELEMENTAL_WATER_1 = 0x2E,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13 MONSTER_ELEMENTAL_WATER_3 = 0x30,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14 MONSTER_ELF_ARCHER_1 = 0x31,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15 MONSTER_ELF_ARCHER_3 = 0x33,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16 MONSTER_ELF_SPEARMAN_1 = 0x34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17 MONSTER_ELF_SPEARMAN_3 = 0x36,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18 MONSTER_GHOST_1 = 0x46,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 MONSTER_GHOST_3 = 0x48,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 MONSTER_HARPY_1 = 0x55,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21 MONSTER_HARPY_3 = 0x57,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22 MONSTER_LICH_1 = 0x5B,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23 MONSTER_LICH_3 = 0x5D,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24 MONSTER_OOZE_1 = 0x70,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25 MONSTER_OOZE_3 = 0x72,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26 MONSTER_PEASANT_ELF_FEMALE_1_1 = 0x85,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27 MONSTER_PEASANT_ELF_MALE_3_3 = 0x96,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28 MONSTER_SKELETON_1 = 0xC7,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29 MONSTER_SKELETON_3 = 0xC9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30 MONSTER_TITAN_1 = 0xD3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31 MONSTER_TITAN_3 = 0xD5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 MONSTER_VAMPIRE_1 = 0xD9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33 MONSTER_VAMPIRE_3 = 0xDB,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 MONSTER_WIGHT_1 = 0xDF,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35 MONSTER_WIGHT_3 = 0xE1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36 MONSTER_ZOMBIE_1 = 0xE5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37 MONSTER_ZOMBIE_3 = 0xE7,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38 MONSTER_PEASANT_GOBLIN_MALE_3_3 = 0xF9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 MONSTER_TROLL_3 = 0xFC,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 MONSTER_TREANT_1 = 0xFD,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 MONSTER_TREANT_3 = 0xFF,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 MONSTER_GHOUL_1 = 0x100,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 MONSTER_GHOUL_3 = 0x102,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 /* 335 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 enum MONSTER_SPECIAL_ABILITY_TYPE
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 MONSTER_SPECIAL_ABILITY_NONE = 0x0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50 MONSTER_SPECIAL_ABILITY_SHOT = 0x1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 MONSTER_SPECIAL_ABILITY_SUMMON = 0x2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 MONSTER_SPECIAL_ABILITY_EXPLODE = 0x3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 /* 336 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 enum MONSTER_SUPERTYPE
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58 MONSTER_SUPERTYPE_UNDEAD = 0x1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 MONSTER_SUPERTYPE_KREEGAN = 0x2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 MONSTER_SUPERTYPE_DRAGON = 0x3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 MONSTER_SUPERTYPE_ELF = 0x4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 MONSTER_SUPERTYPE_WATER_ELEMENTAL = 0x5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 MONSTER_SUPERTYPE_TREANT = 0x6,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 MONSTER_SUPERTYPE_TITAN = 0x7,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 MONSTER_SUPERTYPE_8 = 0x8,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 /* 187 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 struct MonsterInfo
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 char *pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 char *pTexture;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 unsigned __int8 uLevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 unsigned __int8 uTreasureDropChance;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 unsigned __int8 uTreasureDiceRolls;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 unsigned __int8 uTreasureDiceSides;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 unsigned __int8 uTreasureLevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 unsigned __int8 uTreasureType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 unsigned __int8 uFlying;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 unsigned __int8 uMovementType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 unsigned __int8 uAIType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 unsigned __int8 uHostilityType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 char field_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 unsigned __int8 uSpecialAttack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 unsigned __int8 uSpecialAttackType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 unsigned __int8 uAttack1Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 unsigned __int8 uAttack1DamageDiceRolls;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 unsigned __int8 uAttack1DamageDiceSides;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 unsigned __int8 uAttack1DamageBonus;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 unsigned __int8 uMissleAttack1Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 unsigned __int8 uAttack2Chance;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 unsigned __int8 uAttack2Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 unsigned __int8 uAttack2DamageDiceRolls;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 unsigned __int8 uAttack2DamageDiceSides;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 unsigned __int8 uAttack2DamageBonus;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 unsigned __int8 uMissleAttack2Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 unsigned __int8 uSpell1UseChance;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 unsigned __int8 uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 unsigned __int8 uSpell2UseChance;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 unsigned __int8 uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 unsigned __int8 uResFire;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 unsigned __int8 uResAir;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 unsigned __int8 uResWater;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 unsigned __int8 uResEarth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 unsigned __int8 uResMind;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 unsigned __int8 uResSpirit;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 unsigned __int8 uResBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 unsigned __int8 uResLight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 unsigned __int8 uResDark;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 unsigned __int8 uResPhysical;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 unsigned __int8 uSpecialAbilityType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 unsigned __int8 uSpecialAbilityDamageDiceRolls;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 unsigned __int8 uSpecialAbilityDamageDiceSides;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 unsigned __int8 uSpecialAbilityDamageDiceBonus;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 unsigned __int8 uNumCharactersAttackedPerSpecialAbility;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 char field_33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 unsigned __int16 uID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 unsigned __int16 bQuestMonster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 unsigned __int16 uSpellSkillAndMastery1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 unsigned __int16 uSpellSkillAndMastery2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 __int16 field_3C_some_special_attack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 __int16 field_3E;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 unsigned int uHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 unsigned int uAC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 unsigned int uExp;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 unsigned int uBaseSpeed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 unsigned int uRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 unsigned int uAttackPreference;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 /* 188 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 struct MonsterPlacement
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 unsigned int uNumStrings;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 char *pSubstrings[30];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 /* 189 */
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 struct MonsterStats
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 void Initialize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 void InitializePlacements();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 signed int _4563FF(const char *Str2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 static bool BelongsToSupertype(unsigned int uMonsterInfoID, enum MONSTER_SUPERTYPE eSupertype);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 MonsterInfo pInfos[265];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 MonsterPlacement pPlacement;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 unsigned int uNumMonsters;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 unsigned int uNumPlacements;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 int field_5B9C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 struct MonsterDesc
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167 unsigned __int16 uMonsterHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 unsigned __int16 uMonsterRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169 unsigned __int16 uMovementSpeed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 __int16 uToHitRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 int uTintColor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 unsigned __int16 pSoundSampleIDs[4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 char pMonsterName[32];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174 char pSpriteNames[10][10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 #pragma pack(push, 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180 struct MonsterList
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182 inline MonsterList(): //----- (00458429)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183 uNumMonsters(0), pMonsters(nullptr)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 {}
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 unsigned __int16 GetMonsterByName(const char *pMonsterName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 void ToFile();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187 void FromFile(void *pSerialized);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 bool FromFileTxt(const char *Args);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190 unsigned int uNumMonsters;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191 struct MonsterDesc *pMonsters;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 };
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193 #pragma pack(pop)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196 extern struct MonsterStats *pMonsterStats;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197 extern struct MonsterList *pMonsterList;