1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Support for creature damage bonus.

TODO: display it in a creature window
This commit is contained in:
DjWarmonger
2010-07-16 06:18:41 +00:00
parent 26fe6b3f04
commit 695c862638
5 changed files with 28 additions and 10 deletions

View File

@ -2495,8 +2495,8 @@ bool CGameState::checkForVisitableDir( const int3 & src, const TerrainTile *pom,
std::pair<ui32, ui32> BattleInfo::calculateDmgRange( const CStack* attacker, const CStack* defender, const CGHeroInstance * attackerHero, const CGHeroInstance * defendingHero, bool shooting, ui8 charge, bool lucky )
{
float additiveBonus=1.0f, multBonus=1.0f,
minDmg = attacker->type->damageMin * attacker->count,
maxDmg = attacker->type->damageMax * attacker->count;
minDmg = attacker->getMinDamage() * attacker->count,
maxDmg = attacker->getMaxDamage() * attacker->count;
if(attacker->type->idNumber == 149) //arrow turret
{