summaryrefslogtreecommitdiffstats
path: root/sigmod/Rules.h
blob: 54287ce094745ff72a38fb2e6b84af311ca161a8 (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
/*
 * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com>
 * 
 * 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_RULES__
#define __POKEMOD_RULES__

// Pokemod includes
#include "Object.h"

namespace Pokemod
{
// Forward declarations
class Pokemod;

class POKEMOD_EXPORT Rules : public Object
{
    Q_OBJECT
    
    public:
        static const QStringList DVStr;
        
        Rules(const Rules& rules);
        Rules(const Pokemod* parent);
        Rules(const Rules& rules, const Pokemod* parent);
        Rules(const QDomElement& xml, const Pokemod* parent);
        
        void validate();
        
        void load(const QDomElement& xml);
        QDomElement save() const;
        
        void setGenderAllowed(const bool genderAllowed);
        void setBreedingAllowed(const bool breedingAllowed);
        void setCriticalDomains(const bool criticalDomains);
        void setUseTurns(const bool useTurns);
        void setNumBoxes(const int numBoxes);
        void setBoxSize(const int boxSize);
        void setMaxParty(const int maxParty);
        void setMaxFight(const int maxFight);
        void setMaxPlayers(const int maxPlayers);
        void setMaxHeldItems(const int maxHeldItems);
        void setMaxAbilities(const int maxAbilities);
        void setMaxNatures(const int maxNatures);
        void setMaxMoves(const int maxMoves);
        void setMaxLevel(const int maxLevel);
        void setMaxStages(const int maxStage);
        void setMaxMoney(const int maxMoney);
        void setHardCash(const bool hardCash);
        void setAllowSwitchStyle(const bool allowSwitchStyle);
        void setSpecialSplit(const bool specialSplit);
        void setSpecialDVSplit(const bool specialDVSplit);
        void setEffortValuesAllowed(const bool effortValues);
        void setMaxTotalEV(const int maxTotalEV);
        void setMaxEVPerStat(const int maxEVPerStat);
        
        bool genderAllowed() const;
        bool breedingAllowed() const;
        bool criticalDomains() const;
        bool useTurns() const;
        int numBoxes() const;
        int boxSize() const;
        int maxParty() const;
        int maxFight() const;
        int maxPlayers() const;
        int maxHeldItems() const;
        int maxAbilities() const;
        int maxNatures() const;
        int maxMoves() const;
        int maxLevel() const;
        int maxStages() const;
        int maxMoney() const;
        bool hardCash() const;
        bool allowSwitchStyle() const;
        bool specialSplit() const;
        bool specialDVSplit() const;
        bool effortValuesAllowed() const;
        int maxTotalEV() const;
        int maxEVPerStat() const;
        
        Rules& operator=(const Rules& rhs);
    private:
        bool m_genderAllowed;
        bool m_breedingAllowed;
        bool m_criticalDomains;
        bool m_useTurns;
        int m_numBoxes;
        int m_boxSize;
        int m_maxParty;
        int m_maxFight;
        int m_maxPlayers;
        int m_maxHeldItems;
        int m_maxAbilities;
        int m_maxNatures;
        int m_maxMoves;
        int m_maxLevel;
        int m_maxStages;
        int m_maxMoney;
        bool m_hardCash;
        bool m_allowSwitchStyle;
        bool m_specialSplit;
        bool m_specialDVSplit;
        bool m_effortValuesAllowed;
        int m_maxTotalEV;
        int m_maxEVPerStat;
};
}

#endif