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

Handle HYPNOTIZE effect in case of mana drain

This commit is contained in:
AlexVinS
2016-09-29 21:47:41 +03:00
parent 688dc4c189
commit 83b3c700dd
5 changed files with 25 additions and 14 deletions

View File

@ -95,7 +95,7 @@ std::pair< std::vector<BattleHex>, int > BattleInfo::getPath(BattleHex start, Ba
return std::make_pair(path, reachability.distances[dest]);
}
ui32 BattleInfo::calculateDmg( const CStack* attacker, const CStack* defender, const CGHeroInstance * attackerHero, const CGHeroInstance * defendingHero,
ui32 BattleInfo::calculateDmg( const CStack* attacker, const CStack* defender,
bool shooting, ui8 charge, bool lucky, bool unlucky, bool deathBlow, bool ballistaDoubleDmg, CRandomGenerator & rand )
{
TDmgRange range = calculateDmgRange(attacker, defender, shooting, charge, lucky, unlucky, deathBlow, ballistaDoubleDmg);
@ -150,11 +150,6 @@ CStack * BattleInfo::generateNewStack(const CStackBasicDescriptor &base, bool at
return ret;
}
const CGHeroInstance * BattleInfo::battleGetOwner(const CStack * stack) const
{
return sides[!stack->attackerOwned].hero;
}
void BattleInfo::localInit()
{
for(int i = 0; i < 2; i++)