diff options
Diffstat (limited to 'pokemod/Move.cpp')
| -rw-r--r-- | pokemod/Move.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index 326a0368..bcea9c7f 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -32,7 +32,7 @@ const QStringList Move::TargetStr = QStringList() << "Player" << "Enemy" << "Bot const QStringList Move::ChoiceStr = QStringList() << "Player" << "Enemy" << "Random"; Move::Move(const Pokemod& par, const unsigned _id) : - Object(par, _id), + Object("Move", par, _id), name(""), accuracy(1, 1), power(0), @@ -51,13 +51,13 @@ Move::Move(const Pokemod& par, const unsigned _id) : } Move::Move(const Pokemod& par, const Move& m, const unsigned _id) : - Object(par, _id) + Object("Move", par, _id) { *this = m; } Move::Move(const Pokemod& par, const QString& fname, const unsigned _id) : - Object(par, _id) + Object("Move", par, _id) { load(fname, _id); } @@ -215,7 +215,7 @@ void Move::setAccuracyDenom(const unsigned d) throw(Exception) void Move::setType(const unsigned t) throw(BoundsException) { if (pokemod.getTypeIndex(t) == UINT_MAX) - throw(BoundsException("Move", "type")); + throw(BoundsException(className, "type")); type = t; } @@ -227,28 +227,28 @@ void Move::setSpecial(const bool s) void Move::setPowerPoints(const unsigned p) throw(BoundsException) { if (!p) - throw(BoundsException("Move", "powerPoints")); + throw(BoundsException(className, "powerPoints")); powerPoints = p; } void Move::setTarget(const unsigned t) throw(BoundsException) { if (T_End <= t) - throw(BoundsException("Move", "target")); + throw(BoundsException(className, "target")); target = t; } void Move::setNumTargets(const unsigned n) throw(BoundsException) { if (!n || ((pokemod.getRules().getMaxFight() << 1) < n)) - throw(BoundsException("Move", "numTargets")); + throw(BoundsException(className, "numTargets")); numTargets = n; } void Move::setTargetChoice(const unsigned t) throw(BoundsException) { if (C_End <= t) - throw(BoundsException("Move", "targetChoice")); + throw(BoundsException(className, "targetChoice")); targetChoice = t; } @@ -350,14 +350,14 @@ QString Move::getDescription() const const MoveEffect& Move::getEffect(const unsigned i) const throw(IndexException) { if (getEffectCount() <= i) - throw(IndexException("Move")); + throw(IndexException(className)); return effects.at(i); } MoveEffect& Move::getEffect(const unsigned i) throw(IndexException) { if (getEffectCount() <= i) - throw(IndexException("Move")); + throw(IndexException(className)); return effects[i]; } @@ -407,7 +407,7 @@ MoveEffect& Move::newEffect(const MoveEffect& e) void Move::deleteEffect(const unsigned i) throw(IndexException) { if (getEffectCount() <= i) - throw(IndexException("Move")); + throw(IndexException(className)); effects.removeAt(i); } |
