mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
move checks for invincible bonus to UnitState & cache
This commit is contained in:
@ -76,6 +76,11 @@ public:
|
||||
return hasBonusOfType(BonusType::HYPNOTIZED);
|
||||
}
|
||||
|
||||
bool isInvincible() const override
|
||||
{
|
||||
return hasBonusOfType(BonusType::INVINCIBLE);
|
||||
}
|
||||
|
||||
void redirectBonusesToFake()
|
||||
{
|
||||
ON_CALL(*this, getAllBonuses(_, _, _)).WillByDefault(Invoke(&bonusFake, &BonusBearerMock::getAllBonuses));
|
||||
|
Reference in New Issue
Block a user