1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-19 00:17:56 +02:00

battlefields in VLC and custom bonuses for terrain patches

This commit is contained in:
Andrii Danylchenko
2022-06-28 11:05:30 +03:00
parent 3b1d271ae0
commit 4b4cc3cf4b
47 changed files with 645 additions and 221 deletions

View File

@ -23,6 +23,7 @@
#include "MapComparer.h"
#include "../JsonComparer.h"
#include "mock/ZoneOptionsFake.h"
static const int TEST_RANDOM_SEED = 1337;
@ -43,10 +44,12 @@ TEST(MapFormat, Random)
CMapGenOptions opt;
CRmgTemplate tmpl;
std::shared_ptr<ZoneOptionsFake> zoneOptions = std::make_shared<ZoneOptionsFake>();
const_cast<CRmgTemplate::CPlayerCountRange &>(tmpl.getCpuPlayers()).addRange(1, 4);
const_cast<CRmgTemplate::Zones &>(tmpl.getZones())[0] = std::make_shared<rmg::ZoneOptions>();
const_cast<CRmgTemplate::Zones &>(tmpl.getZones())[0] = zoneOptions;
zoneOptions->setOwner(1);
opt.setMapTemplate(&tmpl);
opt.setHeight(CMapHeader::MAP_SIZE_MIDDLE);