liblcf
rpg_enemy.h
Go to the documentation of this file.
1 /* !!!! GENERATED FILE - DO NOT EDIT !!!!
2  * --------------------------------------
3  *
4  * This file is part of liblcf. Copyright (c) 2020 liblcf authors.
5  * https://github.com/EasyRPG/liblcf - https://easyrpg.org
6  *
7  * liblcf is Free/Libre Open Source Software, released under the MIT License.
8  * For the full copyright and license information, please view the COPYING
9  * file that was distributed with this source code.
10  */
11 
12 #ifndef LCF_RPG_ENEMY_H
13 #define LCF_RPG_ENEMY_H
14 
15 // Headers
16 #include <stdint.h>
17 #include <string>
18 #include <vector>
19 #include "rpg_enemyaction.h"
20 
24 namespace RPG {
25  class Enemy {
26  public:
27  int ID = 0;
28  std::string name;
29  std::string battler_name;
30  int32_t battler_hue = 0;
31  int32_t max_hp = 10;
32  int32_t max_sp = 10;
33  int32_t attack = 10;
34  int32_t defense = 10;
35  int32_t spirit = 10;
36  int32_t agility = 10;
37  bool transparent = false;
38  int32_t exp = 0;
39  int32_t gold = 0;
40  int32_t drop_id = 0;
41  int32_t drop_prob = 100;
42  bool critical_hit = false;
43  int32_t critical_hit_chance = 30;
44  bool miss = false;
45  bool levitate = false;
46  std::vector<uint8_t> state_ranks;
47  std::vector<uint8_t> attribute_ranks;
48  std::vector<EnemyAction> actions;
49  };
50 
51  inline bool operator==(const Enemy& l, const Enemy& r) {
52  return l.name == r.name
53  && l.battler_name == r.battler_name
54  && l.battler_hue == r.battler_hue
55  && l.max_hp == r.max_hp
56  && l.max_sp == r.max_sp
57  && l.attack == r.attack
58  && l.defense == r.defense
59  && l.spirit == r.spirit
60  && l.agility == r.agility
61  && l.transparent == r.transparent
62  && l.exp == r.exp
63  && l.gold == r.gold
64  && l.drop_id == r.drop_id
65  && l.drop_prob == r.drop_prob
66  && l.critical_hit == r.critical_hit
68  && l.miss == r.miss
69  && l.levitate == r.levitate
70  && l.state_ranks == r.state_ranks
72  && l.actions == r.actions;
73  }
74 
75  inline bool operator!=(const Enemy& l, const Enemy& r) {
76  return !(l == r);
77  }
78 }
79 
80 #endif
RPG::Enemy::miss
bool miss
Definition: rpg_enemy.h:44
RPG::operator==
bool operator==(const Actor &l, const Actor &r)
Definition: rpg_actor.h:64
RPG::Enemy::transparent
bool transparent
Definition: rpg_enemy.h:37
RPG::Enemy::gold
int32_t gold
Definition: rpg_enemy.h:39
RPG::Enemy::critical_hit_chance
int32_t critical_hit_chance
Definition: rpg_enemy.h:43
RPG::Enemy::battler_hue
int32_t battler_hue
Definition: rpg_enemy.h:30
RPG
Definition: rpg_actor.h:26
rpg_enemyaction.h
RPG::Enemy::attribute_ranks
std::vector< uint8_t > attribute_ranks
Definition: rpg_enemy.h:47
RPG::Enemy::exp
int32_t exp
Definition: rpg_enemy.h:38
RPG::Enemy::ID
int ID
Definition: rpg_enemy.h:27
RPG::Enemy::defense
int32_t defense
Definition: rpg_enemy.h:34
RPG::Enemy::name
std::string name
Definition: rpg_enemy.h:28
RPG::Enemy::max_hp
int32_t max_hp
Definition: rpg_enemy.h:31
RPG::Enemy
Definition: rpg_enemy.h:25
RPG::Enemy::state_ranks
std::vector< uint8_t > state_ranks
Definition: rpg_enemy.h:46
RPG::Enemy::drop_id
int32_t drop_id
Definition: rpg_enemy.h:40
RPG::operator!=
bool operator!=(const Actor &l, const Actor &r)
Definition: rpg_actor.h:98
RPG::Enemy::actions
std::vector< EnemyAction > actions
Definition: rpg_enemy.h:48
RPG::Enemy::agility
int32_t agility
Definition: rpg_enemy.h:36
RPG::Enemy::battler_name
std::string battler_name
Definition: rpg_enemy.h:29
RPG::Enemy::attack
int32_t attack
Definition: rpg_enemy.h:33
RPG::Enemy::critical_hit
bool critical_hit
Definition: rpg_enemy.h:42
RPG::Enemy::spirit
int32_t spirit
Definition: rpg_enemy.h:35
RPG::Enemy::drop_prob
int32_t drop_prob
Definition: rpg_enemy.h:41
RPG::Enemy::levitate
bool levitate
Definition: rpg_enemy.h:45
RPG::Enemy::max_sp
int32_t max_sp
Definition: rpg_enemy.h:32