diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-06-30 01:37:51 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-06-30 01:37:51 +0000 |
| commit | a423cf3db8fa90cc09d2f92ff892e4fcdda4af16 (patch) | |
| tree | 174b821adc5e089a313657499e0df740d7184fca /pokemod/Nature.cpp | |
| parent | 300e44b68e075d7fd78287e10262b0d502f4898d (diff) | |
| download | sigen-a423cf3db8fa90cc09d2f92ff892e4fcdda4af16.tar.gz sigen-a423cf3db8fa90cc09d2f92ff892e4fcdda4af16.tar.xz sigen-a423cf3db8fa90cc09d2f92ff892e4fcdda4af16.zip | |
[FIX] Replaced Point with QPoint (less duplicate code)
[FIX] Fraction and Point widgets are more compact
[FIX] Fleshed out more of the TeamMember
[FIX] Map tilemap editor now expands to fill all available area
[FIX] Added priority values to abilities and moves
[FIX] Added option for ATB-like battle rounds
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@217 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Nature.cpp')
| -rw-r--r-- | pokemod/Nature.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pokemod/Nature.cpp b/pokemod/Nature.cpp index 3ae75b96..52e597b6 100644 --- a/pokemod/Nature.cpp +++ b/pokemod/Nature.cpp @@ -34,7 +34,7 @@ Pokemod::Nature::Nature(const Pokemod* parent, const int id) : m_name(""), m_weight(1) { - for (int i = 0; i < ST_End_GSC; ++i) + for (int i = 0; i < (ST_End_GSC - ST_No_HP_Start); ++i) m_stat[i].set(1, 1); } @@ -64,7 +64,7 @@ void Pokemod::Nature::load(const QDomElement& xml) { LOAD_BEGIN(); LOAD(QString, name); - LOAD_ARRAY(Fraction, stat, ST_End_GSC); + LOAD_ARRAY(Fraction, stat, ST_End_GSC - ST_No_HP_Start); LOAD(int, weight); } @@ -72,7 +72,7 @@ QDomElement Pokemod::Nature::save() const { SAVE_CREATE(); SAVE(QString, name); - SAVE_ARRAY(Fraction, stat, ST_End_GSC); + SAVE_ARRAY(Fraction, stat, ST_End_GSC - ST_No_HP_Start); SAVE(int, weight); return xml; } @@ -84,7 +84,7 @@ void Pokemod::Nature::setName(const QString& name) void Pokemod::Nature::setStat(const int stat, const Fraction& multiplier) { - if ((static_cast<const Pokemod*>(pokemod())->rules()->specialSplit() ? ST_End_GSC : ST_End_RBY) <= stat) + if ((stat < ST_No_HP_Start) || ((static_cast<const Pokemod*>(pokemod())->rules()->specialSplit() ? ST_End_GSC : ST_End_RBY) <= stat)) { emit(error(bounds("stat"))); return; @@ -127,7 +127,7 @@ Pokemod::Nature& Pokemod::Nature::operator=(const Nature& rhs) if (this == &rhs) return *this; COPY(name); - COPY_ARRAY(stat, ST_End_GSC); + COPY_ARRAY(stat, ST_End_GSC - ST_No_HP_Start); COPY(weight); return *this; } |
