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

Exposed more of existing limiters for modders (#449)

* Exposed alignment, faction and terrain limiters
* Limiters toString() use now boost:format
This commit is contained in:
godric3
2018-04-17 14:59:30 +02:00
committed by ArseniyShestakov
parent ad2c429d8f
commit d9d01f0b68
9 changed files with 137 additions and 22 deletions

View File

@@ -282,6 +282,16 @@ bool CStack::canBeHealed() const
&& !hasBonusOfType(Bonus::SIEGE_WEAPON);
}
bool CStack::isOnNativeTerrain() const
{
return type->isItNativeTerrain(battle->getTerrainType());
}
bool CStack::isOnTerrain(int terrain) const
{
return battle->getTerrainType() == terrain;
}
const CCreature * CStack::unitType() const
{
return type;