2019-06-13 03:20:28 +01:00
|
|
|
//
|
|
|
|
|
|
|
|
#include "wildmoninfo.h"
|
2019-06-25 18:52:00 +01:00
|
|
|
#include "montabwidget.h"
|
2019-06-13 03:20:28 +01:00
|
|
|
#include "project.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-14 00:36:32 +01:00
|
|
|
// TODO: remove this necessity
|
2019-06-13 03:20:28 +01:00
|
|
|
static QMap<int, QString> landPercentages = QMap<int, QString>({
|
|
|
|
{1, "20"}, {2, "20"},
|
|
|
|
{3, "10"}, {4, "10"}, {5, "10"}, {6, "10"},
|
|
|
|
{7, "5"}, {8, "5"},
|
|
|
|
{9, "4"}, {10, "4"},
|
|
|
|
{11, "1"}, {12, "1"}
|
|
|
|
});
|
|
|
|
|
|
|
|
void clearTabWidget(QLayout *tab) {
|
|
|
|
QLayoutItem *item = tab->itemAt(0);
|
|
|
|
if (item) tab->removeItem(item);
|
|
|
|
}
|
|
|
|
|
2019-06-25 18:52:00 +01:00
|
|
|
WildMonInfo getDefaultMonInfo(Field field) {
|
|
|
|
WildMonInfo newInfo;
|
|
|
|
newInfo.active = true;
|
|
|
|
newInfo.encounterRate = 0;
|
2019-06-13 03:20:28 +01:00
|
|
|
|
2019-06-25 18:52:00 +01:00
|
|
|
for (int row : field.second)
|
|
|
|
newInfo.wildPokemon.append({5, 5, "SPECIES_NONE"});
|
2019-06-13 03:20:28 +01:00
|
|
|
|
2019-06-25 18:52:00 +01:00
|
|
|
return newInfo;
|
2019-06-13 03:20:28 +01:00
|
|
|
}
|
|
|
|
|
2019-06-13 17:14:49 +01:00
|
|
|
|