liblcf
Loading...
Searching...
No Matches
rpg_item.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_ITEM_H
13#define LCF_RPG_ITEM_H
14
15// Headers
16#include <stdint.h>
17#include <string>
18#include <vector>
19#include "enum_tags.h"
20#include "rpg_itemanimation.h"
21
25namespace RPG {
26 class Item {
27 public:
28 enum Type {
39 Type_switch = 10
40 };
41 static constexpr auto kTypeTags = makeEnumTags<Type>(
42 "normal",
43 "weapon",
44 "shield",
45 "armor",
46 "helmet",
47 "accessory",
48 "medicine",
49 "book",
50 "material",
51 "special",
52 "switch"
53 );
57 };
58 static constexpr auto kTrajectoryTags = makeEnumTags<Trajectory>(
59 "straight",
60 "return"
61 );
62 enum Target {
67 };
68 static constexpr auto kTargetTags = makeEnumTags<Target>(
69 "single",
70 "center",
71 "simultaneous",
72 "sequential"
73 );
74
75 int ID = 0;
76 std::string name;
77 std::string description;
78 int32_t type = 0;
79 int32_t price = 0;
80 int32_t uses = 1;
81 int32_t atk_points1 = 0;
82 int32_t def_points1 = 0;
83 int32_t spi_points1 = 0;
84 int32_t agi_points1 = 0;
85 bool two_handed = false;
86 int32_t sp_cost = 0;
87 int32_t hit = 90;
88 int32_t critical_hit = 0;
89 int32_t animation_id = 1;
90 bool preemptive = false;
91 bool dual_attack = false;
92 bool attack_all = false;
93 bool ignore_evasion = false;
94 bool prevent_critical = false;
95 bool raise_evasion = false;
96 bool half_sp_cost = false;
97 bool no_terrain_damage = false;
98 bool cursed = false;
99 bool entire_party = false;
100 int32_t recover_hp_rate = 0;
101 int32_t recover_hp = 0;
102 int32_t recover_sp_rate = 0;
103 int32_t recover_sp = 0;
104 bool occasion_field1 = false;
105 bool ko_only = false;
106 int32_t max_hp_points = 0;
107 int32_t max_sp_points = 0;
108 int32_t atk_points2 = 0;
109 int32_t def_points2 = 0;
110 int32_t spi_points2 = 0;
111 int32_t agi_points2 = 0;
112 int32_t using_message = 0;
113 int32_t skill_id = 1;
114 int32_t switch_id = 1;
115 bool occasion_field2 = true;
116 bool occasion_battle = false;
117 std::vector<bool> actor_set;
118 std::vector<bool> state_set;
119 std::vector<bool> attribute_set;
120 int32_t state_chance = 0;
122 int32_t weapon_animation = -1;
123 std::vector<ItemAnimation> animation_data;
124 bool use_skill = false;
125 std::vector<bool> class_set;
126 int32_t ranged_trajectory = 0;
127 int32_t ranged_target = 0;
128 };
129
130 inline bool operator==(const Item& l, const Item& r) {
131 return l.name == r.name
132 && l.description == r.description
133 && l.type == r.type
134 && l.price == r.price
135 && l.uses == r.uses
136 && l.atk_points1 == r.atk_points1
137 && l.def_points1 == r.def_points1
138 && l.spi_points1 == r.spi_points1
139 && l.agi_points1 == r.agi_points1
140 && l.two_handed == r.two_handed
141 && l.sp_cost == r.sp_cost
142 && l.hit == r.hit
143 && l.critical_hit == r.critical_hit
144 && l.animation_id == r.animation_id
145 && l.preemptive == r.preemptive
146 && l.dual_attack == r.dual_attack
147 && l.attack_all == r.attack_all
151 && l.half_sp_cost == r.half_sp_cost
153 && l.cursed == r.cursed
154 && l.entire_party == r.entire_party
156 && l.recover_hp == r.recover_hp
158 && l.recover_sp == r.recover_sp
160 && l.ko_only == r.ko_only
163 && l.atk_points2 == r.atk_points2
164 && l.def_points2 == r.def_points2
165 && l.spi_points2 == r.spi_points2
166 && l.agi_points2 == r.agi_points2
168 && l.skill_id == r.skill_id
169 && l.switch_id == r.switch_id
172 && l.actor_set == r.actor_set
173 && l.state_set == r.state_set
175 && l.state_chance == r.state_chance
179 && l.use_skill == r.use_skill
180 && l.class_set == r.class_set
183 }
184
185 inline bool operator!=(const Item& l, const Item& r) {
186 return !(l == r);
187 }
188}
189
190#endif
int32_t def_points1
Definition: rpg_item.h:82
bool cursed
Definition: rpg_item.h:98
int32_t spi_points2
Definition: rpg_item.h:110
std::string name
Definition: rpg_item.h:76
int32_t max_sp_points
Definition: rpg_item.h:107
bool entire_party
Definition: rpg_item.h:99
@ Trajectory_straight
Definition: rpg_item.h:55
@ Trajectory_return
Definition: rpg_item.h:56
bool ignore_evasion
Definition: rpg_item.h:93
int32_t atk_points2
Definition: rpg_item.h:108
std::vector< bool > class_set
Definition: rpg_item.h:125
int32_t atk_points1
Definition: rpg_item.h:81
int32_t recover_hp_rate
Definition: rpg_item.h:100
int32_t type
Definition: rpg_item.h:78
int32_t price
Definition: rpg_item.h:79
int32_t state_chance
Definition: rpg_item.h:120
int32_t critical_hit
Definition: rpg_item.h:88
bool half_sp_cost
Definition: rpg_item.h:96
bool reverse_state_effect
Definition: rpg_item.h:121
bool occasion_field1
Definition: rpg_item.h:104
int32_t ranged_trajectory
Definition: rpg_item.h:126
static constexpr auto kTypeTags
Definition: rpg_item.h:41
int32_t switch_id
Definition: rpg_item.h:114
int32_t recover_hp
Definition: rpg_item.h:101
bool no_terrain_damage
Definition: rpg_item.h:97
bool raise_evasion
Definition: rpg_item.h:95
@ Type_book
Definition: rpg_item.h:36
@ Type_accessory
Definition: rpg_item.h:34
@ Type_weapon
Definition: rpg_item.h:30
@ Type_armor
Definition: rpg_item.h:32
@ Type_medicine
Definition: rpg_item.h:35
@ Type_special
Definition: rpg_item.h:38
@ Type_helmet
Definition: rpg_item.h:33
@ Type_shield
Definition: rpg_item.h:31
@ Type_normal
Definition: rpg_item.h:29
@ Type_material
Definition: rpg_item.h:37
@ Type_switch
Definition: rpg_item.h:39
bool prevent_critical
Definition: rpg_item.h:94
int32_t spi_points1
Definition: rpg_item.h:83
int32_t agi_points2
Definition: rpg_item.h:111
static constexpr auto kTargetTags
Definition: rpg_item.h:68
std::string description
Definition: rpg_item.h:77
bool occasion_field2
Definition: rpg_item.h:115
bool occasion_battle
Definition: rpg_item.h:116
static constexpr auto kTrajectoryTags
Definition: rpg_item.h:58
int32_t ranged_target
Definition: rpg_item.h:127
int32_t skill_id
Definition: rpg_item.h:113
int32_t using_message
Definition: rpg_item.h:112
@ Target_simultaneous
Definition: rpg_item.h:65
@ Target_center
Definition: rpg_item.h:64
@ Target_sequential
Definition: rpg_item.h:66
@ Target_single
Definition: rpg_item.h:63
bool preemptive
Definition: rpg_item.h:90
bool ko_only
Definition: rpg_item.h:105
bool attack_all
Definition: rpg_item.h:92
int32_t weapon_animation
Definition: rpg_item.h:122
std::vector< bool > actor_set
Definition: rpg_item.h:117
int32_t recover_sp_rate
Definition: rpg_item.h:102
std::vector< bool > state_set
Definition: rpg_item.h:118
std::vector< ItemAnimation > animation_data
Definition: rpg_item.h:123
int32_t agi_points1
Definition: rpg_item.h:84
bool two_handed
Definition: rpg_item.h:85
int32_t sp_cost
Definition: rpg_item.h:86
int32_t recover_sp
Definition: rpg_item.h:103
int32_t max_hp_points
Definition: rpg_item.h:106
int32_t def_points2
Definition: rpg_item.h:109
bool use_skill
Definition: rpg_item.h:124
std::vector< bool > attribute_set
Definition: rpg_item.h:119
bool dual_attack
Definition: rpg_item.h:91
int ID
Definition: rpg_item.h:75
int32_t animation_id
Definition: rpg_item.h:89
int32_t hit
Definition: rpg_item.h:87
int32_t uses
Definition: rpg_item.h:80
Definition: rpg_actor.h:26
bool operator==(const Actor &l, const Actor &r)
Definition: rpg_actor.h:64
bool operator!=(const Actor &l, const Actor &r)
Definition: rpg_actor.h:98