mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Implemented Scuttle Boat and Dimension Door spells.
Fixed #417 and #418. Moved / refactored some code. Minor fixes.
This commit is contained in:
16
lib/map.cpp
16
lib/map.cpp
@@ -2129,3 +2129,19 @@ CVictoryCondition::CVictoryCondition()
|
||||
obj = NULL;
|
||||
ID = allowNormalVictory = appliesToAI = count = 0;
|
||||
}
|
||||
|
||||
bool TerrainTile::entrableTerrain(const TerrainTile *from /*= NULL*/) const
|
||||
{
|
||||
return entrableTerrain(from ? from->tertype != water : true, from ? from->tertype == water : true);
|
||||
}
|
||||
|
||||
bool TerrainTile::entrableTerrain(bool allowLand, bool allowSea) const
|
||||
{
|
||||
return tertype != rock
|
||||
&& (allowSea && tertype == water || allowLand && tertype != water);
|
||||
}
|
||||
|
||||
bool TerrainTile::isClear(const TerrainTile *from /*= NULL*/) const
|
||||
{
|
||||
return entrableTerrain(from) && !blocked;
|
||||
}
|
||||
Reference in New Issue
Block a user