diff options
Diffstat (limited to 'pokemod/Move.cpp')
| -rw-r--r-- | pokemod/Move.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index b31167c2..51ed7a8a 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -24,13 +24,13 @@ // Qt includes #include <QSet> -Move::Move(const Move& move) : +Pokemod::Move::Move(const Move& move) : Object("Move", move.parent(), move.id()) { *this = move; } -Move::Move(const Pokemod* parent, const int id) : +Pokemod::Move::Move(const Pokemod* parent, const int id) : Object("Move", parent, id), m_name(""), m_accuracy(1, 1), @@ -45,24 +45,24 @@ Move::Move(const Pokemod* parent, const int id) : { } -Move::Move(const Move& move, const Pokemod* parent, const int id) : +Pokemod::Move::Move(const Move& move, const Pokemod* parent, const int id) : Object("Move", parent, id) { *this = move; } -Move::Move(const QDomElement& xml, const Pokemod* parent, const int id) : +Pokemod::Move::Move(const QDomElement& xml, const Pokemod* parent, const int id) : Object("Move", parent, id) { load(xml, id); } -Move::~Move() +Pokemod::Move::~Move() { clear(); } -void Move::validate() +void Pokemod::Move::validate() { if (m_name.isEmpty()) emit(error("Name is empty")); @@ -70,7 +70,7 @@ void Move::validate() TEST(setPowerPoints, powerPoints); } -void Move::load(const QDomElement& xml, int id) +void Pokemod::Move::load(const QDomElement& xml, int id) { LOAD_ID(); LOAD(QString, name); @@ -84,7 +84,7 @@ void Move::load(const QDomElement& xml, int id) LOAD(Script, script); } -QDomElement Move::save() const +QDomElement Pokemod::Move::save() const { SAVE_CREATE(); SAVE(QString, name); @@ -99,12 +99,12 @@ QDomElement Move::save() const return xml; } -void Move::setName(const QString& name) +void Pokemod::Move::setName(const QString& name) { CHECK(name); } -void Move::setAccuracy(const Fraction& accuracy) +void Pokemod::Move::setAccuracy(const Fraction& accuracy) { if (1 < accuracy) { @@ -114,12 +114,12 @@ void Move::setAccuracy(const Fraction& accuracy) CHECK(accuracy); } -void Move::setPower(const int power) +void Pokemod::Move::setPower(const int power) { CHECK(power); } -void Move::setType(const int type) +void Pokemod::Move::setType(const int type) { if (static_cast<const Pokemod*>(pokemod())->typeIndex(type) == INT_MAX) { @@ -129,17 +129,17 @@ void Move::setType(const int type) CHECK(type); } -void Move::setSpecial(const bool special) +void Pokemod::Move::setSpecial(const bool special) { CHECK(special); } -void Move::setOverworld(const bool overworld) +void Pokemod::Move::setOverworld(const bool overworld) { CHECK(overworld); } -void Move::setPowerPoints(const int powerPoints) +void Pokemod::Move::setPowerPoints(const int powerPoints) { if (!powerPoints) { @@ -149,62 +149,62 @@ void Move::setPowerPoints(const int powerPoints) CHECK(powerPoints); } -void Move::setDescription(const QString& description) +void Pokemod::Move::setDescription(const QString& description) { CHECK(description); } -void Move::setScript(const Script& script) +void Pokemod::Move::setScript(const Script& script) { CHECK(script); } -QString Move::name() const +QString Pokemod::Move::name() const { return m_name; } -Fraction Move::accuracy() const +Pokemod::Fraction Pokemod::Move::accuracy() const { return m_accuracy; } -int Move::power() const +int Pokemod::Move::power() const { return m_power; } -int Move::type() const +int Pokemod::Move::type() const { return m_type; } -bool Move::special() const +bool Pokemod::Move::special() const { return m_special; } -bool Move::overworld() const +bool Pokemod::Move::overworld() const { return m_overworld; } -int Move::powerPoints() const +int Pokemod::Move::powerPoints() const { return m_powerPoints; } -QString Move::description() const +QString Pokemod::Move::description() const { return m_description; } -Script Move::script() const +Pokemod::Script Pokemod::Move::script() const { return m_script; } -Move& Move::operator=(const Move& rhs) +Pokemod::Move& Pokemod::Move::operator=(const Move& rhs) { if (this == &rhs) return *this; |
