From cf49a16b29ac412cfea125f7216a0e51e79aa4de Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 5 Aug 2008 06:10:55 +0000 Subject: [FIX] List members of pokemod classes now can be returned in their entirety [FIX] Reworked pokescripting for ease of use [FIX] Now (selected) pokemod values can be overridden in pokescripting git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@237 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokescripting/MoveWrapper.h | 53 +++++---------------------------------------- 1 file changed, 5 insertions(+), 48 deletions(-) (limited to 'pokescripting/MoveWrapper.h') diff --git a/pokescripting/MoveWrapper.h b/pokescripting/MoveWrapper.h index aac393a9..cd5d0f43 100644 --- a/pokescripting/MoveWrapper.h +++ b/pokescripting/MoveWrapper.h @@ -20,13 +20,15 @@ // Pokescripting includes #include "ObjectWrapper.h" -#include "TypeWrapper.h" // Pokemod includes #include "../pokemod/Move.h" namespace Pokescripting { +// Forward declarations +class TypeWrapper; + class POKESCRIPTING_EXPORT MoveWrapper : public ObjectWrapper { Q_OBJECT @@ -47,59 +49,14 @@ class POKESCRIPTING_EXPORT MoveWrapper : public ObjectWrapper int powerPoints() const; int priority() const; QString description() const; + Pokemod::Script battleScript() const; + Pokemod::Script worldScript() const; private: MoveWrapper(const Pokemod::Move* move, QObject* parent); 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 TypeWrapper* MoveWrapper::type() -{ - return TypeWrapper::create(pokemod()->typeById(m_move->type()), this); -} - -inline bool MoveWrapper::special() const -{ - return m_move->special(); -} - -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 -- cgit