diff options
Diffstat (limited to 'pokemod/Move.cpp')
| -rw-r--r-- | pokemod/Move.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index 490c8eca..21611be8 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -16,7 +16,6 @@ */ // Qt includes -#include <QDir> #include <QMap> // Pokemod includes @@ -29,6 +28,12 @@ const QStringList Move::TargetStr = QStringList() << "Player" << "Enemy" << "All" << "Random"; const QStringList Move::ChoiceStr = QStringList() << "Player" << "Enemy" << "Random"; +Move::Move(const Move& move) : + Object("Move", move.pokemod(), move.id()) +{ + *this = move; +} + Move::Move(const Pokemod* pokemod, const int id) : Object("Move", pokemod, id), m_name(""), @@ -49,13 +54,13 @@ Move::Move(const Pokemod* pokemod, const int id) : { } -Move::Move(const Pokemod* pokemod, const Move& move, const int id) : +Move::Move(const Move& move, const Pokemod* pokemod, const int id) : Object("Move", pokemod, id) { *this = move; } -Move::Move(const Pokemod* pokemod, const QDomElement& xml, const int id) : +Move::Move(const QDomElement& xml, const Pokemod* pokemod, const int id) : Object("Move", pokemod, id) { load(xml, id); @@ -124,7 +129,7 @@ void Move::load(const QDomElement& xml, int id) { LOAD_ID(); LOAD(QString, name); - LOAD(Frac, accuracy); + LOAD(Fraction, accuracy); LOAD(int, power); LOAD(int, type); LOAD(bool, special); @@ -144,7 +149,7 @@ QDomElement Move::save() const { SAVE_CREATE(); SAVE(QString, name); - SAVE(Frac, accuracy); + SAVE(Fraction, accuracy); SAVE(int, power); SAVE(int, type); SAVE(bool, special); @@ -167,7 +172,7 @@ void Move::setName(const QString& name) m_name = name; } -void Move::setAccuracy(const Frac& accuracy) throw(Exception) +void Move::setAccuracy(const Fraction& accuracy) throw(Exception) { m_accuracy = accuracy; } @@ -252,7 +257,7 @@ QString Move::name() const return m_name; } -Frac Move::accuracy() const +Fraction Move::accuracy() const { return m_accuracy; } @@ -369,13 +374,13 @@ MoveEffect* Move::newEffect() MoveEffect* Move::newEffect(const QDomElement& xml) { - m_effects.append(new MoveEffect(pokemod(), xml, newEffectId())); + m_effects.append(new MoveEffect(xml, pokemod(), newEffectId())); return m_effects[effectCount() - 1]; } MoveEffect* Move::newEffect(const MoveEffect& effect) { - m_effects.append(new MoveEffect(pokemod(), effect, newEffectId())); + m_effects.append(new MoveEffect(effect, pokemod(), newEffectId())); return m_effects[effectCount() - 1]; } |
