liblcf
Loading...
Searching...
No Matches
rpg_attribute.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_ATTRIBUTE_H
13#define LCF_RPG_ATTRIBUTE_H
14
15// Headers
16#include <stdint.h>
17#include <string>
18#include "enum_tags.h"
19
23namespace RPG {
24 class Attribute {
25 public:
26 enum Type {
28 Type_magical = 1
29 };
30 static constexpr auto kTypeTags = makeEnumTags<Type>(
31 "physical",
32 "magical"
33 );
34
35 int ID = 0;
36 std::string name;
37 int32_t type = 0;
38 int32_t a_rate = 300;
39 int32_t b_rate = 200;
40 int32_t c_rate = 100;
41 int32_t d_rate = 50;
42 int32_t e_rate = 0;
43 };
44
45 inline bool operator==(const Attribute& l, const Attribute& r) {
46 return l.name == r.name
47 && l.type == r.type
48 && l.a_rate == r.a_rate
49 && l.b_rate == r.b_rate
50 && l.c_rate == r.c_rate
51 && l.d_rate == r.d_rate
52 && l.e_rate == r.e_rate;
53 }
54
55 inline bool operator!=(const Attribute& l, const Attribute& r) {
56 return !(l == r);
57 }
58}
59
60#endif
static constexpr auto kTypeTags
Definition: rpg_attribute.h:30
std::string name
Definition: rpg_attribute.h:36
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