1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Fixed moat identifiers requests - will now always request spells

This commit is contained in:
Ivan Savenko 2023-04-03 15:15:12 +03:00
parent 2d0344f905
commit 191959ae05
10 changed files with 15 additions and 12 deletions

View File

@ -147,7 +147,7 @@
"horde" : [ 2, -1 ],
"mageGuild" : 4,
"warMachine" : "ballista",
"moatAbility" : "core:spell.castleMoat",
"moatAbility" : "castleMoat",
// primaryResource not specified so town get both Wood and Ore for resource bonus
"buildings" :

View File

@ -152,7 +152,7 @@
"mageGuild" : 5,
"primaryResource" : "mercury",
"warMachine" : "ballista",
"moatAbility" : "core:spell.castleMoat",
"moatAbility" : "castleMoat",
"buildings" :
{

View File

@ -148,7 +148,7 @@
"mageGuild" : 5,
"primaryResource" : "sulfur",
"warMachine" : "ballista",
"moatAbility" : "core:spell.dungeonMoat",
"moatAbility" : "dungeonMoat",
"buildings" :

View File

@ -147,7 +147,7 @@
"horde" : [ 0, -1 ],
"mageGuild" : 3,
"warMachine" : "firstAidTent",
"moatAbility" : "core:spell.fortressMoat",
"moatAbility" : "fortressMoat",
// primaryResource not specified so town get both Wood and Ore for resource bonus
"buildings" :

View File

@ -149,7 +149,7 @@
"mageGuild" : 5,
"primaryResource" : "mercury",
"warMachine" : "ammoCart",
"moatAbility" : "core:spell.infernoMoat",
"moatAbility" : "infernoMoat",
"buildings" :
{

View File

@ -152,7 +152,7 @@
"horde" : [ 0, -1 ],
"mageGuild" : 5,
"warMachine" : "firstAidTent",
"moatAbility" : "core:spell.necropolisMoat",
"moatAbility" : "necropolisMoat",
// primaryResource not specified so town get both Wood and Ore for resource bonus
"buildings" :

View File

@ -152,7 +152,7 @@
"mageGuild" : 5,
"primaryResource" : "crystal",
"warMachine" : "firstAidTent",
"moatAbility" : "core:spell.rampartMoat",
"moatAbility" : "rampartMoat",
"buildings" :
{

View File

@ -145,7 +145,7 @@
"horde" : [ 0, -1 ],
"mageGuild" : 3,
"warMachine" : "ammoCart",
"moatAbility" : "core:spell.strongholdMoat",
"moatAbility" : "strongholdMoat",
// primaryResource not specified so town get both Wood and Ore for resource bonus
"buildings" :

View File

@ -147,7 +147,7 @@
"primaryResource" : "gems",
"mageGuild" : 5,
"warMachine" : "ammoCart",
"moatAbility" : "core:spell.towerMoat",
"moatAbility" : "towerMoat",
"buildings" :
{

View File

@ -885,10 +885,13 @@ void CTownHandler::loadTown(CTown * town, const JsonNode & source)
town->namesCount += 1;
}
VLC->modh->identifiers.requestIdentifier(source["moatAbility"], [=](si32 ability)
if (!source["moatAbility"].isNull()) // VCMI 1.2 compatibility code
{
town->moatAbility = SpellID(ability);
});
VLC->modh->identifiers.requestIdentifier( "spell", source["moatAbility"], [=](si32 ability)
{
town->moatAbility = SpellID(ability);
});
}
// Horde building creature level
for(const JsonNode &node : source["horde"].Vector())