diff options
Diffstat (limited to 'pokemod/Move.cpp')
| -rw-r--r-- | pokemod/Move.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index 21611be8..0ea33bc3 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -185,7 +185,7 @@ void Move::setPower(const int power) void Move::setType(const int type) throw(BoundsException) { if (pokemod()->typeIndex(type) == INT_MAX) - throw(BoundsException(className(), "type")); + error<BoundsException>("type"); m_type = type; } @@ -197,28 +197,28 @@ void Move::setSpecial(const bool special) void Move::setPowerPoints(const int powerPoints) throw(BoundsException) { if (!powerPoints) - throw(BoundsException(className(), "powerPoints")); + error<BoundsException>("powerPoints"); m_powerPoints = powerPoints; } void Move::setTarget(const int target) throw(BoundsException) { if (T_End <= target) - throw(BoundsException(className(), "target")); + error<BoundsException>("target"); m_target = target; } void Move::setNumTargets(const int numTargets) throw(BoundsException) { if (!numTargets || ((pokemod()->rules()->maxFight() * ((m_target == T_All) ? pokemod()->rules()->maxPlayers() : 1)) < numTargets)) - throw(BoundsException(className(), "numTargets")); + error<BoundsException>("numTargets"); m_numTargets = numTargets; } void Move::setTargetChoice(const int targetChoice) throw(BoundsException) { if (C_End <= targetChoice) - throw(BoundsException(className(), "targetChoice")); + error<BoundsException>("targetChoice"); m_targetChoice = targetChoice; } @@ -330,7 +330,7 @@ QString Move::description() const const MoveEffect* Move::effect(const int index) const throw(IndexException) { if (effectCount() <= index) - error<IndexException>("effect"); + warning<IndexException>("effect"); return m_effects.at(index); } |
