59 std::optional<var8>
pp;
60 std::optional<var8>
tm;
61 std::optional<var8>
hm;
87 static MovesDB*
inst();
89 [[nodiscard]]
const QVector<MoveDBEntry*>
getStore()
const;
90 [[nodiscard]]
const QHash<QString, MoveDBEntry*>
getInd()
const;
100 void qmlProtect(
const QQmlEngine*
const engine)
const;
103 void qmlRegister()
const;
108 QVector<MoveDBEntry*> store;
109 QHash<QString, MoveDBEntry*> ind;
void load()
Load moves from JSON.
void deepLink()
Resolve every move's cross-DB links.
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
int getStoreSize() const
Move count.
const QHash< QString, MoveDBEntry * > getInd() const
Name->entry index.
void index()
Build the name->entry index.
MoveDBEntry * getStoreAt(int idx) const
Move by store index (for QML).
const QVector< MoveDBEntry * > getStore() const
All moves, in load order.
MoveDBEntry * getIndAt(const QString &key) const
Move by name key (for QML).
static MovesDB * inst()
< Number of moves.
Project-wide fixed-width integer aliases (var8, var16, ...).
var8e var8
Everyday 8-bit alias. Exact (not "fastest") to dodge the pointer-width bug noted above.
Import/export macro for the db library, plus the central list of DB entry pointer types declared opaq...
#define DB_AUTOPORT
Expands to the correct dllexport/dllimport decoration for this library.
One item's static data: name/flags, pricing, and where it's used.
One move's static data (type, power, accuracy, PP, TM/HM), with links.
std::optional< var8 > hm
HM number teaching this move, if any.
QVector< struct PokemonDBEntryMove * > toPokemonLearned
Mons that learn this by level-up.
QString type
Type name (resolved to toType).
ItemDBEntry * toItem
Resolved TM/HM item entry (deepLink).
QVector< struct PokemonDBEntry * > toPokemonInitial
Mons that start with this move.
std::optional< var8 > pp
Base PP, if any.
std::optional< var8 > accuracy
Accuracy, if any.
void deepLink()
Resolve cross-DB links (type, item) after load.
TypeDBEntry * toType
Resolved type entry (deepLink).
std::optional< var8 > power
Base power, if any.
QVector< struct PokemonDBEntry * > toPokemonTmHm
Mons that can learn it via TM/HM.
QString readable
Human-readable display name.
std::optional< var8 > tm
TM number teaching this move, if any.
QString name
Internal move name (key).
bool glitch
Whether this is a glitch move.
MoveDBEntry()
Empty entry.
One learnable move of a species, with the level it's learned at.
One species' complete static data – the richest entry in the db layer.
One elemental type: its name plus the moves and Pokemon of that type.