1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

added MECHANICAL bonus

This commit is contained in:
Laserlicht
2024-10-24 21:30:51 +02:00
parent 6dc6cc4cbf
commit 53b7c5da6f
11 changed files with 44 additions and 4 deletions

View File

@ -102,7 +102,7 @@ int AFactionMember::moraleValAndBonusList(TConstBonusListPtr & bonusList) const
return maxGoodMorale;
}
static const auto unaffectedByMoraleSelector = Selector::type()(BonusType::NON_LIVING).Or(Selector::type()(BonusType::UNDEAD))
static const auto unaffectedByMoraleSelector = Selector::type()(BonusType::NON_LIVING).Or(Selector::type()(BonusType::MECHANICAL)).Or(Selector::type()(BonusType::UNDEAD))
.Or(Selector::type()(BonusType::SIEGE_WEAPON)).Or(Selector::type()(BonusType::NO_MORALE));
static const std::string cachingStrUn = "AFactionMember::unaffectedByMoraleSelector";
@ -187,6 +187,7 @@ bool ACreature::isLiving() const //TODO: theoreticaly there exists "LIVING" bonu
static const std::string cachingStr = "ACreature::isLiving";
static const CSelector selector = Selector::type()(BonusType::UNDEAD)
.Or(Selector::type()(BonusType::NON_LIVING))
.Or(Selector::type()(BonusType::MECHANICAL))
.Or(Selector::type()(BonusType::GARGOYLE))
.Or(Selector::type()(BonusType::SIEGE_WEAPON));