blob: 43fcb927d52a3285a7ddfcae955ca27ce4ef1dc5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
/////////////////////////////////////////////////////////////////////////////
// Name: pokemod/MapEffect.h
// Purpose: Define a trainer on a map
// Author: Ben Boeckel
// Modified by: Ben Boeckel
// Created: Fri June 1 2007 22:58:17
// Copyright: ©2007 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 __POKEMOD_MAPTRAINER__
#define __POKEMOD_MAPTRAINER__
#include <QFile>
#include <QList>
#include <QMap>
#include <QString>
#include "../general/Flag.h"
#include "../general/Point.h"
#include "Object.h"
#include "Dialog.h"
#include "MapTrainerPokemon.h"
namespace PokeGen
{
namespace PokeMod
{
class MapTrainer : public Object
{
public:
MapTrainer(const Pokemod* par, const unsigned _id);
MapTrainer(const Pokemod* par, Ini& ini, const unsigned _id = UINT_MAX);
void ImportIni(Ini& ini, const unsigned _id = UINT_MAX);
void ExportIni(QFile& fout, const QString& map) const;
void SetName(const QString& n);
void SetCoordinate(const unsigned x, const unsigned y);
void SetCoordinateX(const unsigned x);
void SetCoordinateY(const unsigned y);
bool SetSkin(const QString& s);
void SetSight(const unsigned s);
bool SetDirection(const unsigned d);
bool SetNumFight(const unsigned n);
bool SetAI(const QString& a);
void SetAppearFlag(const unsigned f, const unsigned s);
void SetAppearFlagFlag(const unsigned f);
bool SetAppearFlagStatus(const unsigned s);
bool SetOverworldDialog(const unsigned o);
bool SetWinDialog(const unsigned w);
bool SetLoseDialog(const unsigned l);
bool SetLeadPokemon(const unsigned l);
QString GetName() const;
Point GetCoordinate() const;
unsigned GetCoordinateX() const;
unsigned GetCoordinateY() const;
QString GetSkin() const;
bool GetSkinExists() const;
unsigned GetSight() const;
unsigned GetDirection() const;
unsigned GetNumFight() const;
bool GetAIExists() const;
QString GetAI() const;
Flag GetAppearFlag() const;
unsigned GetAppearFlagFlag() const;
unsigned GetAppearFlagStatus() const;
unsigned GetOverworldDialog() const;
unsigned GetWinDialog() const;
unsigned GetLoseDialog() const;
unsigned GetLeadPokemon() const;
const MapTrainerPokemon* GetPokemon(const unsigned i) const;
unsigned GetPokemonByID(const unsigned _id) const;
unsigned GetPokemonCount() const;
const MapTrainerPokemon* NewPokemon(Ini* const ini = NULL);
bool DeletePokemon(const unsigned i);
private:
bool Validate();
QString name;
Point coordinate;
QString skin;
unsigned sight;
unsigned direction;
unsigned numFight;
QString ai;
Flag appearFlag;
unsigned overworldDialog;
unsigned winDialog;
unsigned loseDialog;
unsigned leadPokemon;
QList<MapTrainerPokemon> team;
};
}
}
#endif
|