|
#include <map>
|
|
#include <vector>
|
|
#include <fstream>
|
|
|
|
#include "lib/Character.hpp"
|
|
#include "lib/Spell.hpp"
|
|
#include "lib/Element.hpp"
|
|
#include "lib/BattleInterface.hpp"
|
|
#include "lib/UserInterface.hpp"
|
|
|
|
std::string loadFlag()
|
|
{
|
|
std::string flagString;
|
|
std::ifstream flagFile("flag.txt");
|
|
flagFile >> flagString;
|
|
flagFile.close();
|
|
return flagString;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
|
|
std::map<std::string, Element *> Elements;
|
|
std::map<Element *, std::vector<Spell *>> SpellBook;
|
|
std::vector<Character *> PlayerParty;
|
|
|
|
/* initialise elements */
|
|
Elements["Fire"] = new Element("Fire");
|
|
Elements["Water"] = new Element("Water");
|
|
Elements["Wind"] = new Element("Wind");
|
|
Elements["Earth"] = new Element("Earth");
|
|
Elements["Holy"] = new Element("Holy");
|
|
Elements["Dark"] = new Element("Dark");
|
|
Elements["Void"] = new Element("Void");
|
|
Elements["Fire"]->setStrongAgainst(Elements["Earth"]);
|
|
Elements["Fire"]->setWeakAgainst(Elements["Water"]);
|
|
Elements["Water"]->setStrongAgainst(Elements["Fire"]);
|
|
Elements["Water"]->setWeakAgainst(Elements["Wind"]);
|
|
Elements["Wind"]->setStrongAgainst(Elements["Water"]);
|
|
Elements["Wind"]->setWeakAgainst(Elements["Earth"]);
|
|
Elements["Earth"]->setStrongAgainst(Elements["Wind"]);
|
|
Elements["Earth"]->setWeakAgainst(Elements["Fire"]);
|
|
Elements["Holy"]->setStrongAgainst(Elements["Dark"]);
|
|
Elements["Holy"]->setWeakAgainst(Elements["Dark"]);
|
|
Elements["Dark"]->setStrongAgainst(Elements["Holy"]);
|
|
Elements["Dark"]->setWeakAgainst(Elements["Holy"]);
|
|
|
|
/* initialise spell book */
|
|
SpellBook[Elements["Fire"]] = {
|
|
new Spell("Fire Bolt", Elements["Fire"], Spell::DESTRUCTION_TYPE, 10, 5),
|
|
new Spell("Warm Touch", Elements["Fire"], Spell::RESTORATION_TYPE, 10, 10),
|
|
new Spell("Flame Javelin", Elements["Fire"], Spell::DESTRUCTION_TYPE, 25, 15),
|
|
new Spell("Flaming Rocket", Elements["Fire"], Spell::DESTRUCTION_TYPE, 50, 20),
|
|
new Spell("Sun's Strike", Elements["Fire"], Spell::DESTRUCTION_TYPE, 100, 25),
|
|
new Spell("Big Bang", Elements["Fire"], Spell::DESTRUCTION_TYPE, 200, 30)};
|
|
SpellBook[Elements["Water"]] = {
|
|
new Spell("Water Splash", Elements["Water"], Spell::DESTRUCTION_TYPE, 10, 5),
|
|
new Spell("Healing Water", Elements["Water"], Spell::RESTORATION_TYPE, 10, 10),
|
|
new Spell("Jet Stream", Elements["Water"], Spell::DESTRUCTION_TYPE, 25, 15),
|
|
new Spell("Rain of Healing", Elements["Water"], Spell::RESTORATION_TYPE, 25, 20),
|
|
new Spell("Whirlpool", Elements["Water"], Spell::DESTRUCTION_TYPE, 50, 25),
|
|
new Spell("Tsunami", Elements["Water"], Spell::DESTRUCTION_TYPE, 100, 30),
|
|
};
|
|
SpellBook[Elements["Wind"]] = {
|
|
new Spell("Breath of Wind", Elements["Wind"], Spell::DESTRUCTION_TYPE, 10, 5),
|
|
new Spell("Wind of Restoration", Elements["Wind"], Spell::RESTORATION_TYPE, 10, 10),
|
|
new Spell("Air Needle", Elements["Wind"], Spell::DESTRUCTION_TYPE, 25, 15),
|
|
new Spell("Tornado", Elements["Wind"], Spell::DESTRUCTION_TYPE, 50, 20),
|
|
new Spell("Twin Tornado", Elements["Wind"], Spell::DESTRUCTION_TYPE, 100, 25),
|
|
new Spell("Triple Tornado", Elements["Wind"], Spell::DESTRUCTION_TYPE, 200, 30),
|
|
};
|
|
SpellBook[Elements["Earth"]] = {
|
|
new Spell("Rock Throw", Elements["Earth"], Spell::DESTRUCTION_TYPE, 10, 5),
|
|
new Spell("Earth Sheet", Elements["Earth"], Spell::RESTORATION_TYPE, 10, 10),
|
|
new Spell("Earth Split", Elements["Earth"], Spell::DESTRUCTION_TYPE, 25, 15),
|
|
new Spell("Crushed Earth", Elements["Earth"], Spell::DESTRUCTION_TYPE, 50, 20),
|
|
new Spell("Wall of Eden", Elements["Earth"], Spell::RESTORATION_TYPE, 50, 25),
|
|
new Spell("Earthquake", Elements["Earth"], Spell::DESTRUCTION_TYPE, 100, 30),
|
|
};
|
|
SpellBook[Elements["Holy"]] = {
|
|
new Spell("Holy Light", Elements["Holy"], Spell::DESTRUCTION_TYPE, 10, 5),
|
|
new Spell("Healing Light", Elements["Holy"], Spell::RESTORATION_TYPE, 25, 10),
|
|
new Spell("Light of Judgment", Elements["Holy"], Spell::DESTRUCTION_TYPE, 50, 15),
|
|
new Spell("Flame of Purgatory", Elements["Holy"], Spell::DESTRUCTION_TYPE, 100, 20),
|
|
new Spell("God's Protection", Elements["Holy"], Spell::RESTORATION_TYPE, 1000000000, 25),
|
|
};
|
|
SpellBook[Elements["Dark"]] = {
|
|
new Spell("Dark Touch", Elements["Dark"], Spell::DESTRUCTION_TYPE, 10, 5),
|
|
new Spell("Hell's Touch", Elements["Dark"], Spell::DESTRUCTION_TYPE, 25, 10),
|
|
new Spell("Hell's Inferno", Elements["Dark"], Spell::DESTRUCTION_TYPE, 50, 15),
|
|
new Spell("Eclipse", Elements["Dark"], Spell::DESTRUCTION_TYPE, 100, 20),
|
|
new Spell("Hell on Earth", Elements["Dark"], Spell::DESTRUCTION_TYPE, 200, 25),
|
|
};
|
|
SpellBook[Elements["Void"]] = {
|
|
new Spell("?", Elements["Void"], Spell::DESTRUCTION_TYPE, 1, 1),
|
|
new Spell("?", Elements["Void"], Spell::DESTRUCTION_TYPE, 10, 1),
|
|
new Spell("?", Elements["Void"], Spell::DESTRUCTION_TYPE, 100, 1),
|
|
new Spell("?", Elements["Void"], Spell::DESTRUCTION_TYPE, 1000, 1),
|
|
new Spell("?", Elements["Void"], Spell::DESTRUCTION_TYPE, 10000, 1),
|
|
new Spell("?", Elements["Void"], Spell::DESTRUCTION_TYPE, 100000, 1),
|
|
new Spell("?", Elements["Void"], Spell::DESTRUCTION_TYPE, 1000000, 1),
|
|
new Spell("?", Elements["Void"], Spell::DESTRUCTION_TYPE, 10000000, 1),
|
|
new Spell("?", Elements["Void"], Spell::DESTRUCTION_TYPE, 100000000, 1),
|
|
new Spell("?", Elements["Void"], Spell::DESTRUCTION_TYPE, 1000000000, 1),
|
|
};
|
|
}
|