mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
committed by
Andrii Danylchenko
parent
205bb09880
commit
aaa07e4d2e
@@ -32,7 +32,7 @@ CStack::CStack(const CStackInstance * Base, PlayerColor O, int I, ui8 Side, Slot
|
||||
slot(S),
|
||||
side(Side),
|
||||
initialPosition(),
|
||||
nativeTerrain(ETerrainType::WRONG)
|
||||
nativeTerrain()
|
||||
{
|
||||
health.init(); //???
|
||||
}
|
||||
@@ -40,7 +40,7 @@ CStack::CStack(const CStackInstance * Base, PlayerColor O, int I, ui8 Side, Slot
|
||||
CStack::CStack()
|
||||
: CBonusSystemNode(STACK_BATTLE),
|
||||
CUnitState(),
|
||||
nativeTerrain(ETerrainType::WRONG)
|
||||
nativeTerrain()
|
||||
{
|
||||
base = nullptr;
|
||||
type = nullptr;
|
||||
@@ -328,11 +328,11 @@ bool CStack::canBeHealed() const
|
||||
bool CStack::isOnNativeTerrain() const
|
||||
{
|
||||
//this code is called from CreatureTerrainLimiter::limit on battle start
|
||||
auto res = nativeTerrain == ETerrainType::ANY_TERRAIN || nativeTerrain == battle->getTerrainType();
|
||||
auto res = nativeTerrain == Terrain::ANY || nativeTerrain == battle->getTerrainType();
|
||||
return res;
|
||||
}
|
||||
|
||||
bool CStack::isOnTerrain(int terrain) const
|
||||
bool CStack::isOnTerrain(const Terrain & terrain) const
|
||||
{
|
||||
return battle->getTerrainType() == terrain;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user