1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

* support for new spells: anti-magic and elemental summoning

* obstacles in battles should fit now the battlefield
* minor changes
This commit is contained in:
mateuszb
2009-08-06 14:02:21 +00:00
parent 184676d7c4
commit ea6ab102a7
11 changed files with 168 additions and 121 deletions

View File

@@ -137,6 +137,8 @@ struct DLL_EXPORT BattleInfo
static int calculateDmg(const CStack* attacker, const CStack* defender, const CGHeroInstance * attackerHero, const CGHeroInstance * defendingHero, bool shooting); //TODO: add additional conditions and require necessary data
void calculateCasualties(std::set<std::pair<ui32,si32> > *casualties);
std::set<CStack*> getAttackedCreatures(const CSpell * s, const CGHeroInstance * caster, int destinationTile); //calculates stack affected by given spell
static int calculateSpellDuration(const CSpell * spell, const CGHeroInstance * caster);
static CStack * generateNewStack(const CGHeroInstance * owner, int creatureID, int amount, int stackID, bool attackerOwned, int slot, int /*TerrainTile::EterrainType*/ terrain, int position); //helper for CGameHandler::setupBattle and spells addign new stacks to the battlefield
};
class DLL_EXPORT CStack