summaryrefslogtreecommitdiffstats
path: root/pokemod/Pokemod.h
blob: fa0b3ea11f87cc2347cc19022bd1e9a8f1684db7 (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
/////////////////////////////////////////////////////////////////////////////
// Name:        pokemod/Pokemod.h
// Purpose:     Define a custom PokéMod for PokéGen
// Author:      Ben Boeckel
// Modified by: Ben Boeckel
// Created:     Sat Feb 24 21:41:19 2007
// 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 2 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, write to the Free Software Foundation, Inc.,
//    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
/////////////////////////////////////////////////////////////////////////////

#ifndef __POKEMOD_POKEMOD__
#define __POKEMOD_POKEMOD__

#define CUR_MAJOR_VERSION 0
#define CUR_MINOR_VERSION 1

#include <vector>
#include <map>
#include <sstream>
#include <string>
#include "pokemod_inc.h"
#include "Object.h"
#include "Frac.h"
#include "Ini.h"
#include "Path.h"
#include "Point.h"
#include "Ref.h"
#include "String.h"
#include "Ability.h"
#include "Author.h"
#include "Badge.h"
#include "CoinList.h"
#include "Dialog.h"
#include "EggGroup.h"
#include "Item.h"
#include "ItemStorage.h"
#include "Map.h"
#include "Move.h"
#include "Nature.h"
#include "Pokemon.h"
#include "Status.h"
#include "Store.h"
#include "Tile.h"
#include "Time.h"
#include "Type.h"

namespace PokeGen
{
   namespace PokeMod
   {
      class Pokemod : public Object
      {
         public:
            Pokemod(const String &f);
            ~Pokemod();
            
            void ImportIni(const String &f);
            void ExportIni(const String &f) const;
            
            Path GetPath() const;
            
            unsigned MaxCompatability(const Pokemod &p) const;
            
            void SetTitle(const String &t);
            void SetVersion(const String &v);
            void SetDescription(const String &d);
            void SetIsGenderAllowed(const bool g);
            void SetIsBreedingAllowed(const bool b);
            void SetEggSpecies(const unsigned e);
            void SetEggSpecies(const String &e);
            void SetCanHoldItems(const bool h);
            void SetHasCriticalDomains(const bool c);
            void SetIsContestAllowed(const bool c);
            void SetIsAbilityAllowed(const bool a);
            void SetIsNatureAllowed(const bool n);
            void SetNumDaycares(const unsigned n);
            void SetNumPokemonBoxes(const unsigned n);
            void SetNumPokemonPerBox(const unsigned n);
            void SetMaxParty(const unsigned m);
            void SetMaxFight(const unsigned m);
            void SetMaxMoves(const unsigned m);
            void SetMaxLevel(const unsigned m);
            void SetMaxMoney(const unsigned m);
            void SetIsHardCash(const bool h);
            void SetIsSpecialSplit(const bool s);
            void SetIsSpecialDVSplit(const bool s);
            void SetMaxDVValue(const unsigned char m);
            void SetIsHappiness(const bool h);
            void SetHappyFaintLoss(const unsigned h);
            void SetHappyLevelGain(const unsigned h);
            void SetHappySteps(const unsigned h);
            void SetIsEffortValuesAllowed(const bool e);
            void SetMaxTotalEV(const unsigned m);
            void SetMaxEVPerStat(const unsigned m);
            void SetPokerusChance(const Frac &p);
            void SetPokerusChance(const unsigned n, const unsigned d);
            void SetPokerusChanceNum(const unsigned n);
            void SetPokerusChanceDenom(const unsigned d);
            void SetStartMap(const unsigned s);
            void SetStartMap(const String &s);
            void SetStartMoney(const unsigned s);
            void SetStartCoordinate(const Point &s);
            void SetStartCoordinate(const unsigned x, const unsigned y);
            void SetStartCoordinateX(const unsigned x);
            void SetStartCoordinateY(const unsigned y);
            void SetStartDirection(const unsigned s);
            void SetStartDirection(const String &s);
            void SetStartDialog(const unsigned s);
            void SetWalkSkin(Path &w);
            void SetBikeSkin(Path &b);
            void SetSurfSkin(Path &s);
            void SetFlySkin(Path &f);
            void SetFishSkin(Path &f);
            void SetSurfFishSkin(Path &s);
            void SetSuperPCUname(const String &u);
            void SetSuperPCPasswd(const String &p);
            void SetStruggleMove(const unsigned s);
            void SetStruggleMove(const String &s);
            void SetConfuseMove(const unsigned c);
            void SetConfuseMove(const String &c);
            
            String GetTitle() const;
            String GetVersion() const;
            String GetDescription() const;
            bool IsGenderAllowed() const;
            bool IsBreedingAllowed() const;
            unsigned GetEggSpecies() const;
            String GetEggSpeciesString() const;
            bool CanHoldItems() const;
            bool HasCriticalDomains() const;
            bool IsContestAllowed() const;
            bool IsAbilityAllowed() const;
            bool IsNatureAllowed() const;
            unsigned GetNumDaycares() const;
            unsigned GetNumPokemonBoxes() const;
            unsigned GetNumPokemonPerBox() const;
            unsigned GetMaxParty() const;
            unsigned GetMaxFight() const;
            unsigned GetMaxMoves() const;
            unsigned GetMaxLevel() const;
            unsigned GetMaxMoney() const;
            bool IsHardCash() const;
            bool IsSpecialSplit() const;
            bool IsSpecialDVSplit() const;
            unsigned char GetMaxDVValue() const;
            bool IsHappiness() const;
            unsigned GetHappyFaintLoss() const;
            unsigned GetHappyLevelGain() const;
            unsigned GetHappySteps() const;
            bool IsEffortValuesAllowed() const;
            unsigned GetMaxTotalEV() const;
            unsigned GetMaxEVPerStat() const;
            Frac GetPokerusChance() const;
            unsigned GetPokerusChanceNum() const;
            unsigned GetPokerusChanceDenom() const;
            unsigned GetStartMap() const;
            String GetStartMapString() const;
            unsigned GetStartMoney() const;
            Point GetStartCoordinate() const;
            unsigned GetStartCoordinateX() const;
            unsigned GetStartCoordinateY() const;
            unsigned GetStartDirection() const;
            String GetStartDirectionString() const;
            unsigned GetStartDialog() const;
            String GetStartDialogString() const;
            bool GetWalkSkin() const;
            bool GetBikeSkin() const;
            bool GetSurfSkin() const;
            bool GetFlySkin() const;
            bool GetFishSkin() const;
            bool GetSurfFishSkin() const;
            String GetSuperPCUname() const;
            String GetSuperPCPasswd() const;
            unsigned GetStruggleMove() const;
            String GetStruggleMoveString() const;
            unsigned GetConfuseMove() const;
            String GetConfuseMoveString() const;
            
            void SetTypeChart(const unsigned att, const unsigned def, const Frac &m) const;
            void SetTypeChart(const unsigned att, const unsigned def, const unsigned n, const unsigned d) const;
            void SetTypeChartNum(const unsigned att, const unsigned def, const unsigned n) const;
            void SetTypeChartDenom(const unsigned att, const unsigned def, const unsigned d) const;
            void SetTypeChart(const String &att, const unsigned def, const Frac &m) const;
            void SetTypeChart(const String &att, const unsigned def, const unsigned n, const unsigned d) const;
            void SetTypeChartNum(const String &att, const unsigned def, const unsigned n) const;
            void SetTypeChartDenom(const String &att, const unsigned def, const unsigned d) const;
            void SetTypeChart(const unsigned att, const String &def, const Frac &m) const;
            void SetTypeChart(const unsigned att, const String &def, const unsigned n, const unsigned d) const;
            void SetTypeChartNum(const unsigned att, const String &def, const unsigned n) const;
            void SetTypeChartDenom(const unsigned att, const String &def, const unsigned d) const;
            void SetTypeChart(const String &att, const String &def, const Frac &m) const;
            void SetTypeChart(const String &att, const String &def, const unsigned n, const unsigned d) const;
            void SetTypeChartNum(const String &att, const String &def, const unsigned n) const;
            void SetTypeChartDenom(const String &att, const String &def, const unsigned d) const;
            Frac GetTypeChart(const unsigned att, const unsigned def) const;
            unsigned GetTypeChartNum(const unsigned att, const unsigned def) const;
            unsigned GetTypeChartDenom(const unsigned att, const unsigned def) const;
            Frac GetTypeChart(const String &att, const unsigned def) const;
            unsigned GetTypeChartNum(const String &att, const unsigned def) const;
            unsigned GetTypeChartDenom(const String &att, const unsigned def) const;
            Frac GetTypeChart(const unsigned att, const String &def) const;
            unsigned GetTypeChartNum(const unsigned att, const String &def) const;
            unsigned GetTypeChartDenom(const unsigned att, const String &def) const;
            Frac GetTypeChart(const String &att, const String &def) const;
            unsigned GetTypeChartNum(const String &att, const String &def) const;
            unsigned GetTypeChartDenom(const String &att, const String &def) const;
            
            const Ability *GetAbility(const unsigned _id) const;
            const Ability *GetAbility(const String &n) const;
            unsigned GetAbilityCount() const;
            void NewAbility(Ini *const ini = NULL);
            void DeleteAbility(const unsigned _id);
            void DeleteAbility(const String &n);
            
            const Author *GetAuthor(const unsigned _id) const;
            const Author *GetAuthor(const String &n) const;
            unsigned GetAuthorCount() const;
            void NewAuthor(Ini *const ini = NULL);
            void DeleteAuthor(const unsigned _id);
            void DeleteAuthor(const String &n);
            
            const Badge *GetBadge(const unsigned _id) const;
            const Badge *GetBadge(const String &n) const;
            unsigned GetBadgeCount() const;
            void NewBadge(Ini *const ini = NULL);
            void DeleteBadge(const unsigned _id);
            void DeleteBadge(const String &n);
            
            const CoinList *GetCoinList(const unsigned _id) const;
            const CoinList *GetCoinList(const String &n) const;
            unsigned GetCoinListCount() const;
            void NewCoinList(Ini *const ini = NULL);
            void DeleteCoinList(const unsigned _id);
            void DeleteCoinList(const String &n);
            
            const Dialog *GetDialog(const unsigned _id) const;
            unsigned GetDialogCount() const;
            void NewDialog(Ini *const ini = NULL);
            void DeleteDialog(const unsigned _id);
            
            const EggGroup *GetEggGroup(const unsigned _id) const;
            const EggGroup *GetEggGroup(const String &n) const;
            unsigned GetEggGroupCount() const;
            void NewEggGroup(Ini *const ini = NULL);
            void DeleteEggGroup(const unsigned _id);
            void DeleteEggGroup(const String &n);
            
            const Item *GetItem(const unsigned _id) const;
            const Item *GetItem(const String &n) const;
            unsigned GetItemCount() const;
            void NewItem(Ini *const ini = NULL);
            void DeleteItem(const unsigned _id);
            void DeleteItem(const String &n);
            
            const ItemStorage *GetItemStorage(const unsigned _id) const;
            const ItemStorage *GetItemStorage(const String &n) const;
            unsigned GetItemStorageCount() const;
            void NewItemStorage(Ini *const ini = NULL);
            void DeleteItemStorage(const unsigned _id);
            void DeleteItemStorage(const String &n);
            
            const Map *GetMap(const unsigned _id) const;
            const Map *GetMap(const String &n) const;
            unsigned GetMapCount() const;
            void NewMap(Ini *const ini = NULL);
            void DeleteMap(const unsigned _id);
            void DeleteMap(const String &n);
            
            const Move *GetMove(const unsigned _id) const;
            const Move *GetMove(const String &n) const;
            unsigned GetMoveCount() const;
            void NewMove(Ini *const ini = NULL);
            void DeleteMove(const unsigned _id);
            void DeleteMove(const String &n);
            
            const Nature *GetNature(const unsigned _id) const;
            const Nature *GetNature(const String &n) const;
            unsigned GetNatureCount() const;
            void NewNature(Ini *const ini = NULL);
            void DeleteNature(const unsigned _id);
            void DeleteNature(const String &n);
            
            const Pokemon *GetPokemon(const unsigned _id) const;
            const Pokemon *GetPokemon(const String &n) const;
            unsigned GetPokemonCount() const;
            void NewPokemon(Ini *const ini = NULL);
            void DeletePokemon(const unsigned _id);
            void DeletePokemon(const String &n);
            
            const Status *GetStatus(const unsigned _id) const;
            const Status *GetStatus(const String &n) const;
            unsigned GetStatusCount() const;
            void NewStatus(Ini *const ini = NULL);
            void DeleteStatus(const unsigned _id);
            void DeleteStatus(const String &n);
            
            const Store *GetStore(const unsigned _id) const;
            const Store *GetStore(const String &n) const;
            unsigned GetStoreCount() const;
            void NewStore(Ini *const ini = NULL);
            void DeleteStore(const unsigned _id);
            void DeleteStore(const String &n);
            
            const Tile *GetTile(const unsigned _id) const;
            const Tile *GetTile(const String &n) const;
            unsigned GetTileCount() const;
            void NewTile(Ini *const ini = NULL);
            void DeleteTile(const unsigned _id);
            void DeleteTile(const String &n);
            
            const Time *GetTime(const unsigned _id) const;
            const Time *GetTime(const String &n) const;
            unsigned GetTimeCount() const;
            void NewTime(Ini *const ini = NULL);
            void DeleteTime(const unsigned _id);
            void DeleteTime(const String &n);
            
            const Type *GetType(const unsigned _id) const;
            const Type *GetType(const String &n) const;
            unsigned GetTypeCount() const;
            void NewType(Ini *const ini = NULL);
            void DeleteType(const unsigned _id);
            void DeleteType(const String &n);
         private:
            void Validate();
#           ifdef POKEMODR
            void Validate(const wxListBox &output);
#           endif
            
            String title;
            String version;
            String description;
            bool genderAllowed;
            bool breedingAllowed;
            unsigned eggSpecies;
            bool holdItems;
            bool criticalDomains;
            bool contestAllowed;
            bool abilityAllowed;
            bool natureAllowed;
            unsigned numDaycares;
            unsigned numPokemonBoxes;
            unsigned numPokemonPerBox;
            unsigned maxParty;
            unsigned maxFight;
            unsigned maxMoves;
            unsigned maxLevel;
            unsigned maxMoney;
            bool hardCash;
            bool specialSplit;
            bool specialDVSplit;
            unsigned char maxDVValue;
            bool happiness;
            unsigned happyFaintLoss;
            unsigned happyLevelGain;
            unsigned happySteps;
            bool effortValuesAllowed;
            unsigned maxTotalEV;
            unsigned maxEVPerStat;
            Frac pokerusChance;
            unsigned startMap;
            unsigned startMoney;
            Point startCoordinate;
            unsigned startDirection;
            unsigned startDialog;
            String superPCUname;
            String superPCPasswd;
            unsigned struggleMove;
            unsigned confuseMove;
            
            MatrixFrac typeChart;
            
            std::vector<Ability> abilities;
            std::vector<Author> authors;
            std::vector<Badge> badges;
            std::vector<CoinList> coinLists;
            std::vector<Dialog> dialogs;
            std::vector<EggGroup> eggGroups;
            std::vector<Item> items;
            std::vector<ItemStorage> itemStorages;
            std::vector<Map> maps;
            std::vector<Move> moves;
            std::vector<Nature> natures;
            std::vector<Pokemon> pokemon;
            std::vector<Status> statuses;
            std::vector<Store> stores;
            std::vector<Tile> tiles;
            std::vector<Time> times;
            std::vector<Type> types;
            
            String file;
      };
   }
}

#endif