diff options
Diffstat (limited to 'battle/Pokemon.h')
-rw-r--r-- | battle/Pokemon.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/battle/Pokemon.h b/battle/Pokemon.h new file mode 100644 index 00000000..a5b03de1 --- /dev/null +++ b/battle/Pokemon.h @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: pokegen/Pokemon.h +// Purpose: Data relevant to a Pokemon in the game +// Author: Ben Boeckel +// Modified by: Ben Boeckel +// Created: Tue Oct 16 2007 09:21:30 +// Copyright: ©2007 Ben Boeckel and Nerdy Productions +// Licence: +// 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 __POKEGEN_POKEMON__ +#define __POKEGEN_POKEMON__ + +#include <QList> +#include <QSet> +#include <QString> +#include "../general/Frac.h" +#include "../general/Ini.h" +#include "../general/Ref.h" +#include "../pokemod/Ability.h" +#include "../pokemod/Item.h" +#include "../pokemod/Nature.h" +#include "../pokemod/Pokemod.h" +#include "../pokemod/Species.h" + +namespace PokeGen +{ + namespace Battle + { + class Pokemon + { + public: + Pokemon(const PokeMod::Pokemod* par, Ini ini); + Pokemon(const PokeMod::Pokemod* par, const unsigned s, const unsigned l); + + unsigned GetStat(const unsigned s) const; + unsigned GetLevel() const; + + unsigned GetNumMoves() const; + bool SimulateMove(const unsigned m) const; + bool UseMove(const unsigned m); + bool UnlearnMove(const unsigned m); + + bool SetStatus(const unsigned s); + + bool UseItemOn(const unsigned i); + + unsigned GetNumHeldItems() const; + unsigned GetHeldItem(const unsigned h); + bool GiveItem(const unsigned i); + bool TakeItem(const unsigned i); + bool SimulateTakeItem(const unsigned i) const; + + bool CanFight() const; + + void OutOfBattle(); + protected: + typedef struct + { + Frac statMultipliers[PokeMod::ST_End_Battle]; + bool isConfused; + bool isAttracted; + QList<bool> diabled; + unsigned substituteHP; + Frac toxicMultiplier; + }BattleSettings; + + void GrowLevel(); + + unsigned species; + QString name; + QSet<unsigned> moves; + QList<unsigned> heldItems; + QList<Frac> powerPoints; + unsigned dv[PokeMod::ST_End_GSC]; + unsigned statExp[PokeMod::ST_End_GSC]; + unsigned curHP; + unsigned experience; + unsigned nature; + unsigned ability; + unsigned status; + + BattleSettings battleSettings; + + PokeMod::Pokemod* pokemod; + }; + } +} + +#endif |