summaryrefslogtreecommitdiffstats
path: root/pokescripting/MoveWrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'pokescripting/MoveWrapper.h')
-rw-r--r--pokescripting/MoveWrapper.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/pokescripting/MoveWrapper.h b/pokescripting/MoveWrapper.h
new file mode 100644
index 00000000..eab6d53f
--- /dev/null
+++ b/pokescripting/MoveWrapper.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __POKESCRIPTING_MOVEWRAPPER__
+#define __POKESCRIPTING_MOVEWRAPPER__
+
+// Pokescripting includes
+#include "ObjectWrapper.h"
+#include "TypeWrapper.h"
+
+// Pokemod includes
+#include "../pokemod/Move.h"
+
+namespace Pokescripting
+{
+class POKESCRIPTING_EXPORT MoveWrapper : public ObjectWrapper
+{
+ Q_OBJECT
+
+ public:
+ MoveWrapper(const Pokemod::Move* move, QObject* parent);
+ public slots:
+ QString name() const;
+ Pokemod::Fraction accuracy() const;
+ int power() const;
+ const TypeWrapper* type() const;
+ bool special() const;
+ bool overworld() const;
+ int powerPoints() const;
+ int priority() const;
+ QString description() const;
+ private:
+ MoveWrapper& operator=(const MoveWrapper& rhs);
+
+ const Pokemod::Move* m_move;
+};
+
+inline MoveWrapper::MoveWrapper(const Pokemod::Move* move, QObject* parent) :
+ ObjectWrapper(move, parent),
+ m_move(move)
+{
+}
+
+inline QString MoveWrapper::name() const
+{
+ return m_move->name();
+}
+
+inline Pokemod::Fraction MoveWrapper::accuracy() const
+{
+ return m_move->accuracy();
+}
+
+inline int MoveWrapper::power() const
+{
+ return m_move->power();
+}
+
+inline const TypeWrapper* MoveWrapper::type() const
+{
+ return new TypeWrapper(pokemod()->typeById(m_move->type()), const_cast<MoveWrapper*>(this));
+}
+
+inline bool MoveWrapper::special() const
+{
+ return m_move->special();
+}
+
+inline bool MoveWrapper::overworld() const
+{
+ return m_move->overworld();
+}
+
+inline int MoveWrapper::powerPoints() const
+{
+ return m_move->powerPoints();
+}
+
+inline int MoveWrapper::priority() const
+{
+ return m_move->priority();
+}
+
+inline QString MoveWrapper::description() const
+{
+ return m_move->description();
+}
+
+}
+
+#endif