diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-05-29 02:25:28 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-05-29 02:25:28 +0000 |
| commit | 539cee929d3a04a655a4f63801de1ab6d392886a (patch) | |
| tree | 7f0474c935ba76cf070263916228b8f4c06b6bfa /pokemod/Move.cpp | |
| parent | f3364b56398a4c93243459d565080c78a19ad377 (diff) | |
| download | sigen-539cee929d3a04a655a4f63801de1ab6d392886a.tar.gz sigen-539cee929d3a04a655a4f63801de1ab6d392886a.tar.xz sigen-539cee929d3a04a655a4f63801de1ab6d392886a.zip | |
[FIX] Moves cleaned up
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@185 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Move.cpp')
| -rw-r--r-- | pokemod/Move.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index 3006e086..b31167c2 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -20,14 +20,10 @@ // Pokemod includes #include "Pokemod.h" -#include "Rules.h" // Qt includes #include <QSet> -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.parent(), move.id()) { @@ -43,8 +39,6 @@ Move::Move(const Pokemod* parent, const int id) : m_special(false), m_overworld(false), m_powerPoints(0), - m_target(INT_MAX), - m_targetChoice(INT_MAX), m_priority(1), m_description(""), m_script("", "") @@ -74,9 +68,6 @@ void Move::validate() emit(error("Name is empty")); TEST(setType, type); TEST(setPowerPoints, powerPoints); - TEST(setTarget, target); - TEST(setNumTargets, numTargets); - TEST(setTargetChoice, targetChoice); } void Move::load(const QDomElement& xml, int id) @@ -89,8 +80,6 @@ void Move::load(const QDomElement& xml, int id) LOAD(bool, special); LOAD(bool, overworld); LOAD(int, powerPoints); - LOAD(int, target); - LOAD(int, targetChoice); LOAD(QString, description); LOAD(Script, script); } @@ -105,9 +94,6 @@ QDomElement Move::save() const SAVE(bool, special); SAVE(bool, overworld); SAVE(int, powerPoints); - SAVE(int, target); - SAVE(int, numTargets); - SAVE(int, targetChoice); SAVE(QString, description); SAVE(Script, script); return xml; @@ -163,36 +149,6 @@ void Move::setPowerPoints(const int powerPoints) CHECK(powerPoints); } -void Move::setTarget(const int target) -{ - if (T_End <= target) - { - emit(error(bounds("target"))); - return; - } - CHECK(target); -} - -void Move::setNumTargets(const int numTargets) -{ - if (!numTargets || ((static_cast<const Pokemod*>(pokemod())->rules()->maxFight() * ((m_target == T_All) ? static_cast<const Pokemod*>(pokemod())->rules()->maxPlayers() : 1)) < numTargets)) - { - emit(error(bounds("numTargets"))); - return; - } - CHECK(numTargets); -} - -void Move::setTargetChoice(const int targetChoice) -{ - if (C_End <= targetChoice) - { - emit(error(bounds("targetChoice"))); - return; - } - CHECK(targetChoice); -} - void Move::setDescription(const QString& description) { CHECK(description); @@ -238,21 +194,6 @@ int Move::powerPoints() const return m_powerPoints; } -int Move::target() const -{ - return m_target; -} - -int Move::numTargets() const -{ - return m_numTargets; -} - -int Move::targetChoice() const -{ - return m_targetChoice; -} - QString Move::description() const { return m_description; @@ -274,8 +215,6 @@ Move& Move::operator=(const Move& rhs) COPY(special); COPY(overworld); COPY(powerPoints); - COPY(target); - COPY(numTargets); COPY(description); COPY(script); return *this; |
