/* * Copyright 2008 Ben Boeckel * * 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 . */ #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(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