mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-24 03:47:18 +02:00
* damage estimation should be better
This commit is contained in:
parent
75c6db7197
commit
027b948a07
@ -626,7 +626,8 @@ std::pair<ui32, ui32> CCallback::battleEstimateDamage(int attackerID, int defend
|
||||
defenderHero = gs->getHero(gs->curB->hero1);
|
||||
}
|
||||
|
||||
const CStack * attacker = gs->curB->stacks[attackerID], * defender = gs->curB->stacks[defenderID];
|
||||
const CStack * attacker = gs->curB->getStack(attackerID, false),
|
||||
* defender = gs->curB->getStack(defenderID);
|
||||
|
||||
return BattleInfo::calculateDmgRange(attacker, defender, attackerHero, defenderHero, battleCanShoot(attacker->ID, defender->position), 0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user