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

Merge remote-tracking branch 'remotes/origin/develop' into SpellsRefactoring8

# Conflicts:
#	client/battle/CBattleInterface.cpp
#	lib/spells/BattleSpellMechanics.cpp
This commit is contained in:
AlexVinS
2016-09-12 10:13:40 +03:00
34 changed files with 366 additions and 311 deletions

View File

@@ -701,7 +701,7 @@ AttackPossibility AttackPossibility::evaluate(const BattleAttackInfo &AttackInfo
for(int i = 0; i < totalAttacks; i++)
{
std::pair<ui32, ui32> retaliation(0,0);
auto attackDmg = cbc->battleEstimateDamage(curBai, &retaliation);
auto attackDmg = cbc->battleEstimateDamage(CRandomGenerator::getDefault(), curBai, &retaliation);
ap.damageDealt = (attackDmg.first + attackDmg.second) / 2;
ap.damageReceived = (retaliation.first + retaliation.second) / 2;
@@ -785,7 +785,7 @@ int PotentialTargets::bestActionValue() const
void EnemyInfo::calcDmg(const CStack * ourStack)
{
TDmgRange retal, dmg = cbc->battleEstimateDamage(ourStack, s, &retal);
TDmgRange retal, dmg = cbc->battleEstimateDamage(CRandomGenerator::getDefault(), ourStack, s, &retal);
adi = (dmg.first + dmg.second) / 2;
adr = (retal.first + retal.second) / 2;
}