|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
The rival: their name and chosen starter. More...
#include <rival.h>
Public Member Functions | |
| Rival (SaveFile *saveFile=nullptr) | |
| < Rival's name. | |
| virtual | ~Rival () |
| void | load (SaveFile *saveFile=nullptr) |
| Expand the rival data from the save. | |
| void | save (SaveFile *saveFile) |
| Flatten the rival data to the save. | |
| protected::void | nameChanged () |
| void | starterChanged () |
| void | reset () |
| Blank the rival. | |
| void | randomize () |
| Randomize the rival's name/starter. | |
Public Attributes | |
| QString | name |
| int | starter |
The rival: their name and chosen starter.
A tiny top-level region. starter selects which team the rival battles you with (see the field note – only the three real starters are valid). Standard expanded-node convention (see SaveFileExpanded).
| Rival::Rival | ( | SaveFile * | saveFile = nullptr | ) |
| void Rival::load | ( | SaveFile * | saveFile = nullptr | ) |
Expand the rival data from the save.
Definition at line 37 of file rival.cpp.
References name, nameChanged(), reset(), starter, starterChanged(), and SaveFile::toolset.
Referenced by Rival().
| protected::void Rival::nameChanged | ( | ) |
Referenced by load(), randomize(), and reset().
| void Rival::randomize | ( | ) |
Randomize the rival's name/starter.
Definition at line 70 of file rival.cpp.
References PokemonDB::getIndAt(), PokemonDBEntry::ind, Names::inst(), PokemonDB::inst(), Random::inst(), name, nameChanged(), Names::player(), AbstractRandomString::randomExample(), Random::rangeExclusive(), reset(), starter, and starterChanged().
Referenced by starterChanged().
| void Rival::reset | ( | ) |
Blank the rival.
Definition at line 61 of file rival.cpp.
References name, nameChanged(), starter, and starterChanged().
Referenced by load(), randomize(), and starterChanged().
| void Rival::save | ( | SaveFile * | saveFile | ) |
Flatten the rival data to the save.
Definition at line 53 of file rival.cpp.
References name, SaveFileToolset::setStr(), starter, and SaveFile::toolset.
| void Rival::starterChanged | ( | ) |
References randomize(), and reset().
Referenced by load(), randomize(), and reset().
| QString Rival::name |
| int Rival::starter |