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:
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user