mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-05 00:49:09 +02:00
move checks for invincible bonus to UnitState & cache
This commit is contained in:
@ -700,6 +700,11 @@ bool CUnitState::isHypnotized() const
|
||||
return bonusCache.getBonusValue(UnitBonusValuesProxy::HYPNOTIZED);
|
||||
}
|
||||
|
||||
bool CUnitState::isInvincible() const
|
||||
{
|
||||
return bonusCache.getBonusValue(UnitBonusValuesProxy::INVINCIBLE);
|
||||
}
|
||||
|
||||
int CUnitState::getTotalAttacks(bool ranged) const
|
||||
{
|
||||
return 1 + (ranged ?
|
||||
|
Reference in New Issue
Block a user