V-Gears 0
Free Final Fantasy VII engine.
Enemy.h
Go to the documentation of this file.
1/*
2 * V-Gears
3 * Copyright (C) 2022 V-Gears Team
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include <string>
20#include "common/TypeDefine.h"
21#include "data/GameData.h"
22
23struct Enemy{
24
25 struct Element{
26
31
43 float factor;
44 };
45
49 struct Attack{
50
55
61 int camera;
62 };
63
67 struct Item{
68
72 unsigned int id;
73
77 float rate;
78 };
79
83 struct Immunity{
84
88 unsigned int status;
89
96 float rate;
97 };
98
103
107 std::string name;
108
113
118
123
128
133
138
143
148
153
158
163
168
173
178
182 std::vector<unsigned int> animations;
183
187 std::vector<Element> elements;
188
192 std::vector<Immunity> immunities;
193
197 std::vector<Attack> attacks;
198
205 std::vector<u16> manipulate_attacks;
206
210 std::vector<Item> steal;
211
215 std::vector<Item> drop;
216
220 std::string model;
221
227 unsigned int morph;
228
235 id(0), name(""), level(1), str(1), mag(1), def(1), mdef(1), spd(1), lck(1), eva(1), hp(1),
236 mp(1), exp(0), ap(0), money(0), back_damage(1.0f), morph(-1)
237 {
238 animations.clear();
239 elements.clear();
240 immunities.clear();
241 attacks.clear();
242 manipulate_attacks.clear();
243 steal.clear();
244 drop.clear();
245 }
246};
Ogre::uint16 u16
Definition: TypeDefine.h:22
Ogre::uint32 u32
Definition: TypeDefine.h:23
Ogre::uint8 u8
Definition: TypeDefine.h:21
Any enemy in a battle.
Definition: Enemy.h:24
u8 level
The enemy level.
Definition: Enemy.h:112
float back_damage
Back damage multiplier.
Definition: Enemy.h:177
u32 hp
The enemy HP.
Definition: Enemy.h:152
std::vector< Item > steal
List of the items that can be stolen from the enemy.
Definition: Enemy.h:210
u8 mdef
The enemy magic defense stat.
Definition: Enemy.h:132
std::vector< Attack > attacks
Enemy attacks.
Definition: Enemy.h:197
u8 mag
The enemy magic stat.
Definition: Enemy.h:122
u32 id
The enemy ID.
Definition: Enemy.h:102
std::vector< Immunity > immunities
Status immunities and resistances.
Definition: Enemy.h:192
u32 money
Money given upon defeat.
Definition: Enemy.h:172
u8 eva
The enemy evasion stat.
Definition: Enemy.h:147
u8 def
The enemy defense stat.
Definition: Enemy.h:127
std::string name
The enemy name.
Definition: Enemy.h:107
u8 lck
The enemy luck stat.
Definition: Enemy.h:142
u32 ap
AP given upon defeat.
Definition: Enemy.h:167
u32 exp
Experience given upon defeat.
Definition: Enemy.h:162
u32 mp
The enemy MP.
Definition: Enemy.h:157
std::string model
Two-letter model code.
Definition: Enemy.h:220
Enemy()
Constructor.
Definition: Enemy.h:234
std::vector< unsigned int > animations
List of animations.
Definition: Enemy.h:182
u8 spd
The enemy speed stat.
Definition: Enemy.h:137
std::vector< Element > elements
Elemental affinities.
Definition: Enemy.h:187
unsigned int morph
ID of the item the enemy can be morphed into.
Definition: Enemy.h:227
std::vector< u16 > manipulate_attacks
List of attacks that can be used while manipulated.
Definition: Enemy.h:205
u8 str
The enemy strength stat.
Definition: Enemy.h:117
std::vector< Item > drop
List of the items that can be dropped from the enemy.
Definition: Enemy.h:215
Enemy attack data.
Definition: Enemy.h:52
int camera
Camera ID to use during the attack.
Definition: Enemy.h:64
u16 id
Attack ID.
Definition: Enemy.h:54
float factor
Damage modification factor when attacked by the element.
Definition: Enemy.h:46
u8 id
The element ID.
Definition: Enemy.h:30
float rate
Immunity rate.
Definition: Enemy.h:99
unsigned int status
Status ID.
Definition: Enemy.h:91
Data for drop and steal items.
Definition: Enemy.h:70
unsigned int id
Item ID.
Definition: Enemy.h:75
float rate
Steal or drop rate.
Definition: Enemy.h:80