|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
One move's static data (type, power, accuracy, PP, TM/HM), with links. More...
#include <moves.h>
Public Member Functions | |
| MoveDBEntry () | |
| Empty entry. | |
| MoveDBEntry (QJsonValue &data) | |
| Build from a JSON value. | |
| void | deepLink () |
| Resolve cross-DB links (type, item) after load. | |
Public Attributes | |
| QString | name |
| Internal move name (key). | |
| var8 | ind = 0 |
| Move index/id. | |
| bool | glitch = false |
| Whether this is a glitch move. | |
| QString | type |
| Type name (resolved to toType). | |
| QString | readable |
| Human-readable display name. | |
| std::optional< var8 > | power |
| Base power, if any. | |
| std::optional< var8 > | accuracy |
| Accuracy, if any. | |
| std::optional< var8 > | pp |
| Base PP, if any. | |
| std::optional< var8 > | tm |
| TM number teaching this move, if any. | |
| std::optional< var8 > | hm |
| HM number teaching this move, if any. | |
| TypeDBEntry * | toType = nullptr |
| Resolved type entry (deepLink). | |
| ItemDBEntry * | toItem = nullptr |
| Resolved TM/HM item entry (deepLink). | |
| QVector< struct PokemonDBEntryMove * > | toPokemonLearned |
| Mons that learn this by level-up. | |
| QVector< struct PokemonDBEntry * > | toPokemonInitial |
| Mons that start with this move. | |
| QVector< struct PokemonDBEntry * > | toPokemonTmHm |
| Mons that can learn it via TM/HM. | |
One move's static data (type, power, accuracy, PP, TM/HM), with links.
A "plain struct" DB entry (the other entry style – contrast the QObject-getter style of CreditDBEntry): fields are public and read directly. The std::optional fields are absent for moves that don't have them. The to* pointers are resolved in deepLink() once all DBs are loaded – toType / toItem forward, and the toPokemon* vectors are back-references filled in during PokemonDB's deep-link.
| MoveDBEntry::MoveDBEntry | ( | QJsonValue & | data | ) |
| void MoveDBEntry::deepLink | ( | ) |
Resolve cross-DB links (type, item) after load.
Definition at line 51 of file moves.cpp.
References ItemsDB::getIndAt(), TypesDB::getIndAt(), hm, ItemsDB::inst(), TypesDB::inst(), name, tm, toItem, toType, and type.
| std::optional<var8> MoveDBEntry::accuracy |
| bool MoveDBEntry::glitch = false |
Whether this is a glitch move.
Definition at line 53 of file moves.h.
Referenced by PokemonMove::isInvalid(), MoveDBEntry(), and PokemonMove::randomize().
| std::optional<var8> MoveDBEntry::hm |
HM number teaching this move, if any.
Definition at line 61 of file moves.h.
Referenced by deepLink(), and MoveDBEntry().
| var8 MoveDBEntry::ind = 0 |
Move index/id.
Definition at line 52 of file moves.h.
Referenced by MoveDBEntry(), and PokemonMove::randomize().
| QString MoveDBEntry::name |
Internal move name (key).
Definition at line 51 of file moves.h.
Referenced by deepLink(), and MoveDBEntry().
| std::optional<var8> MoveDBEntry::power |
| std::optional<var8> MoveDBEntry::pp |
| QString MoveDBEntry::readable |
| std::optional<var8> MoveDBEntry::tm |
TM number teaching this move, if any.
Definition at line 60 of file moves.h.
Referenced by deepLink(), and MoveDBEntry().
| ItemDBEntry* MoveDBEntry::toItem = nullptr |
Resolved TM/HM item entry (deepLink).
Definition at line 64 of file moves.h.
Referenced by deepLink().
| QVector<struct PokemonDBEntry*> MoveDBEntry::toPokemonInitial |
| QVector<struct PokemonDBEntryMove*> MoveDBEntry::toPokemonLearned |
| QVector<struct PokemonDBEntry*> MoveDBEntry::toPokemonTmHm |
| TypeDBEntry* MoveDBEntry::toType = nullptr |
Resolved type entry (deepLink).
Definition at line 63 of file moves.h.
Referenced by deepLink(), and PokemonMove::moveType().
| QString MoveDBEntry::type |
Type name (resolved to toType).
Definition at line 54 of file moves.h.
Referenced by deepLink(), and MoveDBEntry().