1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-13 01:20:34 +02:00

Implemented "junction" zone type.

This commit is contained in:
DjWarmonger
2015-01-16 17:39:16 +01:00
parent b7386250e9
commit ba604f4e43
2 changed files with 46 additions and 40 deletions

View File

@ -8,6 +8,7 @@ BATTLES:
* Implemented OH3 stack split / upgrade formulas according to AlexSpl
RANDOM MAP GENERATOR:
* Implemented "junction" zone type
* Improved zone placing algorithm
* More balanced distribution of treasure piles
* More obstacles within zones

View File

@ -429,6 +429,10 @@ void CRmgTemplateZone::fractalize(CMapGenerator* gen)
}
assert (clearedTiles.size()); //this should come from zone connections
if (type != ETemplateZoneType::JUNCTION)
{
//junction is not fractalized, has only one straight path
//everything else remains blocked
while (possibleTiles.size())
{
//link tiles in random order
@ -481,6 +485,7 @@ void CRmgTemplateZone::fractalize(CMapGenerator* gen)
tilesToClear.clear(); //empty this container
tilesToIgnore.clear();
}
}
for (auto tile : clearedTiles)
{