Beispiel #1
0
void pkmviewer::updatestats()
{
    if(redisplayok)
    {
        ui->sbTotalEVs->setValue
                (
                    temppkm->evs.hp +
                    temppkm->evs.attack +
                    temppkm->evs.defense +
                    temppkm->evs.spatk +
                    temppkm->evs.spdef +
                    temppkm->evs.speed
                    );
        ui->sbHP->setValue(getpkmstat(temppkm,Stat_IDs::hp));
        ui->sbAtk->setValue(getpkmstat(temppkm,Stat_IDs::attack));
        ui->sbDef->setValue(getpkmstat(temppkm,Stat_IDs::defense));
        ui->sbSpAtk->setValue(getpkmstat(temppkm,Stat_IDs::spatk));
        ui->sbSpDef->setValue(getpkmstat(temppkm,Stat_IDs::spdef));
        ui->sbSpeed->setValue(getpkmstat(temppkm,Stat_IDs::speed));

        std::string thechar = lookupcharacteristic(temppkm);

        ui->lblCharacteristic->setText(QString::fromStdString(lookupcharacteristic(temppkm)));
    }
}
Beispiel #2
0
bool comparebyhpasc(const pokemon_obj &a, const pokemon_obj &b)
{
	return getpkmstat(a,Stat_IDs::hp) < getpkmstat(b,Stat_IDs::hp);
}
Beispiel #3
0
bool comparebyspdefasc(const pokemon_obj &a, const pokemon_obj &b)
{
	return getpkmstat(a,Stat_IDs::spdef) < getpkmstat(b,Stat_IDs::spdef);
}
Beispiel #4
0
bool comparebydefenseasc(const pokemon_obj &a, const pokemon_obj &b)
{
	return getpkmstat(a,Stat_IDs::defense) < getpkmstat(b,Stat_IDs::defense);
}
Beispiel #5
0
bool comparebyattackasc(const pokemon_obj &a, const pokemon_obj &b)
{
	return getpkmstat(a,Stat_IDs::attack) < getpkmstat(b,Stat_IDs::attack);
}
Beispiel #6
0
//void sortbyspeedascp(std::vector<pokemon_obj>* pkm)
//{
//	std::sort(pkm->begin(), pkm->end(), comparebyspeedascp);
//}
bool comparebyspatkascp(const pokemon_obj *a, const pokemon_obj *b)
{
	return getpkmstat(a,Stat_IDs::spatk) < getpkmstat(b,Stat_IDs::spatk);
}