liblcf
rpg_skill.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_SKILL_H
13 #define LCF_RPG_SKILL_H
14 
15 // Headers
16 #include <stdint.h>
17 #include <string>
18 #include <vector>
19 #include "enum_tags.h"
21 #include "rpg_sound.h"
22 
26 namespace RPG {
27  class Skill {
28  public:
29  enum Type {
34  Type_subskill = 4
35  };
36  static constexpr auto kTypeTags = makeEnumTags<Type>(
37  "normal",
38  "teleport",
39  "escape",
40  "switch",
41  "subskill"
42  );
43  enum SpType {
45  SpType_percent = 1
46  };
47  static constexpr auto kSpTypeTags = makeEnumTags<SpType>(
48  "cost",
49  "percent"
50  );
51  enum Scope {
56  Scope_party = 4
57  };
58  static constexpr auto kScopeTags = makeEnumTags<Scope>(
59  "enemy",
60  "enemies",
61  "self",
62  "ally",
63  "party"
64  );
65 
66  int ID = 0;
67  std::string name;
68  std::string description;
69  std::string using_message1;
70  std::string using_message2;
71  int32_t failure_message = 0;
72  int32_t type = 0;
73  int32_t sp_type = 0;
74  int32_t sp_percent = 0;
75  int32_t sp_cost = 0;
76  int32_t scope = 0;
77  int32_t switch_id = 1;
78  int32_t animation_id = 1;
80  bool occasion_field = true;
81  bool occasion_battle = false;
82  bool reverse_state_effect = false;
83  int32_t physical_rate = 0;
84  int32_t magical_rate = 3;
85  int32_t variance = 4;
86  int32_t power = 0;
87  int32_t hit = 100;
88  bool affect_hp = false;
89  bool affect_sp = false;
90  bool affect_attack = false;
91  bool affect_defense = false;
92  bool affect_spirit = false;
93  bool affect_agility = false;
94  bool absorb_damage = false;
95  bool ignore_defense = false;
96  std::vector<bool> state_effects;
97  std::vector<bool> attribute_effects;
98  bool affect_attr_defence = false;
99  int32_t battler_animation = -1;
100  std::vector<BattlerAnimationData> battler_animation_data;
101  };
102 
103  inline bool operator==(const Skill& l, const Skill& r) {
104  return l.name == r.name
105  && l.description == r.description
109  && l.type == r.type
110  && l.sp_type == r.sp_type
111  && l.sp_percent == r.sp_percent
112  && l.sp_cost == r.sp_cost
113  && l.scope == r.scope
114  && l.switch_id == r.switch_id
115  && l.animation_id == r.animation_id
116  && l.sound_effect == r.sound_effect
120  && l.physical_rate == r.physical_rate
121  && l.magical_rate == r.magical_rate
122  && l.variance == r.variance
123  && l.power == r.power
124  && l.hit == r.hit
125  && l.affect_hp == r.affect_hp
126  && l.affect_sp == r.affect_sp
127  && l.affect_attack == r.affect_attack
129  && l.affect_spirit == r.affect_spirit
131  && l.absorb_damage == r.absorb_damage
133  && l.state_effects == r.state_effects
138  }
139 
140  inline bool operator!=(const Skill& l, const Skill& r) {
141  return !(l == r);
142  }
143 }
144 
145 #endif
RPG::Skill::animation_id
int32_t animation_id
Definition: rpg_skill.h:78
RPG::Skill
Definition: rpg_skill.h:27
RPG::Skill::Scope_ally
@ Scope_ally
Definition: rpg_skill.h:55
RPG::Skill::Type_subskill
@ Type_subskill
Definition: rpg_skill.h:34
RPG::operator==
bool operator==(const Actor &l, const Actor &r)
Definition: rpg_actor.h:64
RPG::Skill::affect_sp
bool affect_sp
Definition: rpg_skill.h:89
RPG::Skill::Scope_enemy
@ Scope_enemy
Definition: rpg_skill.h:52
RPG::Skill::Type_normal
@ Type_normal
Definition: rpg_skill.h:30
RPG::Skill::absorb_damage
bool absorb_damage
Definition: rpg_skill.h:94
RPG::Skill::ID
int ID
Definition: rpg_skill.h:66
RPG::Skill::affect_defense
bool affect_defense
Definition: rpg_skill.h:91
RPG::Skill::battler_animation
int32_t battler_animation
Definition: rpg_skill.h:99
RPG::Skill::name
std::string name
Definition: rpg_skill.h:67
RPG::Skill::type
int32_t type
Definition: rpg_skill.h:72
RPG::Skill::reverse_state_effect
bool reverse_state_effect
Definition: rpg_skill.h:82
RPG::Skill::ignore_defense
bool ignore_defense
Definition: rpg_skill.h:95
RPG::Skill::Scope
Scope
Definition: rpg_skill.h:51
RPG
Definition: rpg_actor.h:26
RPG::Skill::failure_message
int32_t failure_message
Definition: rpg_skill.h:71
RPG::Skill::using_message1
std::string using_message1
Definition: rpg_skill.h:69
RPG::Skill::kTypeTags
static constexpr auto kTypeTags
Definition: rpg_skill.h:36
RPG::Sound
Definition: rpg_sound.h:23
RPG::Skill::Type_escape
@ Type_escape
Definition: rpg_skill.h:32
RPG::Skill::affect_attr_defence
bool affect_attr_defence
Definition: rpg_skill.h:98
RPG::Skill::hit
int32_t hit
Definition: rpg_skill.h:87
RPG::Skill::state_effects
std::vector< bool > state_effects
Definition: rpg_skill.h:96
RPG::Skill::Scope_enemies
@ Scope_enemies
Definition: rpg_skill.h:53
RPG::Skill::occasion_field
bool occasion_field
Definition: rpg_skill.h:80
RPG::Skill::SpType_percent
@ SpType_percent
Definition: rpg_skill.h:45
RPG::Skill::Scope_self
@ Scope_self
Definition: rpg_skill.h:54
RPG::Skill::Type
Type
Definition: rpg_skill.h:29
rpg_battleranimationdata.h
RPG::Skill::Scope_party
@ Scope_party
Definition: rpg_skill.h:56
RPG::Skill::sp_type
int32_t sp_type
Definition: rpg_skill.h:73
RPG::Skill::affect_attack
bool affect_attack
Definition: rpg_skill.h:90
RPG::Skill::SpType_cost
@ SpType_cost
Definition: rpg_skill.h:44
RPG::Skill::kScopeTags
static constexpr auto kScopeTags
Definition: rpg_skill.h:58
rpg_sound.h
RPG::operator!=
bool operator!=(const Actor &l, const Actor &r)
Definition: rpg_actor.h:98
RPG::Skill::using_message2
std::string using_message2
Definition: rpg_skill.h:70
RPG::Skill::power
int32_t power
Definition: rpg_skill.h:86
RPG::Skill::occasion_battle
bool occasion_battle
Definition: rpg_skill.h:81
RPG::Skill::physical_rate
int32_t physical_rate
Definition: rpg_skill.h:83
RPG::Skill::Type_teleport
@ Type_teleport
Definition: rpg_skill.h:31
RPG::Skill::description
std::string description
Definition: rpg_skill.h:68
RPG::Skill::Type_switch
@ Type_switch
Definition: rpg_skill.h:33
RPG::Skill::affect_agility
bool affect_agility
Definition: rpg_skill.h:93
RPG::Skill::SpType
SpType
Definition: rpg_skill.h:43
RPG::Skill::sound_effect
Sound sound_effect
Definition: rpg_skill.h:79
RPG::Skill::affect_hp
bool affect_hp
Definition: rpg_skill.h:88
RPG::Skill::sp_percent
int32_t sp_percent
Definition: rpg_skill.h:74
RPG::Skill::battler_animation_data
std::vector< BattlerAnimationData > battler_animation_data
Definition: rpg_skill.h:100
RPG::Skill::variance
int32_t variance
Definition: rpg_skill.h:85
RPG::Skill::magical_rate
int32_t magical_rate
Definition: rpg_skill.h:84
RPG::Skill::sp_cost
int32_t sp_cost
Definition: rpg_skill.h:75
RPG::Skill::kSpTypeTags
static constexpr auto kSpTypeTags
Definition: rpg_skill.h:47
RPG::Skill::switch_id
int32_t switch_id
Definition: rpg_skill.h:77
RPG::Skill::attribute_effects
std::vector< bool > attribute_effects
Definition: rpg_skill.h:97
RPG::Skill::affect_spirit
bool affect_spirit
Definition: rpg_skill.h:92
enum_tags.h
RPG::Skill::scope
int32_t scope
Definition: rpg_skill.h:76