Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
StarterPokemonDB Class Reference

The curated list of "good starter" species, for the randomizer. More...

#include <starterPokemon.h>

Inheritance diagram for StarterPokemonDB:
Collaboration diagram for StarterPokemonDB:

Public Member Functions

int getStoreSize () const
 Starter-choice count.
PokemonDBEntryrandom3Starter () const
 A random one of the 3 canonical starters.
PokemonDBEntryrandomAnyStarter () const
 A random "startery" species.
void load ()
 Load the starter list from JSON.
void deepLink ()
 Resolve the names to species entries.
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Static Public Member Functions

static StarterPokemonDBinst ()
 < Number of starter choices.

Detailed Description

The curated list of "good starter" species, for the randomizer.

A name list (store) resolved to species (toPokemon) in deepLink(). The first three entries are the canonical in-game starters; the rest are extra "startery"-feeling choices. Powers the randomizer's starter picks (PokemonRandom::Random_Starters3 vs Random_Starters). See db.md.

See also
PokemonDB, PokemonBox::newPokemon().

Definition at line 40 of file starterPokemon.h.

Member Function Documentation

◆ deepLink()

void StarterPokemonDB::deepLink ( )

Resolve the names to species entries.

Definition at line 65 of file starterPokemon.cpp.

References PokemonDB::getIndAt(), and PokemonDB::inst().

◆ getStoreSize()

int StarterPokemonDB::getStoreSize ( ) const
nodiscard

Starter-choice count.

Definition at line 41 of file starterPokemon.cpp.

◆ inst()

StarterPokemonDB * StarterPokemonDB::inst ( )
static

< Number of starter choices.

The process-wide StarterPokemonDB singleton.

Definition at line 35 of file starterPokemon.cpp.

Referenced by PokemonBox::newPokemon(), DB::qmlProtect(), and DB::starters().

◆ load()

void StarterPokemonDB::load ( )

Load the starter list from JSON.

Definition at line 55 of file starterPokemon.cpp.

References GameData::inst(), and GameData::json().

◆ qmlProtect()

void StarterPokemonDB::qmlProtect ( const QQmlEngine *const engine) const

Pin to C++ ownership.

Definition at line 79 of file starterPokemon.cpp.

References Utility::qmlProtectUtil().

Referenced by DB::qmlProtect().

◆ random3Starter()

PokemonDBEntry * StarterPokemonDB::random3Starter ( ) const

A random one of the 3 canonical starters.

Definition at line 43 of file starterPokemon.cpp.

References Random::inst(), and Random::rangeExclusive().

Referenced by PokemonBox::newPokemon().

◆ randomAnyStarter()

PokemonDBEntry * StarterPokemonDB::randomAnyStarter ( ) const

A random "startery" species.

Definition at line 49 of file starterPokemon.cpp.

References Random::inst(), and Random::rangeExclusive().

Referenced by PokemonBox::newPokemon().


The documentation for this class was generated from the following files: