1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

* further changes towards support for ranged spells

* added info about author & license in files
This commit is contained in:
mateuszb
2009-04-15 14:03:31 +00:00
parent aa87e1ff16
commit f9ae91d88c
101 changed files with 1116 additions and 47 deletions

View File

@ -20,6 +20,16 @@
#include "../StartInfo.h"
#include "../map.h"
/*
* CObjectHandler.cpp, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
std::map<int,std::map<int, std::vector<int> > > CGTeleport::objs;
IGameCallback * IObjectInterface::cb = NULL;
DLL_EXPORT void loadToIt(std::string &dest, std::string &src, int &iter, int mode);
@ -771,6 +781,23 @@ int CGHeroInstance::getTotalStrength() const
return getHeroStrength() * getArmyStrength();
}
ui8 CGHeroInstance::getSpellSchoolLevel(const CSpell * spell) const
{
//TODO: skill level may be different on special terrain
ui8 skill = 0; //skill level
if(spell->fire)
skill = std::max(skill,getSecSkillLevel(14));
if(spell->air)
skill = std::max(skill,getSecSkillLevel(15));
if(spell->water)
skill = std::max(skill,getSecSkillLevel(16));
if(spell->earth)
skill = std::max(skill,getSecSkillLevel(17));
return skill;
}
int3 CGHeroInstance::getSightCenter() const
{
return getPosition(false);