1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

vcmi: magicResistance is IFactionMember property

It is no reason to keep it inside IBonusBearer
This commit is contained in:
Konstantin
2023-04-26 23:40:21 +03:00
parent 4f7035d3ff
commit f4f0fd5945
7 changed files with 14 additions and 16 deletions

View File

@@ -736,13 +736,6 @@ int CStackInstance::getLevel() const
return std::max(1, static_cast<int>(type->getLevel()));
}
si32 CStackInstance::magicResistance() const
{
si32 val = valOfBonuses(Selector::type()(Bonus::MAGIC_RESISTANCE));
vstd::amin (val, 100);
return val;
}
void CStackInstance::giveStackExp(TExpType exp)
{
int level = type->getLevel();