1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
This commit is contained in:
Ivan Savenko 2023-10-28 17:58:08 +03:00
parent 4ba8014573
commit 36eacf99d5
2 changed files with 4 additions and 2 deletions

View File

@ -60,6 +60,8 @@ Allows flying movement for affected heroes
Eliminates terrain penalty on certain terrain types for affected heroes (Nomads ability).
Note: to eliminate all terrain penalties see ROUGH_TERRAIN_DISCOUNT bonus
- subtype: type of terrain
### TERRAIN_NATIVE

View File

@ -22,8 +22,8 @@ TurnInfo::BonusCache::BonusCache(const TConstBonusListPtr & bl)
{
for(const auto & terrain : VLC->terrainTypeHandler->objects)
{
noTerrainPenalty.push_back(static_cast<bool>(
bl->getFirst(Selector::type()(BonusType::NO_TERRAIN_PENALTY).And(Selector::subtype()(BonusSubtypeID(terrain->getId()))))));
auto selector = Selector::typeSubtype(BonusType::NO_TERRAIN_PENALTY, BonusSubtypeID(terrain->getId()));
noTerrainPenalty.push_back(static_cast<bool>(bl->getFirst(selector)));
}
freeShipBoarding = static_cast<bool>(bl->getFirst(Selector::type()(BonusType::FREE_SHIP_BOARDING)));