-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMythology.hpp
175 lines (124 loc) · 4.11 KB
/
Mythology.hpp
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
#pragma once
#ifndef WORLDSIM_MYTHOLOGY_HPP
#define WORLDSIM_MYTHOLOGY_HPP
/* WorldSim: Mythology
#include "Mythology.hpp"
Container for mythology of a group of Characters.
Each Civ may have a "State Mythology", however each Character can choose their own.
*/
// The saints of the world (notable mortal characters). Maybe prophet as well.
// It is not required that the saint/prophet be genuine. False prophets can be included.
class Mythology_Saint
{
public:
};
// should inherit event class (for legends interface)
// Types of events:
// World created - exceptional event of course
// create race - create one of the races
// Artifact created - deity made a special artifact
// Commandment - deity gave a commandment to its people (aka a law they must follow)
// Terrain modification
// Disaster or other large scale event
// Interaction between multiple deities
// Tech provided
// Character posessed by a deity
// Structure created
// Beast created
class Mythology_Event
{
public:
std::string date; // date of event.
std::string type; // category of event, for example creation. (should be enum)
std::string description; // description of event for legends menu
};
class World;
#include "Mythology_Deity.hpp"
#include <Container/Table/TableInterface.hpp>
// changes should be made by gradual steps, like government in a Paradox game
// at least for now, the initial creation myth should be hardcoded. Only later details should mutate.
class Mythology: public TableInterface
{
private:
Vector <Mythology*> vChildMythology; // Mythologies derived from this one.
Vector <Mythology_Deity*> vDeity;
Vector <Mythology_Event*> vEvent; // List of events which happened in this Mythology.
protected:
World* world;
public:
std::string name; // what the mythology calls itself
enum mythology_type { MYTHOLOGY_NONE, MYTHOLOGY_SPIRITUAL, MYTHOLOGY_MONOTHEISTIC, MYTHOLOGY_POLYTHEISTIC, MYTHOLOGY_PAGAN };
mythology_type type; // The base type of mythology.
// the race which created the mythology. Other races can still follow it.
enumRace race; // The base type of mythology.
// Name of the World. For now hardcoded.
// Name of creator deity/deities. For now divided into limited sets.
// Sub-deities - Maybe we can make this freeform.
// Mythological stories - The deities and sub-deities interact.
Mythology();
// generate the base mythology
void generateBase();
void generateBaseDwarven();
void generateBaseElven();
void generateBaseHuman();
void addDeity(std::string /* _name */, Mythology_Deity::PERSONALITY /* _type */ );
// do some stuff
void increment();
std::string getType();
std::string getDescription();
std::string getColumn(std::string _column) override;
std::string getColumnType(std::string _column) override;
virtual std::string getLongDescription();
};
class Mythology_Manager
{
public:
Vector <Mythology*> vMythology;
Mythology_Manager()
{
}
void add(Mythology* _mythology)
{
vMythology.add(_mythology);
}
Mythology* get(int i)
{
if (vMythology.isSafe(i))
{
return vMythology(i);
}
return 0;
}
int size()
{
return vMythology.size();
}
void init()
{
}
};
Mythology_Manager mythologyManager;
// Dwarven and Elven mythology are to be mostly hardcoded and not too subject to change.
class Mythology_Dwarven: public Mythology
{
public:
Mythology_Dwarven()
{
type = Mythology::MYTHOLOGY_MONOTHEISTIC;
race = DWARVEN;
name = "Dwarven mythology";
Mythology_Deity* deity = new Mythology_Deity();
deity->name = globalNameGen.generate();
}
std::string getLongDescription()
{
std::string description = "The Dwarven religion is monotheistic, believing in a single Architect God who "
"designed the universe according to mathematical laws. The Architect generally does not concern itself with "
"human affairs, but may sometimes provide assistance to a particularly gifted individual in the form of madness. "
"The main goal of their religion is to elevate themselves beyond their mortality, using knowledge and technology "
"to do so.";
return description;
}
};
Mythology_Dwarven mythologyDwarven;
#endif