1 /* !!!! GENERATED FILE - DO NOT EDIT !!!!
2  * --------------------------------------
3  *
4  * This file is part of liblcf. Copyright (c) 2021 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_ENEMYACTION_H
13 #define LCF_RPG_ENEMYACTION_H
14 
15 // Headers
16 #include <stdint.h>
17 #include "lcf/enum_tags.h"
18 #include "lcf/context.h"
19 #include <ostream>
20 #include <type_traits>
21 
22 /**
23  * rpg::EnemyAction class.
24  */
25 namespace lcf {
26 namespace rpg {
27 	class EnemyAction {
28 	public:
29 		enum Kind {
30 			Kind_basic = 0,
31 			Kind_skill = 1,
32 			Kind_transformation = 2
33 		};
34 		static constexpr auto kKindTags = lcf::makeEnumTags<Kind>(
35 			"basic",
36 			"skill",
37 			"transformation"
38 		);
39 		enum Basic {
40 			Basic_attack = 0,
41 			Basic_dual_attack = 1,
42 			Basic_defense = 2,
43 			Basic_observe = 3,
44 			Basic_charge = 4,
45 			Basic_autodestruction = 5,
46 			Basic_escape = 6,
47 			Basic_nothing = 7
48 		};
49 		static constexpr auto kBasicTags = lcf::makeEnumTags<Basic>(
50 			"attack",
51 			"dual_attack",
52 			"defense",
53 			"observe",
54 			"charge",
55 			"autodestruction",
56 			"escape",
57 			"nothing"
58 		);
59 		enum ConditionType {
60 			ConditionType_always = 0,
61 			ConditionType_switch = 1,
62 			ConditionType_turn = 2,
63 			ConditionType_actors = 3,
64 			ConditionType_hp = 4,
65 			ConditionType_sp = 5,
66 			ConditionType_party_lvl = 6,
67 			ConditionType_party_fatigue = 7
68 		};
69 		static constexpr auto kConditionTypeTags = lcf::makeEnumTags<ConditionType>(
70 			"always",
71 			"switch",
72 			"turn",
73 			"actors",
74 			"hp",
75 			"sp",
76 			"party_lvl",
77 			"party_fatigue"
78 		);
79 
80 		int ID = 0;
81 		int32_t kind = 0;
82 		int32_t basic = 1;
83 		int32_t skill_id = 1;
84 		int32_t enemy_id = 1;
85 		int32_t condition_type = 0;
86 		int32_t condition_param1 = 0;
87 		int32_t condition_param2 = 0;
88 		int32_t switch_id = 1;
89 		bool switch_on = false;
90 		int32_t switch_on_id = 1;
91 		bool switch_off = false;
92 		int32_t switch_off_id = 1;
93 		int32_t rating = 50;
94 	};
95 	inline std::ostream& operator<<(std::ostream& os, EnemyAction::Kind code) {
96 		os << static_cast<std::underlying_type_t<decltype(code)>>(code);
97 		return os;
98 	}
99 	inline std::ostream& operator<<(std::ostream& os, EnemyAction::Basic code) {
100 		os << static_cast<std::underlying_type_t<decltype(code)>>(code);
101 		return os;
102 	}
103 	inline std::ostream& operator<<(std::ostream& os, EnemyAction::ConditionType code) {
104 		os << static_cast<std::underlying_type_t<decltype(code)>>(code);
105 		return os;
106 	}
107 
108 	inline bool operator==(const EnemyAction& l, const EnemyAction& r) {
109 		return l.kind == r.kind
110 		&& l.basic == r.basic
111 		&& l.skill_id == r.skill_id
112 		&& l.enemy_id == r.enemy_id
113 		&& l.condition_type == r.condition_type
114 		&& l.condition_param1 == r.condition_param1
115 		&& l.condition_param2 == r.condition_param2
116 		&& l.switch_id == r.switch_id
117 		&& l.switch_on == r.switch_on
118 		&& l.switch_on_id == r.switch_on_id
119 		&& l.switch_off == r.switch_off
120 		&& l.switch_off_id == r.switch_off_id
121 		&& l.rating == r.rating;
122 	}
123 
124 	inline bool operator!=(const EnemyAction& l, const EnemyAction& r) {
125 		return !(l == r);
126 	}
127 
128 	std::ostream& operator<<(std::ostream& os, const EnemyAction& obj);
129 
130 	template <typename F, typename ParentCtx = Context<void,void>>
131 	void ForEachString(EnemyAction& obj, const F& f, const ParentCtx* parent_ctx = nullptr) {
132 		(void)obj;
133 		(void)f;
134 		(void)parent_ctx;
135 	}
136 
137 } // namespace rpg
138 } // namespace lcf
139 
140 #endif
141