liblcf
Loading...
Searching...
No Matches
rpg_state.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_STATE_H
13#define LCF_RPG_STATE_H
14
15// Headers
16#include <stdint.h>
17#include <string>
18#include "enum_tags.h"
19
23namespace RPG {
24 class State {
25 public:
26 // The ID of the special death state
27 static constexpr int kDeathID = 1;
28
32 };
33 static constexpr auto kPersistenceTags = makeEnumTags<Persistence>(
34 "ends",
35 "persists"
36 );
42 };
43 static constexpr auto kRestrictionTags = makeEnumTags<Restriction>(
44 "normal",
45 "do_nothing",
46 "attack_enemy",
47 "attack_ally"
48 );
53 };
54 static constexpr auto kAffectTypeTags = makeEnumTags<AffectType>(
55 "half",
56 "double",
57 "nothing"
58 );
63 };
64 static constexpr auto kChangeTypeTags = makeEnumTags<ChangeType>(
65 "lose",
66 "gain",
67 "nothing"
68 );
69
70 int ID = 0;
71 std::string name;
72 int32_t type = 0;
73 int32_t color = 6;
74 int32_t priority = 50;
75 int32_t restriction = 0;
76 int32_t a_rate = 100;
77 int32_t b_rate = 80;
78 int32_t c_rate = 60;
79 int32_t d_rate = 30;
80 int32_t e_rate = 0;
81 int32_t hold_turn = 0;
82 int32_t auto_release_prob = 0;
83 int32_t release_by_damage = 0;
84 int32_t affect_type = 0;
85 bool affect_attack = false;
86 bool affect_defense = false;
87 bool affect_spirit = false;
88 bool affect_agility = false;
89 int32_t reduce_hit_ratio = 100;
90 bool avoid_attacks = false;
91 bool reflect_magic = false;
92 bool cursed = false;
93 int32_t battler_animation_id = 100;
94 bool restrict_skill = false;
96 bool restrict_magic = false;
98 int32_t hp_change_type = 0;
99 int32_t sp_change_type = 0;
100 std::string message_actor;
101 std::string message_enemy;
102 std::string message_already;
103 std::string message_affected;
104 std::string message_recovery;
105 int32_t hp_change_max = 0;
106 int32_t hp_change_val = 0;
108 int32_t hp_change_map_val = 0;
109 int32_t sp_change_max = 0;
110 int32_t sp_change_val = 0;
112 int32_t sp_change_map_val = 0;
113 };
114
115 inline bool operator==(const State& l, const State& r) {
116 return l.name == r.name
117 && l.type == r.type
118 && l.color == r.color
119 && l.priority == r.priority
120 && l.restriction == r.restriction
121 && l.a_rate == r.a_rate
122 && l.b_rate == r.b_rate
123 && l.c_rate == r.c_rate
124 && l.d_rate == r.d_rate
125 && l.e_rate == r.e_rate
126 && l.hold_turn == r.hold_turn
129 && l.affect_type == r.affect_type
137 && l.cursed == r.cursed
158 }
159
160 inline bool operator!=(const State& l, const State& r) {
161 return !(l == r);
162 }
163}
164
165#endif
bool restrict_magic
Definition: rpg_state.h:96
std::string message_affected
Definition: rpg_state.h:103
@ Restriction_attack_ally
Definition: rpg_state.h:41
@ Restriction_do_nothing
Definition: rpg_state.h:39
@ Restriction_normal
Definition: rpg_state.h:38
@ Restriction_attack_enemy
Definition: rpg_state.h:40
int32_t sp_change_val
Definition: rpg_state.h:110
bool affect_attack
Definition: rpg_state.h:85
int32_t a_rate
Definition: rpg_state.h:76
bool affect_agility
Definition: rpg_state.h:88
int32_t restrict_magic_level
Definition: rpg_state.h:97
static constexpr auto kAffectTypeTags
Definition: rpg_state.h:54
int32_t b_rate
Definition: rpg_state.h:77
bool reflect_magic
Definition: rpg_state.h:91
int32_t sp_change_max
Definition: rpg_state.h:109
int32_t hp_change_max
Definition: rpg_state.h:105
int32_t release_by_damage
Definition: rpg_state.h:83
std::string name
Definition: rpg_state.h:71
bool affect_spirit
Definition: rpg_state.h:87
int32_t sp_change_map_steps
Definition: rpg_state.h:111
std::string message_enemy
Definition: rpg_state.h:101
int32_t e_rate
Definition: rpg_state.h:80
static constexpr auto kRestrictionTags
Definition: rpg_state.h:43
static constexpr auto kPersistenceTags
Definition: rpg_state.h:33
@ ChangeType_gain
Definition: rpg_state.h:61
@ ChangeType_lose
Definition: rpg_state.h:60
@ ChangeType_nothing
Definition: rpg_state.h:62
static constexpr auto kChangeTypeTags
Definition: rpg_state.h:64
std::string message_already
Definition: rpg_state.h:102
int32_t hold_turn
Definition: rpg_state.h:81
int32_t hp_change_val
Definition: rpg_state.h:106
std::string message_recovery
Definition: rpg_state.h:104
static constexpr int kDeathID
Definition: rpg_state.h:27
bool affect_defense
Definition: rpg_state.h:86
int32_t restriction
Definition: rpg_state.h:75
bool cursed
Definition: rpg_state.h:92
@ Persistence_ends
Definition: rpg_state.h:30
@ Persistence_persists
Definition: rpg_state.h:31
int32_t sp_change_map_val
Definition: rpg_state.h:112
int32_t d_rate
Definition: rpg_state.h:79
int32_t priority
Definition: rpg_state.h:74
std::string message_actor
Definition: rpg_state.h:100
int32_t auto_release_prob
Definition: rpg_state.h:82
int32_t type
Definition: rpg_state.h:72
int32_t hp_change_map_steps
Definition: rpg_state.h:107
int32_t hp_change_map_val
Definition: rpg_state.h:108
int32_t c_rate
Definition: rpg_state.h:78
int32_t restrict_skill_level
Definition: rpg_state.h:95
int32_t color
Definition: rpg_state.h:73
bool restrict_skill
Definition: rpg_state.h:94
int32_t sp_change_type
Definition: rpg_state.h:99
int32_t hp_change_type
Definition: rpg_state.h:98
bool avoid_attacks
Definition: rpg_state.h:90
int32_t affect_type
Definition: rpg_state.h:84
int32_t reduce_hit_ratio
Definition: rpg_state.h:89
@ AffectType_nothing
Definition: rpg_state.h:52
@ AffectType_half
Definition: rpg_state.h:50
@ AffectType_double
Definition: rpg_state.h:51
int32_t battler_animation_id
Definition: rpg_state.h:93
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