mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Merge pull request #4570 from kdmcser/crash_fix
fix Ballista Bank Mod auto combat crash
This commit is contained in:
@@ -296,7 +296,7 @@ ReachabilityInfo getReachabilityWithEnemyBypass(
|
||||
continue;
|
||||
|
||||
auto dmg = damageCache.getOriginalDamage(activeStack, unit, state);
|
||||
auto turnsToKill = unit->getAvailableHealth() / dmg;
|
||||
auto turnsToKill = unit->getAvailableHealth() / std::max(dmg, (int64_t)1);
|
||||
|
||||
vstd::amin(turnsToKill, 100);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user