summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-06-02 01:50:47 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-06-02 01:50:47 +0000
commit87bc8b43600937a3d83cbdf8345e23a484755e3a (patch)
tree661131614ed841f68ab8cc23ea372983d49fbe20
parentf3e081acd87439efadd5ff4181916e06cc07f051 (diff)
downloadsigen-87bc8b43600937a3d83cbdf8345e23a484755e3a.tar.gz
sigen-87bc8b43600937a3d83cbdf8345e23a484755e3a.tar.xz
sigen-87bc8b43600937a3d83cbdf8345e23a484755e3a.zip
[FIX] Modified Rules a bit
[FIX] Updated Rules widget to match up with Rules [FIX] Reorganized the Rules widget [FIX] Using KStandardDirs rather than hardcoded ones [FIX] Cleaned up some minor things with KListWidgets git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@188 6ecfd1a5-f3ed-3746-8530-beee90d26b22
-rw-r--r--Changelog11
-rw-r--r--pokemod/Map.cpp1
-rw-r--r--pokemod/MapTrainerTeamMember.cpp145
-rw-r--r--pokemod/MapTrainerTeamMember.h12
-rw-r--r--pokemod/Pokemod.cpp54
-rw-r--r--pokemod/Pokemod.h2
-rw-r--r--pokemod/Rules.cpp108
-rw-r--r--pokemod/Rules.h24
-rw-r--r--pokemod/Species.cpp101
-rw-r--r--pokemod/Store.cpp11
-rw-r--r--pokemod/TODO2
-rw-r--r--pokemod/Trainer.cpp16
-rw-r--r--pokemod/Trainer.h13
-rw-r--r--pokemodr/MapTrainerTeamMemberUI.cpp90
-rw-r--r--pokemodr/MapTrainerTeamMemberUI.h4
-rw-r--r--pokemodr/MoveUI.cpp2
-rw-r--r--pokemodr/PokeModr.cpp5
-rw-r--r--pokemodr/RulesUI.cpp138
-rw-r--r--pokemodr/RulesUI.h27
-rw-r--r--pokemodr/SpeciesUI.cpp12
-rw-r--r--pokemodr/SpeciesUI.h2
-rw-r--r--pokemodr/TODO9
-rw-r--r--pokemodr/gui/maptrainerteammember.ui49
-rw-r--r--pokemodr/gui/pokemod.ui3
-rw-r--r--pokemodr/gui/rules.ui393
-rw-r--r--pokemodr/gui/species.ui3
26 files changed, 722 insertions, 515 deletions
diff --git a/Changelog b/Changelog
index 670533f1..a3dfd519 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,15 @@
-----------------
+Rev: 188
+Date: 1 June 2008
+User: MathStuf
+-----------------
+[FIX] Modified Rules a bit
+[FIX] Updated Rules widget to match up with Rules
+[FIX] Reorganized the Rules widget
+[FIX] Using KStandardDirs rather than hardcoded ones
+[FIX] Cleaned up some minor things with KListWidgets
+
+-----------------
Rev: 187
Date: 1 June 2008
User: MathStuf
diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp
index 8c388861..5979a045 100644
--- a/pokemod/Map.cpp
+++ b/pokemod/Map.cpp
@@ -63,7 +63,6 @@ Map::~Map()
void Map::validate()
{
- // TODO: validate that every tile that can have a wild encounter has a list to go along with it
if (m_name.isEmpty())
emit(error("Name is empty"));
TEST(setFlyWarp, flyWarp);
diff --git a/pokemod/MapTrainerTeamMember.cpp b/pokemod/MapTrainerTeamMember.cpp
index e82072eb..da8c962f 100644
--- a/pokemod/MapTrainerTeamMember.cpp
+++ b/pokemod/MapTrainerTeamMember.cpp
@@ -24,6 +24,7 @@
#include "Pokemod.h"
#include "Rules.h"
#include "Species.h"
+#include "SpeciesMove.h"
// Qt includes
#include <QSet>
@@ -37,8 +38,7 @@ MapTrainerTeamMember::MapTrainerTeamMember(const MapTrainerTeamMember& teamMembe
MapTrainerTeamMember::MapTrainerTeamMember(const MapTrainer* parent, const int id) :
Object("MapTrainerTeamMember", parent, id),
m_species(INT_MAX),
- m_level(INT_MAX),
- m_nature(INT_MAX)
+ m_level(INT_MAX)
{
}
@@ -58,16 +58,18 @@ void MapTrainerTeamMember::validate()
{
TEST(setSpecies, species);
TEST(setLevel, level);
- if (m_item.size() <= static_cast<const Pokemod*>(pokemod())->rules()->holdItems())
- {
- TEST_LIST(setItem, item);
- }
- else
+ if (static_cast<const Pokemod*>(pokemod())->rules()->maxAbilities() < m_ability.size())
+ emit(error("Too many abilities"));
+ TEST_LIST(setAbility, ability);
+ if (static_cast<const Pokemod*>(pokemod())->rules()->maxHeldItems() < m_item.size())
emit(error("Too many held items"));
- if (static_cast<const Pokemod*>(pokemod())->rules()->natureAllowed())
- {
- TEST(setNature, nature);
- }
+ TEST_LIST(setItem, item);
+ if (static_cast<const Pokemod*>(pokemod())->rules()->maxMoves() < m_move.size())
+ emit(error("Too many moves"));
+ TEST_LIST(setMove, move);
+ if (static_cast<const Pokemod*>(pokemod())->rules()->maxNatures() < m_nature.size())
+ emit(error("Too many natures"));
+ TEST_LIST(setNature, nature);
}
void MapTrainerTeamMember::load(const QDomElement& xml, int id)
@@ -75,8 +77,10 @@ void MapTrainerTeamMember::load(const QDomElement& xml, int id)
LOAD_ID();
LOAD(int, species);
LOAD(int, level);
- LOAD(int, nature);
- LOAD_LIST(int, item)
+ LOAD_LIST(int, ability);
+ LOAD_LIST(int, item);
+ LOAD_LIST(int, move);
+ LOAD_LIST(int, nature);
}
QDomElement MapTrainerTeamMember::save() const
@@ -84,8 +88,10 @@ QDomElement MapTrainerTeamMember::save() const
SAVE_CREATE();
SAVE(int, species);
SAVE(int, level);
- SAVE(int, nature);
+ SAVE_LIST(int, ability);
SAVE_LIST(int, item);
+ SAVE_LIST(int, move);
+ SAVE_LIST(int, nature);
return xml;
}
@@ -109,6 +115,30 @@ void MapTrainerTeamMember::setLevel(const int level)
CHECK(level);
}
+void MapTrainerTeamMember::setAbility(const int ability, const bool state)
+{
+ if (static_cast<const Pokemod*>(pokemod())->abilityIndex(ability) == INT_MAX)
+ {
+ emit(error(bounds("ability")));
+ return;
+ }
+ if (state && !m_ability.contains(ability))
+ {
+ if (m_ability.size() < static_cast<const Pokemod*>(pokemod())->rules()->maxAbilities())
+ {
+ m_ability.append(ability);
+ emit(changed());
+ }
+ else
+ emit(error("Cannot have any more abilities"));
+ }
+ else if (m_ability.contains(ability))
+ {
+ m_ability.removeAll(ability);
+ emit(changed());
+ }
+}
+
void MapTrainerTeamMember::setItem(const int item, const bool state)
{
if (static_cast<const Pokemod*>(pokemod())->itemIndex(item) == INT_MAX)
@@ -116,34 +146,79 @@ void MapTrainerTeamMember::setItem(const int item, const bool state)
emit(error(bounds("item")));
return;
}
- if (state)
+ if (state && !m_item.contains(item))
{
- if (!m_item.contains(item))
+ if (m_item.size() < static_cast<const Pokemod*>(pokemod())->rules()->maxHeldItems())
{
- if (m_item.size() < static_cast<const Pokemod*>(pokemod())->rules()->holdItems())
+ m_item.append(item);
+ emit(changed());
+ }
+ else
+ emit(error("Cannot hold any more items"));
+ }
+ else if (m_item.contains(item))
+ {
+ m_item.removeAll(item);
+ emit(changed());
+ }
+}
+
+void MapTrainerTeamMember::setMove(const int move, const bool state)
+{
+ if (static_cast<const Pokemod*>(pokemod())->moveIndex(move) == INT_MAX)
+ {
+ emit(error(bounds("move")));
+ return;
+ }
+ if (state && !m_move.contains(move))
+ {
+ const Species* species = static_cast<const Pokemod*>(pokemod())->speciesById(move);
+ for (int i = 0; i < species->moveCount(); ++i)
+ {
+ const SpeciesMove* speciesMove = species->move(i);
+ if (speciesMove->move() == move)
{
- m_item.append(item);
- emit(changed());
+ if (m_move.size() < static_cast<const Pokemod*>(pokemod())->rules()->maxMoves())
+ {
+ m_move.append(move);
+ emit(changed());
+ return;
+ }
+ else
+ emit(error("Cannot know any more moves"));
}
- else
- emit(error("Cannot hold any more items"));
}
+ emit(error("Cannot learn the move"));
}
- else
+ else if (m_move.contains(move))
{
- m_item.removeAll(item);
+ m_move.removeAll(move);
emit(changed());
}
}
-void MapTrainerTeamMember::setNature(const int nature)
+void MapTrainerTeamMember::setNature(const int nature, const bool state)
{
- if (!static_cast<const Pokemod*>(pokemod())->rules()->natureAllowed() || (static_cast<const Pokemod*>(pokemod())->natureIndex(nature) == INT_MAX))
+ if (static_cast<const Pokemod*>(pokemod())->natureIndex(nature) == INT_MAX)
{
emit(error(bounds("nature")));
return;
}
- CHECK(nature);
+ if (state && !m_nature.contains(nature))
+ {
+ if (m_nature.size() < static_cast<const Pokemod*>(pokemod())->rules()->maxNatures())
+ {
+ m_nature.append(nature);
+ emit(changed());
+ }
+ else
+ emit(error("Cannot have any more natures"));
+ }
+ else if (m_nature.contains(nature))
+ {
+ m_nature.removeAll(nature);
+ emit(changed());
+ }
}
int MapTrainerTeamMember::species() const
@@ -156,9 +231,9 @@ int MapTrainerTeamMember::level() const
return m_level;
}
-int MapTrainerTeamMember::nature() const
+bool MapTrainerTeamMember::ability(const int ability) const
{
- return m_nature;
+ return m_ability.contains(ability);
}
bool MapTrainerTeamMember::item(const int item) const
@@ -166,13 +241,25 @@ bool MapTrainerTeamMember::item(const int item) const
return m_item.contains(item);
}
+bool MapTrainerTeamMember::move(const int move) const
+{
+ return m_move.contains(move);
+}
+
+bool MapTrainerTeamMember::nature(const int nature) const
+{
+ return m_nature.contains(nature);
+}
+
MapTrainerTeamMember& MapTrainerTeamMember::operator=(const MapTrainerTeamMember& rhs)
{
if (this == &rhs)
return *this;
COPY(species);
COPY(level);
- COPY(nature);
+ COPY(ability);
COPY(item);
+ COPY(move);
+ COPY(nature);
return *this;
}
diff --git a/pokemod/MapTrainerTeamMember.h b/pokemod/MapTrainerTeamMember.h
index c0b30e59..10176410 100644
--- a/pokemod/MapTrainerTeamMember.h
+++ b/pokemod/MapTrainerTeamMember.h
@@ -44,20 +44,26 @@ class MapTrainerTeamMember : public Object
void setSpecies(const int species);
void setLevel(const int level);
- void setNature(const int nature);
+ void setAbility(const int ability, const bool state);
void setItem(const int item, const bool state);
+ void setMove(const int move, const bool state);
+ void setNature(const int nature, const bool state);
int species() const;
int level() const;
- int nature() const;
+ bool ability(const int ability) const;
bool item(const int item) const;
+ bool move(const int move) const;
+ bool nature(const int nature) const;
MapTrainerTeamMember& operator=(const MapTrainerTeamMember& p);
private:
int m_species;
int m_level;
- int m_nature;
+ QList<int> m_ability;
QList<int> m_item;
+ QList<int> m_move;
+ QList<int> m_nature;
};
#endif
diff --git a/pokemod/Pokemod.cpp b/pokemod/Pokemod.cpp
index 88d244dc..2d5b4d77 100644
--- a/pokemod/Pokemod.cpp
+++ b/pokemod/Pokemod.cpp
@@ -109,23 +109,20 @@ void Pokemod::validate()
QSet<int> idChecker;
QSet<QString> nameChecker;
QSet<int> timeChecker;
- if (m_rules->abilityAllowed())
+ if (abilityCount() < m_rules->maxAbilities())
+ emit(error("There are too few abilities"));
+ foreach (Ability* ability, m_abilities)
{
- if (!abilityCount())
- emit(error("There are no abilities"));
- foreach (Ability* ability, m_abilities)
- {
- ability->validate();
- if (idChecker.contains(ability->id()))
- emit(error(subclass("ability", ability->id())));
- idChecker.insert(ability->id());
- if (nameChecker.contains(ability->name()))
- emit(error(subclass("ability", ability->name())));
- nameChecker.insert(ability->name());
- }
- idChecker.clear();
- nameChecker.clear();
+ ability->validate();
+ if (idChecker.contains(ability->id()))
+ emit(error(subclass("ability", ability->id())));
+ idChecker.insert(ability->id());
+ if (nameChecker.contains(ability->name()))
+ emit(error(subclass("ability", ability->name())));
+ nameChecker.insert(ability->name());
}
+ idChecker.clear();
+ nameChecker.clear();
if (!authorCount())
emit(error("There are no authors"));
foreach (Author* author, m_authors)
@@ -255,23 +252,20 @@ void Pokemod::validate()
}
idChecker.clear();
nameChecker.clear();
- if (m_rules->natureAllowed())
+ if (natureCount() < m_rules->maxNatures())
+ emit(error("There are too few natures"));
+ foreach (Nature* nature, m_natures)
{
- if (!natureCount())
- emit(error("There are no natures"));
- foreach (Nature* nature, m_natures)
- {
- nature->validate();
- if (idChecker.contains(nature->id()))
- emit(error(subclass("ability", nature->id())));
- idChecker.insert(nature->id());
- if (nameChecker.contains(nature->name()))
- emit(error(subclass("nature", nature->name())));
- nameChecker.insert(nature->name());
- }
- idChecker.clear();
- nameChecker.clear();
+ nature->validate();
+ if (idChecker.contains(nature->id()))
+ emit(error(subclass("ability", nature->id())));
+ idChecker.insert(nature->id());
+ if (nameChecker.contains(nature->name()))
+ emit(error(subclass("nature", nature->name())));
+ nameChecker.insert(nature->name());
}
+ idChecker.clear();
+ nameChecker.clear();
if (!soundCount())
emit(error("There are no sounds"));
foreach (Sound* sound, m_sounds)
diff --git a/pokemod/Pokemod.h b/pokemod/Pokemod.h
index 3ebcb746..54c00295 100644
--- a/pokemod/Pokemod.h
+++ b/pokemod/Pokemod.h
@@ -73,7 +73,7 @@ class Pokemod : public Object
ST_End_GSC = 6,
ST_Accuracy = 6,
ST_Evasion = 7,
- ST_End_Battle = 8,
+ ST_End_Battle = 8
};
static const QStringList StatRBYStr;
static const QStringList StatGSCStr;
diff --git a/pokemod/Rules.cpp b/pokemod/Rules.cpp
index 22988f40..21f2b428 100644
--- a/pokemod/Rules.cpp
+++ b/pokemod/Rules.cpp
@@ -33,17 +33,19 @@ Rules::Rules(const Pokemod* parent) :
Object("Rules", parent, 0),
m_genderAllowed(false),
m_breedingAllowed(false),
- m_holdItems(0),
m_criticalDomains(false),
- m_abilityAllowed(false),
- m_natureAllowed(false),
+ m_maxMultiplier(1),
m_numBoxes(0),
m_boxSize(1),
m_maxParty(1),
m_maxFight(1),
m_maxPlayers(2),
+ m_maxHeldItems(0),
+ m_maxAbilities(0),
+ m_maxNatures(0),
m_maxMoves(1),
m_maxLevel(1),
+ m_maxStages(6),
m_maxMoney(0),
m_hardCash(false),
m_allowSwitchStyle(false),
@@ -76,6 +78,7 @@ Rules::Rules(const QDomElement& xml, const Pokemod* parent) :
void Rules::validate()
{
TEST(setBreedingAllowed, breedingAllowed);
+ TEST(setMaxMultiplier, maxMultiplier);
TEST(setNumBoxes, numBoxes);
TEST(setBoxSize, boxSize);
TEST(setMaxParty, maxParty);
@@ -99,17 +102,19 @@ void Rules::load(const QDomElement& xml, const int /*id*/)
{
LOAD(bool, genderAllowed);
LOAD(bool, breedingAllowed);
- LOAD(int, holdItems);
LOAD(bool, criticalDomains);
- LOAD(bool, abilityAllowed);
- LOAD(bool, natureAllowed);
+ LOAD(int, maxMultiplier);
LOAD(int, numBoxes);
LOAD(int, boxSize);
LOAD(int, maxParty);
LOAD(int, maxFight);
LOAD(int, maxPlayers);
+ LOAD(int, maxHeldItems);
+ LOAD(int, maxAbilities);
+ LOAD(int, maxNatures);
LOAD(int, maxMoves);
LOAD(int, maxLevel);
+ LOAD(int, maxStages);
LOAD(int, maxMoney);
LOAD(bool, hardCash);
LOAD(bool, allowSwitchStyle);
@@ -131,17 +136,19 @@ QDomElement Rules::save() const
QDomElement xml = QDomDocument().createElement(className());
SAVE(bool, genderAllowed);
SAVE(bool, breedingAllowed);
- SAVE(int, holdItems);
SAVE(bool, criticalDomains);
- SAVE(bool, abilityAllowed);
- SAVE(bool, natureAllowed);
+ SAVE(int, maxMultiplier);
SAVE(int, numBoxes);
SAVE(int, boxSize);
SAVE(int, maxParty);
SAVE(int, maxFight);
SAVE(int, maxPlayers);
+ SAVE(int, maxHeldItems);
+ SAVE(int, maxAbilities);
+ SAVE(int, maxNatures);
SAVE(int, maxMoves);
SAVE(int, maxLevel);
+ SAVE(int, maxStages);
SAVE(int, maxMoney);
SAVE(bool, hardCash);
SAVE(bool, allowSwitchStyle);
@@ -174,24 +181,19 @@ void Rules::setBreedingAllowed(const bool breedingAllowed)
CHECK(breedingAllowed);
}
-void Rules::setHoldItems(const int holdItems)
-{
- CHECK(holdItems);
-}
-
void Rules::setCriticalDomains(const bool criticalDomains)
{
CHECK(criticalDomains);
}
-void Rules::setAbilityAllowed(const bool abilityAllowed)
-{
- CHECK(abilityAllowed);
-}
-
-void Rules::setNatureAllowed(const bool natureAllowed)
+void Rules::setMaxMultiplier(const int maxMultiplier)
{
- CHECK(natureAllowed);
+ if (!maxMultiplier)
+ {
+ emit(error(bounds("maxMultiplier")));
+ return;
+ }
+ CHECK(maxMultiplier);
}
void Rules::setNumBoxes(const int numBoxes)
@@ -231,7 +233,7 @@ void Rules::setMaxFight(const int maxFight)
void Rules::setMaxPlayers(const int maxPlayers)
{
- if (!maxPlayers)
+ if (maxPlayers < 2)
{
emit(error(bounds("maxPlayers")));
return;
@@ -239,6 +241,21 @@ void Rules::setMaxPlayers(const int maxPlayers)
CHECK(maxPlayers);
}
+void Rules::setMaxHeldItems(const int maxHeldItems)
+{
+ CHECK(maxHeldItems);
+}
+
+void Rules::setMaxAbilities(const int maxAbilities)
+{
+ CHECK(maxAbilities);
+}
+
+void Rules::setMaxNatures(const int maxNatures)
+{
+ CHECK(maxNatures);
+}
+
void Rules::setMaxMoves(const int maxMoves)
{
if (!maxMoves)
@@ -259,6 +276,11 @@ void Rules::setMaxLevel(const int maxLevel)
CHECK(maxLevel);
}
+void Rules::setMaxStages(const int maxStages)
+{
+ CHECK(maxStages);
+}
+
void Rules::setMaxMoney(const int maxMoney)
{
CHECK(maxMoney);
@@ -364,24 +386,14 @@ bool Rules::breedingAllowed() const
return m_breedingAllowed;
}
-int Rules::holdItems() const
-{
- return m_holdItems;
-}
-
bool Rules::criticalDomains() const
{
return m_criticalDomains;
}
-bool Rules::abilityAllowed() const
-{
- return m_abilityAllowed;
-}
-
-bool Rules::natureAllowed() const
+int Rules::maxMultiplier() const
{
- return m_natureAllowed;
+ return m_maxMultiplier;
}
int Rules::numBoxes() const
@@ -409,6 +421,21 @@ int Rules::maxPlayers() const
return m_maxPlayers;
}
+int Rules::maxHeldItems() const
+{
+ return m_maxHeldItems;
+}
+
+int Rules::maxAbilities() const
+{
+ return m_maxAbilities;
+}
+
+int Rules::maxNatures() const
+{
+ return m_maxNatures;
+}
+
int Rules::maxMoves() const
{
return m_maxMoves;
@@ -419,6 +446,11 @@ int Rules::maxLevel() const
return m_maxLevel;
}
+int Rules::maxStages() const
+{
+ return m_maxStages;
+}
+
int Rules::maxMoney() const
{
return m_maxMoney;
@@ -495,17 +527,19 @@ Rules& Rules::operator=(const Rules& rhs)
return *this;
COPY(genderAllowed);
COPY(breedingAllowed);
- COPY(holdItems);
COPY(criticalDomains);
- COPY(abilityAllowed);
- COPY(natureAllowed);
+ COPY(maxMultiplier);
COPY(numBoxes);
COPY(boxSize);
COPY(maxParty);
COPY(maxFight);
COPY(maxPlayers);
+ COPY(maxHeldItems);
+ COPY(maxAbilities);
+ COPY(maxNatures);
COPY(maxMoves);
COPY(maxLevel);
+ COPY(maxStages);
COPY(maxMoney);
COPY(hardCash);
COPY(allowSwitchStyle);
diff --git a/pokemod/Rules.h b/pokemod/Rules.h
index 8dabc683..1dad0b0b 100644
--- a/pokemod/Rules.h
+++ b/pokemod/Rules.h
@@ -44,17 +44,19 @@ class Rules : public Object
void setGenderAllowed(const bool genderAllowed);
void setBreedingAllowed(const bool breedingAllowed);
- void setHoldItems(const int holdItems);
void setCriticalDomains(const bool criticalDomains);
- void setAbilityAllowed(const bool abilityAllowed);
- void setNatureAllowed(const bool natureAllowed);
+ void setMaxMultiplier(const int maxMultiplier);
void setNumBoxes(const int numBoxes);
void setBoxSize(const int boxSize);
void setMaxParty(const int maxParty);
void setMaxFight(const int maxFight);
void setMaxPlayers(const int maxPlayers);
+ void setMaxHeldItems(const int maxHeldItems);
+ void setMaxAbilities(const int maxAbilities);
+ void setMaxNatures(const int maxNatures);
void setMaxMoves(const int maxMoves);
void setMaxLevel(const int maxLevel);
+ void setMaxStages(const int maxStage);
void setMaxMoney(const int maxMoney);
void setHardCash(const bool hardCash);
void setAllowSwitchStyle(const bool allowSwitchStyle);
@@ -72,17 +74,19 @@ class Rules : public Object
bool genderAllowed() const;
bool breedingAllowed() const;
- int holdItems() const;
bool criticalDomains() const;
- bool abilityAllowed() const;
- bool natureAllowed() const;
+ int maxMultiplier() const;
int numBoxes() const;
int boxSize() const;
int maxParty() const;
int maxFight() const;
int maxPlayers() const;
+ int maxHeldItems() const;
+ int maxAbilities() const;
+ int maxNatures() const;
int maxMoves() const;
int maxLevel() const;
+ int maxStages() const;
int maxMoney() const;
bool hardCash() const;
bool allowSwitchStyle() const;
@@ -102,17 +106,19 @@ class Rules : public Object
private:
bool m_genderAllowed;
bool m_breedingAllowed;
- int m_holdItems;
bool m_criticalDomains;
- bool m_abilityAllowed;
- bool m_natureAllowed;
+ int m_maxMultiplier;
int m_numBoxes;
int m_boxSize;
int m_maxParty;
int m_maxFight;
int m_maxPlayers;
+ int m_maxHeldItems;
+ int m_maxAbilities;
+ int m_maxNatures;
int m_maxMoves;
int m_maxLevel;
+ int m_maxStages;
int m_maxMoney;
bool m_hardCash;
bool m_allowSwitchStyle;
diff --git a/pokemod/Species.cpp b/pokemod/Species.cpp
index 88226bce..ce9ac1ff 100644
--- a/pokemod/Species.cpp
+++ b/pokemod/Species.cpp
@@ -119,40 +119,34 @@ void Species::validate()
TEST_LIST(setEggGroup, eggGroup);
QSet<int> idChecker;
QSet<int> valueChecker;
- if (static_cast<const Pokemod*>(pokemod())->rules()->abilityAllowed())
- {
- if (!abilityCount())
- emit(warning("There are no abilities"));
- foreach (SpeciesAbility* ability, m_abilities)
- {
- ability->validate();
- if (idChecker.contains(ability->id()))
- emit(error(subclass("ability", ability->id())));
- idChecker.insert(ability->id());
- if (valueChecker.contains(ability->ability()))
- emit(error(subclass("ability", ability->ability())));
- valueChecker.insert(ability->ability());
- }
- idChecker.clear();
- valueChecker.clear();
- }
- if (static_cast<const Pokemod*>(pokemod())->rules()->holdItems())
- {
- if (!itemCount())
- emit(warning("There are no items"));
- foreach (SpeciesItem* item, m_items)
- {
- item->validate();
- if (idChecker.contains(item->id()))
- emit(error(subclass("item", item->id())));
- idChecker.insert(item->id());
- if (valueChecker.contains(item->item()))
- emit(error(subclass("item", item->item())));
- valueChecker.insert(item->item());
- }
- idChecker.clear();
- valueChecker.clear();
- }
+ if (abilityCount() < static_cast<const Pokemod*>(pokemod())->rules()->maxAbilities())
+ emit(warning("There are too few abilities"));
+ foreach (SpeciesAbility* ability, m_abilities)
+ {
+ ability->validate();
+ if (idChecker.contains(ability->id()))
+ emit(error(subclass("ability", ability->id())));
+ idChecker.insert(ability->id());
+ if (valueChecker.contains(ability->ability()))
+ emit(error(subclass("ability", ability->ability())));
+ valueChecker.insert(ability->ability());
+ }
+ idChecker.clear();
+ valueChecker.clear();
+ if (static_cast<const Pokemod*>(pokemod())->rules()->maxHeldItems() && !itemCount())
+ emit(warning("There are no items"));
+ foreach (SpeciesItem* item, m_items)
+ {
+ item->validate();
+ if (idChecker.contains(item->id()))
+ emit(error(subclass("item", item->id())));
+ idChecker.insert(item->id());
+ if (valueChecker.contains(item->item()))
+ emit(error(subclass("item", item->item())));
+ valueChecker.insert(item->item());
+ }
+ idChecker.clear();
+ valueChecker.clear();
if (!moveCount())
emit(error("There are no moves"));
foreach (SpeciesMove* move, m_moves)
@@ -387,6 +381,11 @@ void Species::setFrontFemaleSprite(const QPixmap& frontFemaleSprite)
emit(error("Cannot be female"));
return;
}
+ if (1 < m_genderFactor)
+ {
+ emit(error("Genderless uses male sprites"));
+ return;
+ }
if (frontFemaleSprite.size() != QSize(128, 128))
{
emit(error(size("frontFemaleSprite")));
@@ -408,6 +407,11 @@ void Species::setBackFemaleSprite(const QPixmap& backFemaleSprite)
emit(error("Cannot be female"));
return;
}
+ if (1 < m_genderFactor)
+ {
+ emit(error("Genderless uses male sprites"));
+ return;
+ }
if (backFemaleSprite.size() != QSize(128, 128))
{
emit(error(size("backFemaleSprite")));
@@ -430,11 +434,6 @@ void Species::setListSprite(const QPixmap& listSprite)
void Species::setGenderFactor(const Fraction& genderFactor)
{
- if (1 < genderFactor)
- {
- emit(error(bounds("genderFactor")));
- return;
- }
CHECK(genderFactor);
}
@@ -465,15 +464,12 @@ void Species::setType(const int type, const bool state)
emit(error(bounds("type")));
return;
}
- if (state)
+ if (state && !m_type.contains(type))
{
- if (!m_type.contains(type))
- {
- m_type.append(type);
- emit(changed());
- }
+ m_type.append(type);
+ emit(changed());
}
- else
+ else if (m_type.contains(type))
{
m_type.removeAll(type);
emit(changed());
@@ -484,18 +480,15 @@ void Species::setEggGroup(const int eggGroup, const bool state)
{
if (static_cast<const Pokemod*>(pokemod())->eggGroupIndex(eggGroup) == INT_MAX)
{
- emit(error(bounds("eggGroup")));
+ emit(error(bounds("egg group")));
return;
}
- if (state)
+ if (state && !m_eggGroup.contains(eggGroup))
{
- if (!m_eggGroup.contains(eggGroup))
- {
- m_eggGroup.append(eggGroup);
- emit(changed());
- }
+ m_eggGroup.append(eggGroup);
+ emit(changed());
}
- else
+ else if (m_eggGroup.contains(eggGroup))
{
m_eggGroup.removeAll(eggGroup);
emit(changed());
diff --git a/pokemod/Store.cpp b/pokemod/Store.cpp
index a8ba35d8..10c40dbd 100644
--- a/pokemod/Store.cpp
+++ b/pokemod/Store.cpp
@@ -82,15 +82,12 @@ void Store::setItem(const int item, const bool state)
emit(error(bounds("item")));
return;
}
- if (state)
+ if (state && !m_item.contains(item))
{
- if (!m_item.contains(item))
- {
- m_item.append(item);
- emit(changed());
- }
+ m_item.append(item);
+ emit(changed());
}
- else
+ else if (m_item.contains(item))
{
m_item.removeAll(item);
emit(changed());
diff --git a/pokemod/TODO b/pokemod/TODO
index 65573dda..12627114 100644
--- a/pokemod/TODO
+++ b/pokemod/TODO
@@ -1,5 +1,3 @@
-MoveEffects (GSC+)
-
Figure out what makes 2 PokéMods incompatable
Trainer AI stuff
diff --git a/pokemod/Trainer.cpp b/pokemod/Trainer.cpp
index ad09adf2..c9413005 100644
--- a/pokemod/Trainer.cpp
+++ b/pokemod/Trainer.cpp
@@ -24,6 +24,8 @@
// Qt includes
#include <QBuffer>
+const QStringList Trainer::IntelligenceStr = QStringList() << "Ignorant" << "Remember" << "Deduce" << "Cheating";
+
Trainer::Trainer(const Trainer& trainer) :
Object("Trainer", trainer.parent(), trainer.id())
{
@@ -101,15 +103,6 @@ void Trainer::setSkin(const QPixmap& skin)
emit(changed());
}
-// void Trainer::setAi(const QString& fileName)
-// {
-// QFile file(ai());
-// if (file.exists() && !file.remove())
-// throw(ReplaceException(className(), file.fileName()));
-// if (!QFile::copy(fileName, ai()))
-// throw(SaveException(className(), file.fileName()));
-// }
-
QString Trainer::name() const
{
return m_name;
@@ -125,11 +118,6 @@ QPixmap Trainer::skin() const
return m_skin;
}
-// QString Trainer::ai() const
-// {
-// return QString("%1/trainer/%2/ai.pai").arg(static_cast<const Pokemod*>(pokemod())->path(), m_name);
-// }
-
Trainer& Trainer::operator=(const Trainer& rhs)
{
if (this == &rhs)
diff --git a/pokemod/Trainer.h b/pokemod/Trainer.h
index ca66f533..5e16be9f 100644
--- a/pokemod/Trainer.h
+++ b/pokemod/Trainer.h
@@ -23,6 +23,7 @@
// Qt includes
#include <QPixmap>
+#include <QStringList>
// Forward declarations
class Pokemod;
@@ -32,6 +33,16 @@ class Trainer : public Object
Q_OBJECT
public:
+ enum Intelligence
+ {
+ Ignorant = 0,
+ Remember = 1,
+ Deduce = 2,
+ Cheating = 3,
+ End = 4
+ };
+ static const QStringList IntelligenceStr;
+
Trainer(const Trainer& trainer);
Trainer(const Pokemod* parent, const int id);
Trainer(const Trainer& trainer, const Pokemod* parent, const int id);
@@ -45,12 +56,10 @@ class Trainer : public Object
void setName(const QString& name);
void setMoneyFactor(const int moneyFactor);
void setSkin(const QPixmap& skin);
-// void setAi(const QString& fileName);
QString name() const;
int moneyFactor() const;
QPixmap skin() const;
-// QString ai() const;
Trainer& operator=(const Trainer& rhs);
private:
diff --git a/pokemodr/MapTrainerTeamMemberUI.cpp b/pokemodr/MapTrainerTeamMemberUI.cpp
index 4b717214..7f3689d0 100644
--- a/pokemodr/MapTrainerTeamMemberUI.cpp
+++ b/pokemodr/MapTrainerTeamMemberUI.cpp
@@ -19,8 +19,10 @@
#include "MapTrainerTeamMemberUI.h"
// Pokemod includes
+#include "../pokemod/Ability.h"
#include "../pokemod/Item.h"
#include "../pokemod/MapTrainerTeamMember.h"
+#include "../pokemod/Move.h"
#include "../pokemod/Nature.h"
#include "../pokemod/Pokemod.h"
#include "../pokemod/Rules.h"
@@ -46,41 +48,63 @@ void MapTrainerTeamMemberUI::refreshGui()
varSpecies->addItem(species->name(), species->id());
}
varLevel->setMaximum(pokemod()->rules()->maxLevel());
+ varAbilities->clear();
+ for (int i = 0; i < pokemod()->abilityCount(); ++i)
+ {
+ const Ability* ability = pokemod()->ability(i);
+ QListWidgetItem* widgetItem = new QListWidgetItem(ability->name(), varAbilities);
+ widgetItem->setData(Qt::UserRole, ability->id());
+ }
+ boxAbilities->setEnabled(pokemod()->rules()->maxAbilities());
+ varItems->clear();
+ for (int i = 0; i < pokemod()->itemCount(); ++i)
+ {
+ const Item* item = pokemod()->item(i);
+ QListWidgetItem* widgetItem = new QListWidgetItem(item->name(), varItems);
+ widgetItem->setData(Qt::UserRole, item->id());
+ }
+ boxItems->setEnabled(pokemod()->rules()->maxHeldItems());
+ varMoves->clear();
+ for (int i = 0; i < pokemod()->abilityCount(); ++i)
+ {
+ const Move* move = pokemod()->move(i);
+ QListWidgetItem* widgetItem = new QListWidgetItem(move->name(), varMoves);
+ widgetItem->setData(Qt::UserRole, move->id());
+ }
+ varNatures->clear();
+ for (int i = 0; i < pokemod()->natureCount(); ++i)
+ {
+ const Nature* nature = pokemod()->nature(i);
+ QListWidgetItem* widgetItem = new QListWidgetItem(nature->name(), varNatures);
+ widgetItem->setData(Qt::UserRole, nature->id());
+ }
+ boxNatures->setEnabled(pokemod()->rules()->maxNatures());
}
void MapTrainerTeamMemberUI::setGui()
{
varSpecies->setCurrentIndex(varSpecies->findData(static_cast<MapTrainerTeamMember*>(modified())->species()));
varLevel->setValue(static_cast<MapTrainerTeamMember*>(modified())->level());
- varNature->setCurrentIndex(varNature->findData(static_cast<MapTrainerTeamMember*>(modified())->nature()));
+ for (int i = 0; i < varAbilities->count(); ++i)
+ {
+ QListWidgetItem* widgetItem = varAbilities->item(i);
+ widgetItem->setSelected(static_cast<MapTrainerTeamMember*>(modified())->ability(widgetItem->data(Qt::UserRole).toInt()));
+ }
for (int i = 0; i < varItems->count(); ++i)
{
QListWidgetItem* widgetItem = varItems->item(i);
widgetItem->setSelected(static_cast<MapTrainerTeamMember*>(modified())->item(widgetItem->data(Qt::UserRole).toInt()));
}
- varNature->clear();
- if (pokemod()->rules()->natureAllowed())
+ for (int i = 0; i < varMoves->count(); ++i)
{
- for (int i = 0; i < pokemod()->natureCount(); ++i)
- {
- const Nature* nature = pokemod()->nature(i);
- varNature->addItem(nature->name(), nature->id());
- }
+ QListWidgetItem* widgetItem = varMoves->item(i);
+ widgetItem->setSelected(static_cast<MapTrainerTeamMember*>(modified())->move(widgetItem->data(Qt::UserRole).toInt()));
}
- else
- boxNature->setEnabled(false);
- varItems->clear();
- if (pokemod()->rules()->holdItems())
+ for (int i = 0; i < varNatures->count(); ++i)
{
- for (int i = 0; i < pokemod()->itemCount(); ++i)
- {
- const Item* item = pokemod()->item(i);
- QListWidgetItem* widgetItem = new QListWidgetItem(item->name(), varItems);
- widgetItem->setData(Qt::UserRole, item->id());
- }
+ QListWidgetItem* widgetItem = varNatures->item(i);
+ widgetItem->setSelected(static_cast<MapTrainerTeamMember*>(modified())->nature(widgetItem->data(Qt::UserRole).toInt()));
}
- else
- boxItems->setEnabled(false);
}
void MapTrainerTeamMemberUI::apply()
@@ -106,9 +130,13 @@ void MapTrainerTeamMemberUI::on_varLevel_valueChanged(const int level)
static_cast<MapTrainerTeamMember*>(modified())->setLevel(level);
}
-void MapTrainerTeamMemberUI::on_varNature_activated(const int nature)
+void MapTrainerTeamMemberUI::on_varAbilities_itemSelectionChanged()
{
- static_cast<MapTrainerTeamMember*>(modified())->setNature(varNature->itemData(nature).toInt());
+ for (int i = 0; i < varAbilities->count(); ++i)
+ {
+ const QListWidgetItem* widgetItem = varAbilities->item(i);
+ static_cast<MapTrainerTeamMember*>(modified())->setAbility(widgetItem->data(Qt::UserRole).toInt(), widgetItem->isSelected());
+ }
}
void MapTrainerTeamMemberUI::on_varItems_itemSelectionChanged()
@@ -119,3 +147,21 @@ void MapTrainerTeamMemberUI::on_varItems_itemSelectionChanged()
static_cast<MapTrainerTeamMember*>(modified())->setItem(widgetItem->data(Qt::UserRole).toInt(), widgetItem->isSelected());
}
}
+
+void MapTrainerTeamMemberUI::on_varMoves_itemSelectionChanged()
+{
+ for (int i = 0; i < varMoves->count(); ++i)
+ {
+ const QListWidgetItem* widgetItem = varMoves->item(i);
+ static_cast<MapTrainerTeamMember*>(modified())->setMove(widgetItem->data(Qt::UserRole).toInt(), widgetItem->isSelected());
+ }
+}
+
+void MapTrainerTeamMemberUI::on_varNatures_itemSelectionChanged()
+{
+ for (int i = 0; i < varNatures->count(); ++i)
+ {
+ const QListWidgetItem* widgetItem = varNatures->item(i);
+ static_cast<MapTrainerTeamMember*>(modified())->setNature(widgetItem->data(Qt::UserRole).toInt(), widgetItem->isSelected());
+ }
+}
diff --git a/pokemodr/MapTrainerTeamMemberUI.h b/pokemodr/MapTrainerTeamMemberUI.h
index 6d4e1d27..2ad5d502 100644
--- a/pokemodr/MapTrainerTeamMemberUI.h
+++ b/pokemodr/MapTrainerTeamMemberUI.h
@@ -40,8 +40,10 @@ class MapTrainerTeamMemberUI : public ObjectUI, private Ui::formMapTrainerTeamMe
protected slots:
void on_varSpecies_activated(const int species);
void on_varLevel_valueChanged(const int level);
- void on_varNature_activated(const int nature);
+ void on_varAbilities_itemSelectionChanged();
void on_varItems_itemSelectionChanged();
+ void on_varMoves_itemSelectionChanged();
+ void on_varNatures_itemSelectionChanged();
private slots:
void refreshGui();
void setGui();
diff --git a/pokemodr/MoveUI.cpp b/pokemodr/MoveUI.cpp
index 921ec34b..b51fecfd 100644
--- a/pokemodr/MoveUI.cpp
+++ b/pokemodr/MoveUI.cpp
@@ -111,7 +111,7 @@ void MoveUI::on_varDescription_textChanged(const QString& description)
{
const int cursor = varDescription->cursorPosition();
static_cast<Move*>(modified())->setDescription(description);
- varName->setCursorPosition(cursor);
+ varDescription->setCursorPosition(cursor);
}
void MoveUI::on_varScript_valueChanged(const Script& script)
diff --git a/pokemodr/PokeModr.cpp b/pokemodr/PokeModr.cpp
index ce0bea71..c55f6209 100644
--- a/pokemodr/PokeModr.cpp
+++ b/pokemodr/PokeModr.cpp
@@ -31,11 +31,12 @@
#include <KCmdLineArgs>
#include <KConfig>
#include <KConfigGroup>
+#include <KStandardDirs>
int main(int argc, char* argv[])
{
QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale());
- KAboutData about("pokemodr", "pokemodr", ki18n("PokéModr"), VERSION_STRING, ki18n(""), KAboutData::License_Unknown, ki18n("©2007-2008 Ben Boeckel and Nerdy Productions"), ki18n("This program offers an easy interface so that PokéMods can be easily created."), "http://sourceforge.net/projects/pokegen");
+ KAboutData about("pokemodr", "pokemodr", ki18n("PokéModr"), VERSION_STRING, ki18n(""), KAboutData::License_Custom, ki18n("©2007-2008 Ben Boeckel and Nerdy Productions"), ki18n("This program offers an easy interface so that PokéMods can be easily created."), "http://sourceforge.net/projects/pokegen");
about.setLicenseTextFile("LICENSE");
about.setProgramName(ki18n("PokéModr"));
about.addAuthor(ki18n("Ben Boeckel"), ki18n("Lead Programmer"), "MathStuf@gmail.com", "http://nerdyproductions.sobertillnoon.com");
@@ -45,7 +46,7 @@ int main(int argc, char* argv[])
KCmdLineArgs::init(argc, argv, &about);
KApplication* app = new KApplication();
- KConfig cfg("~/.kde/share/config/pokegenrc");
+ KConfig cfg(KStandardDirs::locate("config", "pokemodrrc"));
PokeModrUI* mainWindow = new PokeModrUI(cfg.group("pokemodr"));
mainWindow->show();
diff --git a/pokemodr/RulesUI.cpp b/pokemodr/RulesUI.cpp
index 80ed5c49..c41ec4fb 100644
--- a/pokemodr/RulesUI.cpp
+++ b/pokemodr/RulesUI.cpp
@@ -41,20 +41,9 @@ void RulesUI::setGui()
{
boxGenders->setChecked(static_cast<Rules*>(modified())->genderAllowed() ? Qt::Checked : Qt::Unchecked);
varBreeding->setCheckState(static_cast<Rules*>(modified())->breedingAllowed() ? Qt::Checked : Qt::Unchecked);
- varHeldItems->setValue(static_cast<Rules*>(modified())->holdItems());
- boxCriticalDomains->setChecked(static_cast<Rules*>(modified())->criticalDomains() ? Qt::Checked : Qt::Unchecked);
- boxAllowAbilities->setChecked(static_cast<Rules*>(modified())->abilityAllowed() ? Qt::Checked : Qt::Unchecked);
- boxAllowNatures->setChecked(static_cast<Rules*>(modified())->natureAllowed() ? Qt::Checked : Qt::Unchecked);
- varBoxes->setValue(static_cast<Rules*>(modified())->numBoxes());
- varBoxSize->setEnabled(0 < static_cast<Rules*>(modified())->numBoxes());
- varBoxSize->setValue(static_cast<Rules*>(modified())->boxSize());
- varMaxParty->setValue(static_cast<Rules*>(modified())->maxParty());
- varMaxFight->setMaximum(static_cast<Rules*>(modified())->maxParty());
- varMaxFight->setValue(static_cast<Rules*>(modified())->maxFight());
- varMaxMoves->setValue(static_cast<Rules*>(modified())->maxMoves());
- varMaxLevel->setValue(static_cast<Rules*>(modified())->maxLevel());
- varMaxMoney->setValue(static_cast<Rules*>(modified())->maxMoney());
- boxHardCash->setChecked(static_cast<Rules*>(modified())->hardCash() ? Qt::Checked : Qt::Unchecked);
+ varCriticalDomains->setChecked(static_cast<Rules*>(modified())->criticalDomains() ? Qt::Checked : Qt::Unchecked);
+ varHardCash->setChecked(static_cast<Rules*>(modified())->hardCash() ? Qt::Checked : Qt::Unchecked);
+ varSwitchStyle->setChecked(static_cast<Rules*>(modified())->allowSwitchStyle() ? Qt::Checked : Qt::Unchecked);
boxSplitSpecial->setChecked(static_cast<Rules*>(modified())->specialSplit() ? Qt::Checked : Qt::Unchecked);
varSplitSpecialDV->setCheckState(static_cast<Rules*>(modified())->specialDVSplit() ? Qt::Checked : Qt::Unchecked);
varMaxDV->setCurrentIndex(static_cast<Rules*>(modified())->maxDVValue());
@@ -68,6 +57,20 @@ void RulesUI::setGui()
varMaxEVPerStat->setMaximum(static_cast<Rules*>(modified())->maxTotalEV());
varMaxEVPerStat->setValue(static_cast<Rules*>(modified())->maxEVPerStat());
varPokerus->setValue(static_cast<Rules*>(modified())->pokerusChance());
+ varBoxes->setValue(static_cast<Rules*>(modified())->numBoxes());
+ varBoxSize->setEnabled(0 < static_cast<Rules*>(modified())->numBoxes());
+ varBoxSize->setValue(static_cast<Rules*>(modified())->boxSize());
+ varMaxParty->setValue(static_cast<Rules*>(modified())->maxParty());
+ varMaxFight->setMaximum(static_cast<Rules*>(modified())->maxParty());
+ varMaxFight->setValue(static_cast<Rules*>(modified())->maxFight());
+ varMaxPlayers->setValue(static_cast<Rules*>(modified())->maxPlayers());
+ varMaxMoves->setValue(static_cast<Rules*>(modified())->maxMoves());
+ varMaxLevel->setValue(static_cast<Rules*>(modified())->maxLevel());
+ varMaxHeldItems->setValue(static_cast<Rules*>(modified())->maxHeldItems());
+ varMaxNatures->setValue(static_cast<Rules*>(modified())->maxNatures());
+ varMaxAbilities->setValue(static_cast<Rules*>(modified())->maxAbilities());
+ varMaxStages->setValue(static_cast<Rules*>(modified())->maxStages());
+ varMaxMoney->setValue(static_cast<Rules*>(modified())->maxMoney());
}
void RulesUI::apply()
@@ -93,117 +96,132 @@ void RulesUI::on_varBreeding_toggled(const bool breeding)
static_cast<Rules*>(modified())->setBreedingAllowed(breeding);
}
-void RulesUI::on_varHeldItems_valueChanged(const int heldItems)
+void RulesUI::on_varCriticalDomains_toggled(const bool criticalDomains)
{
- static_cast<Rules*>(modified())->setHoldItems(heldItems);
+ static_cast<Rules*>(modified())->setCriticalDomains(criticalDomains);
}
-void RulesUI::on_boxCriticalDomains_toggled(const bool criticalDomains)
+void RulesUI::on_varHardCash_toggled(const bool hardCash)
{
- static_cast<Rules*>(modified())->setCriticalDomains(criticalDomains);
+ static_cast<Rules*>(modified())->setHardCash(hardCash);
}
-void RulesUI::on_boxAllowAbilities_toggled(const bool allowAbilities)
+void RulesUI::on_varSwitchStyle_toggled(const bool switchStyle)
{
- static_cast<Rules*>(modified())->setAbilityAllowed(allowAbilities);
+ static_cast<Rules*>(modified())->setAllowSwitchStyle(switchStyle);
}
-void RulesUI::on_boxAllowNatures_toggled(const bool allowNatures)
+void RulesUI::on_boxSplitSpecial_toggled(const bool splitSpecial)
{
- static_cast<Rules*>(modified())->setNatureAllowed(allowNatures);
+ static_cast<Rules*>(modified())->setSpecialSplit(splitSpecial);
}
-void RulesUI::on_varBoxes_valueChanged(const int boxes)
+void RulesUI::on_varSplitSpecialDV_toggled(const bool splitSpecialDV)
{
- static_cast<Rules*>(modified())->setNumBoxes(boxes);
+ static_cast<Rules*>(modified())->setSpecialDVSplit(splitSpecialDV);
}
-void RulesUI::on_varBoxSize_valueChanged(const int boxSize)
+void RulesUI::on_varMaxDV_activated(const int maxDV)
{
- static_cast<Rules*>(modified())->setBoxSize(boxSize);
+ static_cast<Rules*>(modified())->setMaxDVValue(maxDV);
}
-void RulesUI::on_varMaxParty_valueChanged(const int maxParty)
+void RulesUI::on_boxHappiness_toggled(const bool happiness)
{
- static_cast<Rules*>(modified())->setMaxParty(maxParty);
+ static_cast<Rules*>(modified())->setHappiness(happiness);
}
-void RulesUI::on_varMaxFight_valueChanged(const int maxFight)
+void RulesUI::on_varFaintLoss_valueChanged(const int faintLoss)
{
- static_cast<Rules*>(modified())->setMaxFight(maxFight);
+ static_cast<Rules*>(modified())->setHappyFaintLoss(faintLoss);
}
-void RulesUI::on_varMaxMoves_valueChanged(const int maxMoves)
+void RulesUI::on_varLevelGain_valueChanged(const int levelGain)
{
- static_cast<Rules*>(modified())->setMaxMoves(maxMoves);
+ static_cast<Rules*>(modified())->setHappyLevelGain(levelGain);
}
-void RulesUI::on_varMaxLevel_valueChanged(const int maxLevel)
+void RulesUI::on_varNumSteps_valueChanged(const int numSteps)
{
- static_cast<Rules*>(modified())->setMaxLevel(maxLevel);
+ static_cast<Rules*>(modified())->setHappySteps(numSteps);
}
-void RulesUI::on_varMaxMoney_valueChanged(const int maxMoney)
+void RulesUI::on_boxEffortValues_toggled(const bool effortValues)
{
- static_cast<Rules*>(modified())->setMaxMoney(maxMoney);
+ static_cast<Rules*>(modified())->setEffortValuesAllowed(effortValues);
}
-void RulesUI::on_boxHardCash_toggled(const bool hardCash)
+void RulesUI::on_varMaxEV_valueChanged(const int maxEV)
{
- static_cast<Rules*>(modified())->setHardCash(hardCash);
+ static_cast<Rules*>(modified())->setMaxTotalEV(maxEV);
}
-void RulesUI::on_boxSplitSpecial_toggled(const bool splitSpecial)
+void RulesUI::on_varMaxEVPerStat_valueChanged(const int maxEVPerStat)
{
- static_cast<Rules*>(modified())->setSpecialSplit(splitSpecial);
+ static_cast<Rules*>(modified())->setMaxEVPerStat(maxEVPerStat);
}
-void RulesUI::on_varSplitSpecialDV_toggled(const bool splitSpecialDV)
+void RulesUI::on_varPokerus_valueChanged(const Fraction& pokerusChance)
{
- static_cast<Rules*>(modified())->setSpecialDVSplit(splitSpecialDV);
+ static_cast<Rules*>(modified())->setPokerusChance(pokerusChance);
}
-void RulesUI::on_varMaxDV_activated(const int maxDV)
+void RulesUI::on_varBoxes_valueChanged(const int boxes)
{
- static_cast<Rules*>(modified())->setMaxDVValue(maxDV);
+ static_cast<Rules*>(modified())->setNumBoxes(boxes);
}
-void RulesUI::on_boxHappiness_toggled(const bool happiness)
+void RulesUI::on_varBoxSize_valueChanged(const int boxSize)
{
- static_cast<Rules*>(modified())->setHappiness(happiness);
+ static_cast<Rules*>(modified())->setBoxSize(boxSize);
}
-void RulesUI::on_varFaintLoss_valueChanged(const int faintLoss)
+void RulesUI::on_varMaxParty_valueChanged(const int maxParty)
{
- static_cast<Rules*>(modified())->setHappyFaintLoss(faintLoss);
+ static_cast<Rules*>(modified())->setMaxParty(maxParty);
}
-void RulesUI::on_varLevelGain_valueChanged(const int levelGain)
+void RulesUI::on_varMaxFight_valueChanged(const int maxFight)
{
- static_cast<Rules*>(modified())->setHappyLevelGain(levelGain);
+ static_cast<Rules*>(modified())->setMaxFight(maxFight);
}
-void RulesUI::on_varNumSteps_valueChanged(const int numSteps)
+void RulesUI::on_varMaxPlayers_valueChanged(const int maxPlayers)
{
- static_cast<Rules*>(modified())->setHappySteps(numSteps);
+ static_cast<Rules*>(modified())->setMaxPlayers(maxPlayers);
}
-void RulesUI::on_boxEffortValues_toggled(const bool effortValues)
+void RulesUI::on_varMaxMoves_valueChanged(const int maxMoves)
{
- static_cast<Rules*>(modified())->setEffortValuesAllowed(effortValues);
+ static_cast<Rules*>(modified())->setMaxMoves(maxMoves);
}
-void RulesUI::on_varMaxEV_valueChanged(const int maxEV)
+void RulesUI::on_varMaxLevel_valueChanged(const int maxLevel)
{
- static_cast<Rules*>(modified())->setMaxTotalEV(maxEV);
+ static_cast<Rules*>(modified())->setMaxLevel(maxLevel);
}
-void RulesUI::on_varMaxEVPerStat_valueChanged(const int maxEVPerStat)
+void RulesUI::on_varMaxHeldItems_valueChanged(const int maxHeldItems)
{
- static_cast<Rules*>(modified())->setMaxEVPerStat(maxEVPerStat);
+ static_cast<Rules*>(modified())->setMaxHeldItems(maxHeldItems);
}
-void RulesUI::on_varPokerus_valueChanged(const Fraction& pokerusChance)
+void RulesUI::on_varMaxNatures_valueChanged(const int maxNatures)
{
- static_cast<Rules*>(modified())->setPokerusChance(pokerusChance);
+ static_cast<Rules*>(modified())->setMaxNatures(maxNatures);
+}
+
+void RulesUI::on_varMaxAbilities_valueChanged(const int maxAbilities)
+{
+ static_cast<Rules*>(modified())->setMaxAbilities(maxAbilities);
+}
+
+void RulesUI::on_varMaxStages_valueChanged(const int maxStages)
+{
+ static_cast<Rules*>(modified())->setMaxStages(maxStages);
+}
+
+void RulesUI::on_varMaxMoney_valueChanged(const int maxMoney)
+{
+ static_cast<Rules*>(modified())->setMaxMoney(maxMoney);
}
diff --git a/pokemodr/RulesUI.h b/pokemodr/RulesUI.h
index 7a3fe07f..c108c908 100644
--- a/pokemodr/RulesUI.h
+++ b/pokemodr/RulesUI.h
@@ -40,18 +40,9 @@ class RulesUI : public ObjectUI, private Ui::formRules
protected slots:
void on_boxGenders_toggled(const bool genders);
void on_varBreeding_toggled(const bool breeding);
- void on_varHeldItems_valueChanged(const int heldItems);
- void on_boxCriticalDomains_toggled(const bool criticalDomains);
- void on_boxAllowAbilities_toggled(const bool allowAbilities);
- void on_boxAllowNatures_toggled(const bool allowNatures);
- void on_varBoxes_valueChanged(const int boxes);
- void on_varBoxSize_valueChanged(const int boxSize);
- void on_varMaxParty_valueChanged(const int maxParty);
- void on_varMaxFight_valueChanged(const int maxFight);
- void on_varMaxMoves_valueChanged(const int maxMoves);
- void on_varMaxLevel_valueChanged(const int maxLevel);
- void on_varMaxMoney_valueChanged(const int maxMoney);
- void on_boxHardCash_toggled(const bool hardCash);
+ void on_varCriticalDomains_toggled(const bool criticalDomains);
+ void on_varHardCash_toggled(const bool hardCash);
+ void on_varSwitchStyle_toggled(const bool switchStyle);
void on_boxSplitSpecial_toggled(const bool specialSplit);
void on_varSplitSpecialDV_toggled(const bool specialSplitDV);
void on_varMaxDV_activated(const int maxDV);
@@ -63,6 +54,18 @@ class RulesUI : public ObjectUI, private Ui::formRules
void on_varMaxEV_valueChanged(const int maxEV);
void on_varMaxEVPerStat_valueChanged(const int maxEVPerStat);
void on_varPokerus_valueChanged(const Fraction& pokerusChance);
+ void on_varBoxes_valueChanged(const int boxes);
+ void on_varBoxSize_valueChanged(const int boxSize);
+ void on_varMaxParty_valueChanged(const int maxParty);
+ void on_varMaxFight_valueChanged(const int maxFight);
+ void on_varMaxPlayers_valueChanged(const int maxPlayers);
+ void on_varMaxMoves_valueChanged(const int maxMoves);
+ void on_varMaxLevel_valueChanged(const int maxLevel);
+ void on_varMaxHeldItems_valueChanged(const int maxHeldItems);
+ void on_varMaxNatures_valueChanged(const int maxNatures);
+ void on_varMaxAbilities_valueChanged(const int maxAbilities);
+ void on_varMaxStages_valueChanged(const int maxStages);
+ void on_varMaxMoney_valueChanged(const int maxMoney);
private slots:
void initGui();
void setGui();
diff --git a/pokemodr/SpeciesUI.cpp b/pokemodr/SpeciesUI.cpp
index 4ba1bc3e..4b984228 100644
--- a/pokemodr/SpeciesUI.cpp
+++ b/pokemodr/SpeciesUI.cpp
@@ -56,7 +56,7 @@ void SpeciesUI::refreshGui()
varEVStat->addItems((isSplit ? Pokemod::StatGSCStr : Pokemod::StatRBYStr).mid(0, isSplit ? Pokemod::ST_End_GSC : Pokemod::ST_End_RBY));
else
boxEffortValues->setEnabled(false);
- if (!pokemod()->rules()->holdItems())
+ if (!pokemod()->rules()->maxHeldItems())
boxItemChance->setEnabled(false);
if (pokemod()->rules()->genderAllowed())
{
@@ -121,7 +121,7 @@ void SpeciesUI::setGui()
varFemaleBack->setIcon(static_cast<Species*>(modified())->backFemaleSprite());
}
varList->setIcon(static_cast<Species*>(modified())->listSprite());
- boxGenderChance->setChecked(static_cast<Species*>(modified())->genderFactor() == -1);
+ boxGenderChance->setChecked((static_cast<Species*>(modified())->genderFactor().denominator() < static_cast<Species*>(modified())->genderFactor().numerator()) ? Qt::Checked : Qt::Unchecked);
varGenderChance->setValue(static_cast<Species*>(modified())->genderFactor());
varEggSpecies->setCurrentIndex(varEggSpecies->findData(static_cast<Species*>(modified())->eggSpecies()));
varEggSteps->setValue(static_cast<Species*>(modified())->eggSteps());
@@ -129,12 +129,12 @@ void SpeciesUI::setGui()
for (int i = 0; i < varTypes->count(); ++i)
{
QListWidgetItem* widgetItem = varTypes->item(i);
- widgetItem->setSelected(static_cast<Species*>(modified())->item(widgetItem->data(Qt::UserRole).toInt()));
+ widgetItem->setSelected(static_cast<Species*>(modified())->type(widgetItem->data(Qt::UserRole).toInt()));
}
for (int i = 0; i < varEggGroups->count(); ++i)
{
QListWidgetItem* widgetItem = varEggGroups->item(i);
- widgetItem->setSelected(static_cast<Species*>(modified())->item(widgetItem->data(Qt::UserRole).toInt()));
+ widgetItem->setSelected(static_cast<Species*>(modified())->eggGroup(widgetItem->data(Qt::UserRole).toInt()));
}
}
@@ -273,9 +273,9 @@ void SpeciesUI::on_varList_pressed()
delete dialog;
}
-void SpeciesUI::on_boxGenderChance_toggled(const bool genderChance)
+void SpeciesUI::on_boxGenderChance_clicked(const bool genderChance)
{
- static_cast<Species*>(modified())->setGenderFactor(Fraction(genderChance ? 1 : -1, 1));
+ static_cast<Species*>(modified())->setGenderFactor(Fraction((genderChance ? 1 : 2), 1));
}
void SpeciesUI::on_varGenderChance_valueChanged(const Fraction& genderChance)
diff --git a/pokemodr/SpeciesUI.h b/pokemodr/SpeciesUI.h
index dd4aafe8..921f5987 100644
--- a/pokemodr/SpeciesUI.h
+++ b/pokemodr/SpeciesUI.h
@@ -56,7 +56,7 @@ class SpeciesUI : public ObjectUI, private Ui::formSpecies
void on_varFemaleFront_pressed();
void on_varFemaleBack_pressed();
void on_varList_pressed();
- void on_boxGenderChance_toggled(const bool genderUsed);
+ void on_boxGenderChance_clicked(const bool genderUsed);
void on_varGenderChance_valueChanged(const Fraction& genderChance);
void on_varEggSpecies_activated(const int eggSpecies);
void on_varEggSteps_valueChanged(const int eggSteps);
diff --git a/pokemodr/TODO b/pokemodr/TODO
index 9195be58..823fb0af 100644
--- a/pokemodr/TODO
+++ b/pokemodr/TODO
@@ -6,11 +6,4 @@ When adding to an expanded item, its view is not updated
=========
Can't edit KListWidgets correctly
-
-MapUI
- Crash when opening
-MoveUI
- Target Choice isn't being saved
- Scrolling with the widget is weird
-SpeciesUI
- Crashes when loading
+ Replace with QListView?
diff --git a/pokemodr/gui/maptrainerteammember.ui b/pokemodr/gui/maptrainerteammember.ui
index 5fe921a3..d5a7caa3 100644
--- a/pokemodr/gui/maptrainerteammember.ui
+++ b/pokemodr/gui/maptrainerteammember.ui
@@ -38,15 +38,18 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxNature" >
+ <widget class="QGroupBox" name="boxAbilities" >
<property name="title" >
- <string>Nature</string>
+ <string>Abilities</string>
</property>
<layout class="QHBoxLayout" >
<item>
- <widget class="KComboBox" name="varNature" >
+ <widget class="KListWidget" name="varAbilities" >
<property name="toolTip" >
- <string>Nature the team member has</string>
+ <string>Abilities</string>
+ </property>
+ <property name="selectionMode" >
+ <enum>QAbstractItemView::ExtendedSelection</enum>
</property>
</widget>
</item>
@@ -72,6 +75,44 @@
</layout>
</widget>
</item>
+ <item>
+ <widget class="QGroupBox" name="boxMoves" >
+ <property name="title" >
+ <string>Moves</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KListWidget" name="varMoves" >
+ <property name="toolTip" >
+ <string>Moves held</string>
+ </property>
+ <property name="selectionMode" >
+ <enum>QAbstractItemView::ExtendedSelection</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="boxNatures" >
+ <property name="title" >
+ <string>Natures</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KListWidget" name="varNatures" >
+ <property name="toolTip" >
+ <string>Natures</string>
+ </property>
+ <property name="selectionMode" >
+ <enum>QAbstractItemView::ExtendedSelection</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
</layout>
</widget>
<customwidgets>
diff --git a/pokemodr/gui/pokemod.ui b/pokemodr/gui/pokemod.ui
index 055f19df..7295c558 100644
--- a/pokemodr/gui/pokemod.ui
+++ b/pokemodr/gui/pokemod.ui
@@ -4,9 +4,6 @@
<layout class="QVBoxLayout" >
<item>
<widget class="KTabWidget" name="notebookPokemod" >
- <property name="currentIndex" >
- <number>0</number>
- </property>
<widget class="QWidget" name="tabGeneral" >
<attribute name="title" >
<string>General</string>
diff --git a/pokemodr/gui/rules.ui b/pokemodr/gui/rules.ui
index eec4753c..7aa4cebf 100644
--- a/pokemodr/gui/rules.ui
+++ b/pokemodr/gui/rules.ui
@@ -35,18 +35,35 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxHeldItems" >
+ <widget class="QGroupBox" name="boxFlags" >
<property name="title" >
- <string>Held Items</string>
+ <string>Flags</string>
</property>
- <layout class="QHBoxLayout" >
+ <layout class="QVBoxLayout" >
<item>
- <widget class="KIntNumInput" name="varHeldItems" >
+ <widget class="QCheckBox" name="varCriticalDomains" >
<property name="toolTip" >
- <string>How many items can be held at once</string>
+ <string>If checked, critical hit chances will be determined by generation II and newer formulas</string>
</property>
- <property name="minimum" >
- <number>0</number>
+ <property name="text" >
+ <string>Critical Domains</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="varHardCash" >
+ <property name="toolTip" >
+ <string>If checked, money will be harder to come across (only check for challenge games)</string>
+ </property>
+ <property name="text" >
+ <string>Hard Cash</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="varSwitchStyle" >
+ <property name="text" >
+ <string>Switch Style</string>
</property>
</widget>
</item>
@@ -54,77 +71,65 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxCriticalDomains" >
+ <widget class="QGroupBox" name="boxSplitSpecial" >
<property name="toolTip" >
- <string>If checked, critical hit chances will be determined by generation II and newer formulas</string>
+ <string>If checked, the special stat will be split into separate attack and defense stats</string>
</property>
<property name="title" >
- <string>Critical Domains</string>
+ <string>Split Special</string>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QCheckBox" name="varSplitSpecialDV" >
+ <property name="toolTip" >
+ <string>If checked, the each special stat will have their own DV</string>
+ </property>
+ <property name="text" >
+ <string>Split Special DV</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxAllowAbilities" >
- <property name="toolTip" >
- <string>If checked, abilities will be enabled</string>
- </property>
+ <widget class="QGroupBox" name="boxMaxDV" >
<property name="title" >
- <string>Abilities</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
+ <string>Max DV</string>
</property>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="KComboBox" name="varMaxDV" >
+ <property name="toolTip" >
+ <string>The highest a DV may be</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxAllowNatures" >
+ <widget class="QGroupBox" name="boxHappiness" >
<property name="toolTip" >
- <string>If checked, natures will be enabled</string>
+ <string>If checked, happiness will be enabled</string>
</property>
<property name="title" >
- <string>Natures</string>
+ <string>Happiness</string>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="tabStorage" >
- <attribute name="title" >
- <string>Storage</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QGroupBox" name="boxPokemonBoxes" >
- <property name="title" >
- <string>Storage</string>
- </property>
<layout class="QVBoxLayout" >
<item>
- <widget class="KIntNumInput" name="varBoxes" >
+ <widget class="KIntNumInput" name="varFaintLoss" >
<property name="toolTip" >
- <string>How many boxes on the computer will be available</string>
+ <string>How many happiness points are lost when fainting</string>
</property>
<property name="label" >
- <string>Boxes</string>
+ <string>Loss From Faint</string>
</property>
<property name="minimum" >
<number>0</number>
@@ -132,12 +137,28 @@
</widget>
</item>
<item>
- <widget class="KIntNumInput" name="varBoxSize" >
+ <widget class="KIntNumInput" name="varLevelGain" >
+ <property name="toolTip" >
+ <string>How many happiness points are gained along with the level</string>
+ </property>
<property name="label" >
- <string>Box Size</string>
+ <string>Gain From Level</string>
</property>
<property name="minimum" >
- <number>1</number>
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varNumSteps" >
+ <property name="toolTip" >
+ <string>The number of steps it takes to raise happiness by 1</string>
+ </property>
+ <property name="label" >
+ <string>Steps</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
</property>
</widget>
</item>
@@ -145,34 +166,37 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxMaxParty" >
+ <widget class="QGroupBox" name="boxEffortValues" >
+ <property name="toolTip" >
+ <string>If checked, stats will have effort values</string>
+ </property>
<property name="title" >
- <string>Max Party Size</string>
+ <string>Effort Values</string>
</property>
- <layout class="QHBoxLayout" >
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" >
<item>
- <widget class="KIntNumInput" name="varMaxParty" >
+ <widget class="KIntNumInput" name="varMaxEV" >
<property name="toolTip" >
- <string>The size of the largest party possible</string>
+ <string>The maximum amount of effort values allowed</string>
+ </property>
+ <property name="label" >
+ <string>Max EV</string>
</property>
<property name="minimum" >
<number>1</number>
</property>
</widget>
</item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxMaxFight" >
- <property name="title" >
- <string>Max Active</string>
- </property>
- <layout class="QHBoxLayout" >
<item>
- <widget class="KIntNumInput" name="varMaxFight" >
+ <widget class="KIntNumInput" name="varMaxEVPerStat" >
<property name="toolTip" >
- <string>Maximum amount of team members active at one time per side</string>
+ <string>The maximum amount of effort values allowed for a single stat</string>
+ </property>
+ <property name="label" >
+ <string>Max EV Per Stat</string>
</property>
<property name="minimum" >
<number>1</number>
@@ -183,34 +207,51 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxMaxMoves" >
+ <widget class="QGroupBox" name="boxPokerusChance" >
<property name="title" >
- <string>Max Moves</string>
+ <string>Pokérus</string>
</property>
- <layout class="QHBoxLayout" >
+ <layout class="QVBoxLayout" >
<item>
- <widget class="KIntNumInput" name="varMaxMoves" >
+ <widget class="FractionWidget" name="varPokerus" >
<property name="toolTip" >
- <string>Maximum amount of knowable moves</string>
- </property>
- <property name="minimum" >
- <number>1</number>
+ <string>The chance of contracting the Pokérus virus</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tabLimits" >
+ <attribute name="title" >
+ <string>Limits</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
<item>
- <widget class="QGroupBox" name="boxMaxLevel" >
+ <widget class="QGroupBox" name="boxPokemonBoxes" >
<property name="title" >
- <string>Max Level</string>
+ <string>Storage</string>
</property>
- <layout class="QHBoxLayout" >
+ <layout class="QVBoxLayout" >
<item>
- <widget class="KIntNumInput" name="varMaxLevel" >
+ <widget class="KIntNumInput" name="varBoxes" >
<property name="toolTip" >
- <string>Maximum level allowed</string>
+ <string>How many boxes on the computer will be available</string>
+ </property>
+ <property name="label" >
+ <string>Boxes</string>
+ </property>
+ <property name="minimum" >
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varBoxSize" >
+ <property name="label" >
+ <string>Box Size</string>
</property>
<property name="minimum" >
<number>1</number>
@@ -221,92 +262,47 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxMaxMoney" >
+ <widget class="QGroupBox" name="groupBox" >
<property name="title" >
- <string>Max Money</string>
+ <string>Arena</string>
</property>
- <layout class="QHBoxLayout" >
+ <layout class="QVBoxLayout" >
<item>
- <widget class="KIntNumInput" name="varMaxMoney" >
+ <widget class="KIntNumInput" name="varMaxParty" >
<property name="toolTip" >
- <string>Maximum amount of money allowed</string>
+ <string>The size of the largest party possible</string>
+ </property>
+ <property name="label" >
+ <string>Team</string>
</property>
<property name="minimum" >
<number>1</number>
</property>
</widget>
</item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxHardCash" >
- <property name="toolTip" >
- <string>If checked, money will be harder to come across (only check for challenge games)</string>
- </property>
- <property name="title" >
- <string>Hard Cash</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="tabStats" >
- <attribute name="title" >
- <string>Stats</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QGroupBox" name="boxSplitSpecial" >
- <property name="toolTip" >
- <string>If checked, the special stat will be split into separate attack and defense stats</string>
- </property>
- <property name="title" >
- <string>Split Special</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- <layout class="QHBoxLayout" >
<item>
- <widget class="QCheckBox" name="varSplitSpecialDV" >
+ <widget class="KIntNumInput" name="varMaxFight" >
<property name="toolTip" >
- <string>If checked, the each special stat will have their own DV</string>
+ <string>Maximum amount of team members active at one time per side</string>
</property>
- <property name="text" >
- <string>Split Special DV</string>
+ <property name="label" >
+ <string>Fighters</string>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
</property>
</widget>
</item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxMaxDV" >
- <property name="title" >
- <string>Max DV</string>
- </property>
- <layout class="QHBoxLayout" >
<item>
- <widget class="KComboBox" name="varMaxDV" >
+ <widget class="KIntNumInput" name="varMaxPlayers" >
<property name="toolTip" >
- <string>The highest a DV may be</string>
+ <string>Maximum amount of trainers allowed in a battle</string>
+ </property>
+ <property name="label" >
+ <string>Teams</string>
+ </property>
+ <property name="minimum" >
+ <number>2</number>
</property>
</widget>
</item>
@@ -314,37 +310,44 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxHappiness" >
- <property name="toolTip" >
- <string>If checked, happiness will be enabled</string>
- </property>
+ <widget class="QGroupBox" name="boxLimits" >
<property name="title" >
- <string>Happiness</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
+ <string>General</string>
</property>
<layout class="QVBoxLayout" >
<item>
- <widget class="KIntNumInput" name="varFaintLoss" >
+ <widget class="KIntNumInput" name="varMaxMoves" >
<property name="toolTip" >
- <string>How many happiness points are lost when fainting</string>
+ <string>Maximum amount of knowable moves</string>
</property>
<property name="label" >
- <string>Loss From Faint</string>
+ <string>Moves</string>
</property>
<property name="minimum" >
- <number>0</number>
+ <number>1</number>
</property>
</widget>
</item>
<item>
- <widget class="KIntNumInput" name="varLevelGain" >
+ <widget class="KIntNumInput" name="varMaxLevel" >
<property name="toolTip" >
- <string>How many happiness points are gained along with the level</string>
+ <string>Maximum level allowed</string>
</property>
<property name="label" >
- <string>Gain From Level</string>
+ <string>Level</string>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KIntNumInput" name="varMaxHeldItems" >
+ <property name="toolTip" >
+ <string>How many items can be held at once</string>
+ </property>
+ <property name="label" >
+ <string>Held Items</string>
</property>
<property name="minimum" >
<number>0</number>
@@ -352,56 +355,41 @@
</widget>
</item>
<item>
- <widget class="KIntNumInput" name="varNumSteps" >
+ <widget class="KIntNumInput" name="varMaxNatures" >
<property name="toolTip" >
- <string>The number of steps it takes to raise happiness by 1</string>
+ <string>The maximum amount of natures allowed at once</string>
</property>
<property name="label" >
- <string>Steps</string>
+ <string>Natures</string>
</property>
<property name="minimum" >
<number>0</number>
</property>
</widget>
</item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="boxEffortValues" >
- <property name="toolTip" >
- <string>If checked, stats will have effort values</string>
- </property>
- <property name="title" >
- <string>Effort Values</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- <layout class="QVBoxLayout" >
<item>
- <widget class="KIntNumInput" name="varMaxEV" >
+ <widget class="KIntNumInput" name="varMaxAbilities" >
<property name="toolTip" >
- <string>The maximum amount of effort values allowed</string>
+ <string>The maximum amount of abilities allowed at once</string>
</property>
<property name="label" >
- <string>Max EV</string>
+ <string>Abilities</string>
</property>
<property name="minimum" >
- <number>1</number>
+ <number>0</number>
</property>
</widget>
</item>
<item>
- <widget class="KIntNumInput" name="varMaxEVPerStat" >
+ <widget class="KIntNumInput" name="varMaxStages" >
<property name="toolTip" >
- <string>The maximum amount of effort values allowed for a single stat</string>
+ <string>The maximum stage that stats can be modified to</string>
</property>
<property name="label" >
- <string>Max EV Per Stat</string>
+ <string>Modifier Stages</string>
</property>
<property name="minimum" >
- <number>1</number>
+ <number>0</number>
</property>
</widget>
</item>
@@ -409,15 +397,18 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="boxPokerusChance" >
+ <widget class="QGroupBox" name="boxMaxMoney" >
<property name="title" >
- <string>Pokérus</string>
+ <string>Money</string>
</property>
- <layout class="QVBoxLayout" >
+ <layout class="QHBoxLayout" >
<item>
- <widget class="FractionWidget" name="varPokerus" >
+ <widget class="KIntNumInput" name="varMaxMoney" >
<property name="toolTip" >
- <string>The chance of contracting the Pokérus virus</string>
+ <string>Maximum amount of money allowed</string>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
</property>
</widget>
</item>
@@ -429,7 +420,7 @@
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
@@ -455,14 +446,10 @@
<header>knuminput.h</header>
</customwidget>
<customwidget>
- <class>KLineEdit</class>
- <extends>QLineEdit</extends>
- <header>klineedit.h</header>
- </customwidget>
- <customwidget>
<class>KTabWidget</class>
<extends>QTabWidget</extends>
<header>ktabwidget.h</header>
+ <container>1</container>
</customwidget>
<customwidget>
<class>FractionWidget</class>
diff --git a/pokemodr/gui/species.ui b/pokemodr/gui/species.ui
index c57fa0d3..38a3b4a2 100644
--- a/pokemodr/gui/species.ui
+++ b/pokemodr/gui/species.ui
@@ -4,9 +4,6 @@
<layout class="QVBoxLayout" >
<item>
<widget class="KTabWidget" name="notebookSpecies" >
- <property name="currentIndex" >
- <number>3</number>
- </property>
<widget class="QWidget" name="tabGeneral" >
<attribute name="title" >
<string>General</string>