1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-26 08:41:13 +02:00
vcmi/hch/CSpellHandler.h
Michał W. Urbańczyk 22ade5efbe * make compatible with boost 1.36.0 (there was breaking change in boost::function)
* randomizing spells in towns
* fixed reading forbidden structures
* support for heroes starting in town garrisons
* hopefully fixed problems with wrong town defs (village/fort/capitol)
* moved CSpellHandler.* to VCMI_Lib (project files must be updated)
* redone reading spell info
* added missing features to the fort screen
* minor improvements

* partially done mage guild screen
2008-08-20 06:57:53 +00:00

36 lines
947 B
C++

#ifndef CSPELLHANDLER_H
#define CSPELLHANDLER_H
#include <string>
#include <vector>
class CSpell
{
public:
ui32 id;
std::string name;
std::string abbName; //abbreviated name
si32 level;
bool earth;
bool water;
bool fire;
bool air;
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
std::string attributes; //reference only attributes
bool combatSpell; //is this spell combat (true) or adventure (false)
};
class DLL_EXPORT CSpellHandler
{
public:
std::vector<CSpell> spells;
void loadSpells();
};
#endif //CSPELLHANDLER_H