/* * Copyright 2007-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 __POKEMOD_NATURE__ #define __POKEMOD_NATURE__ // Pokemod includes #include "Object.h" #include "Pokemod.h" // General includes #include "../general/Fraction.h" class Nature : public Object { Q_OBJECT public: Nature(const Nature& nature); Nature(const Pokemod* parent, const int id); Nature(const Nature& nature, const Pokemod* parent, const int id); Nature(const QDomElement& xml, const Pokemod* parent, const int id = INT_MAX); void validate(); void load(const QDomElement& xml, int id = INT_MAX); QDomElement save() const; void setName(const QString& name); void setStat(const int stat, const Fraction& multiplier); void setWeight(const int weight); QString name() const; Fraction stat(const int stat) const; int weight() const; Nature& operator=(const Nature& rhs); private: QString m_name; Fraction m_stat[Pokemod::ST_End_GSC]; int m_weight; }; #endif