2007-06-09 16:28:03 +03:00
|
|
|
#ifndef CSPELLHANDLER_H
|
|
|
|
#define CSPELLHANDLER_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class CSpell
|
|
|
|
{
|
|
|
|
public:
|
2008-08-20 09:57:53 +03:00
|
|
|
ui32 id;
|
2007-06-09 16:28:03 +03:00
|
|
|
std::string name;
|
|
|
|
std::string abbName; //abbreviated name
|
2008-08-20 09:57:53 +03:00
|
|
|
si32 level;
|
2007-06-09 16:28:03 +03:00
|
|
|
bool earth;
|
|
|
|
bool water;
|
|
|
|
bool fire;
|
|
|
|
bool air;
|
2008-08-20 09:57:53 +03:00
|
|
|
si32 power; //spell's power
|
|
|
|
std::vector<si32> costs; //per skill level: 0 - none, 1 - basic, etc
|
|
|
|
std::vector<si32> powers; //[er skill level: 0 - none, 1 - basic, etc
|
|
|
|
std::vector<si32> probabilities; //% chance to gain for castles
|
|
|
|
std::vector<si32> AIVals; //AI values: per skill level: 0 - none, 1 - basic, etc
|
|
|
|
std::vector<std::string> descriptions; //descriptions of spell for skill levels: 0 - none, 1 - basic, etc
|
2007-06-09 16:28:03 +03:00
|
|
|
std::string attributes; //reference only attributes
|
|
|
|
bool combatSpell; //is this spell combat (true) or adventure (false)
|
|
|
|
};
|
|
|
|
|
2008-08-20 09:57:53 +03:00
|
|
|
class DLL_EXPORT CSpellHandler
|
2007-06-09 16:28:03 +03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::vector<CSpell> spells;
|
|
|
|
void loadSpells();
|
|
|
|
};
|
|
|
|
|
2008-07-16 21:26:15 +03:00
|
|
|
#endif //CSPELLHANDLER_H
|