152 static PokemonDB*
inst();
154 [[nodiscard]]
const QVector<PokemonDBEntry*>
getStore()
const;
155 [[nodiscard]]
const QHash<QString, PokemonDBEntry*>
getInd()
const;
165 void qmlProtect(
const QQmlEngine*
const engine)
const;
168 void qmlRegister()
const;
173 QVector<PokemonDBEntry*> store;
174 QHash<QString, PokemonDBEntry*> ind;
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
static PokemonDB * inst()
< Number of species.
void deepLink()
Resolve every species' cross-reference web.
PokemonDBEntry * getStoreAt(int idx) const
Species by store index (for QML).
int getStoreSize() const
Species count.
const QHash< QString, PokemonDBEntry * > getInd() const
Name->species index.
void index()
Build the name->species index.
const QVector< PokemonDBEntry * > getStore() const
All species.
void load()
Load species from JSON.
PokemonDBEntry * getIndAt(const QString &key) const
Species by name key (for QML).
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.
constexpr var8 pokemonDexCount
Number of species.
constexpr var8 pokemonLevelMax
Maximum level.
One real-world event-distribution Pokemon preset.
One Game Corner prize: a Pokemon or item, its coin price, and level.
One item's static data: name/flags, pricing, and where it's used.
A map sprite that is a static, battleable Pokemon (type POKEMON).
One wild-encounter slot in a map's encounter table: species + level.
One move's static data (type, power, accuracy, PP, TM/HM), with links.
One evolution edge of a species: how it evolves (and de-evolves).
QString item
Evolution item, if any.
void deepLink(PokemonDBEntry *deEvolution)
Resolve target/item; set deEvolution back-link.
std::optional< var8 > level
Evolution level, if level-based.
PokemonDBEntry * toDeEvolution
Resolved pre-evolution.
PokemonDBEntry * toEvolution
Resolved evolved species.
ItemDBEntry * toItem
Resolved evolution item.
QString toName
Name of the species this evolves into.
PokemonDBEntry * parent
Owning species.
PokemonDBEntryEvolution()
Empty edge.
bool trade
Evolves on trade.
void deepLink()
Resolve the move link.
PokemonDBEntryMove()
Empty learn entry.
QString move
Move name (resolved to toMove).
MoveDBEntry * toMove
Resolved move.
var8 level
Level the move is learned at.
PokemonDBEntry * parent
Owning species.
One species' complete static data – the richest entry in the db layer.
QVector< GameCornerDBEntry * > toGameCorner
Game Corner prizes of this species.
QString type1
Primary type name (resolved to toType1).
PokemonDBEntry()
Empty species.
bool glitch
Whether this is a glitch species.
std::optional< var8 > baseHp
Base HP.
QVector< ItemDBEntry * > toTmHmItem
Resolved TM/HM items.
QString type2
Secondary type name (resolved to toType2).
std::optional< var8 > baseDefense
Base Defense.
MapDBEntrySpritePokemon * toMapSpritePokemon
On-map static-Pokemon sprite, if any.
std::optional< var8 > catchRate
Catch rate.
QVector< MoveDBEntry * > toTmHmMove
Resolved TM/HM moves.
std::optional< var8 > growthRate
EXP growth-rate group.
PokemonDBEntry * toDeEvolution
Resolved pre-evolution.
QString name
Internal species name (key).
QVector< PokemonDBEntryMove * > moves
Level-up learnset.
void deepLink()
Resolve the full cross-reference web (the to* members).
std::optional< var8 > baseSpeed
Base Speed.
QVector< MoveDBEntry * > toInitial
Resolved capture moves.
var8 ind
Internal species index.
QVector< var8 > tmHm
TM/HM numbers it can learn.
std::optional< var8 > baseSpecial
Base Special.
QVector< QString > initial
Moves known at capture (resolved to toInitial).
QVector< TradeDBEntry * > toTrades
In-game trades giving/getting it.
QString readable
Human-readable species name.
std::optional< var8 > baseExpYield
Base EXP yield.
QVector< PokemonDBEntryEvolution * > evolution
Evolution edges.
QVector< EventPokemonDBEntry * > toEventMons
Event distributions of this species.
TypeDBEntry * toType1
Resolved primary type.
TypeDBEntry * toType2
Resolved secondary type.
QVector< MapDBEntryWildMon * > toWildMonMaps
Maps where it appears wild.
std::optional< var8 > baseAttack
Base Attack.
std::optional< var8 > pokedex
Pokedex number, if assigned.
One in-game (NPC) trade definition: what you give and get.
One elemental type: its name plus the moves and Pokemon of that type.