mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
- Fixed guard generation
- Added Jebus template for comparison
This commit is contained in:
parent
fed2821a94
commit
c82bfd0f3e
@ -200,5 +200,63 @@
|
||||
{ "a" : "3", "b" : "5", "guard" : 2000 },
|
||||
{ "a" : "4", "b" : "6", "guard" : 2000 }
|
||||
]
|
||||
},
|
||||
"Jebus Cross":
|
||||
{
|
||||
"minSize" : "l", "maxSize" : "xl",
|
||||
"players" : "4",
|
||||
"zones":
|
||||
{
|
||||
"1":
|
||||
{
|
||||
"type" : "playerStart", "size" : 30, "owner" : 1,
|
||||
"playerTowns" : { "castles" : 1 },
|
||||
"neutralTowns" : { "towns" : 2 },
|
||||
"treasure" : [
|
||||
{"min" : 12000, "max": 22000, "density": 1},
|
||||
{"min" : 500, "max": 1600, "density": 6},
|
||||
{"min" : 300, "max": 3000, "density": 14}
|
||||
]
|
||||
},
|
||||
"2":
|
||||
{
|
||||
"type" : "playerStart", "size" : 30, "owner" : 2,
|
||||
"playerTowns" : { "castles" : 1 },
|
||||
"neutralTowns" : { "towns" : 2 },
|
||||
"treasureLikeZone" : 1
|
||||
},
|
||||
"3":
|
||||
{
|
||||
"type" : "playerStart", "size" : 30, "owner" : 3,
|
||||
"playerTowns" : { "castles" : 1 },
|
||||
"neutralTowns" : { "towns" : 2 },
|
||||
"treasureLikeZone" : 1
|
||||
},
|
||||
"4":
|
||||
{
|
||||
"type" : "playerStart", "size" : 30, "owner" : 4,
|
||||
"playerTowns" : { "castles" : 1 },
|
||||
"neutralTowns" : { "towns" : 2 },
|
||||
"treasureLikeZone" : 1
|
||||
},
|
||||
"5" :
|
||||
{
|
||||
"type" : "treasure", "size" : 40,
|
||||
"neutralTowns" : { "towns" : 2 },
|
||||
"terrainTypes" : [ "sand" ],
|
||||
"treasure" : [
|
||||
{"min" : 35000, "max": 55000, "density" : 3},
|
||||
{"min" : 25000, "max": 35000, "density" : 10},
|
||||
{"min" : 10000, "max": 25000, "density" : 10}
|
||||
]
|
||||
}
|
||||
}
|
||||
"connections" :
|
||||
[
|
||||
{ "a" : "1", "b" : "5", "guard" : 45000 },
|
||||
{ "a" : "2", "b" : "5", "guard" : 45000 },
|
||||
{ "a" : "3", "b" : "5", "guard" : 45000 },
|
||||
{ "a" : "4", "b" : "5", "guard" : 45000 }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -442,15 +442,16 @@ bool CRmgTemplateZone::addMonster(CMapGenerator* gen, int3 &pos, si32 strength)
|
||||
continue;
|
||||
if ((cre->AIValue * (cre->ammMin + cre->ammMax) / 2 < strength) && (strength < cre->AIValue * 100)) //at least one full monster. size between minimum size of given stack and 100
|
||||
{
|
||||
amount = strength / cre->AIValue;
|
||||
if (amount >= 4)
|
||||
amount *= gen->rand.nextDouble(0.75, 1.25);
|
||||
|
||||
possibleCreatures.push_back(cre->idNumber);
|
||||
}
|
||||
}
|
||||
if (possibleCreatures.size())
|
||||
{
|
||||
creId = *RandomGeneratorUtil::nextItem(possibleCreatures, gen->rand);
|
||||
amount = strength / VLC->creh->creatures[creId]->AIValue;
|
||||
if (amount >= 4)
|
||||
amount *= gen->rand.nextDouble(0.75, 1.25);
|
||||
}
|
||||
else //just pick any available creature
|
||||
{
|
||||
creId = CreatureID(132); //Azure Dragon
|
||||
|
Loading…
Reference in New Issue
Block a user