summaryrefslogtreecommitdiffstats
path: root/pokemod/Move.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-04-17 23:34:36 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-04-17 23:34:36 +0000
commit6679f5cffa9d35a23b76605ddfbf3257f882b6ee (patch)
treec8e41854a60b64e8569939bca6b827807175ef9a /pokemod/Move.cpp
parent05980e883719b1c8ebde1bd2fcbf4f8c16df7ad6 (diff)
[FIX] Frac -> Fraction
[FIX] ImageCache and Ini removed [FIX] Fraction/Point widgets moved to pokemodr [FIX] Copy ctors made for pokemod classes [FIX] Ctors in pokemod fixed [FIX] Copyright headers fixed in pokemodr [FIX] PokeModr updated to new API and fixed in some places git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@99 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Move.cpp')
-rw-r--r--pokemod/Move.cpp23
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];
}