mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Fixed "Long Live the King", 1st scenario victory condition
This commit is contained in:
@@ -75,6 +75,46 @@
|
|||||||
"victoryIconIndex" : 11,
|
"victoryIconIndex" : 11,
|
||||||
"victoryString" : "core.vcdesc.0"
|
"victoryString" : "core.vcdesc.0"
|
||||||
},
|
},
|
||||||
|
"data/evil2:0" : { // A Gryphon's Heart
|
||||||
|
"defeatIconIndex" : 2,
|
||||||
|
"defeatString" : "core.lcdesc.3",
|
||||||
|
"triggeredEvents" : {
|
||||||
|
"specialDefeat" : {
|
||||||
|
"condition" : [
|
||||||
|
"allOf",
|
||||||
|
[ "isHuman", { "value" : 1 } ],
|
||||||
|
[ "daysPassed", { "value" : 84 } ]
|
||||||
|
],
|
||||||
|
"effect" : {
|
||||||
|
"messageToSend" : "core.genrltxt.5",
|
||||||
|
"type" : "defeat"
|
||||||
|
},
|
||||||
|
"message" : "core.genrltxt.254"
|
||||||
|
},
|
||||||
|
"specialVictory" : {
|
||||||
|
"condition" : [
|
||||||
|
"allOf",
|
||||||
|
[ "isHuman", { "value" : 1 } ],
|
||||||
|
[ "transport", { "position" : [ 16, 23, 0 ], "type" : 84 } ]
|
||||||
|
],
|
||||||
|
"effect" : {
|
||||||
|
"messageToSend" : "core.genrltxt.293",
|
||||||
|
"type" : "victory"
|
||||||
|
},
|
||||||
|
"message" : "core.genrltxt.292"
|
||||||
|
},
|
||||||
|
"standardDefeat" : {
|
||||||
|
"condition" : [ "daysWithoutTown", { "value" : 7 } ],
|
||||||
|
"effect" : {
|
||||||
|
"messageToSend" : "core.genrltxt.8",
|
||||||
|
"type" : "defeat"
|
||||||
|
},
|
||||||
|
"message" : "core.genrltxt.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"victoryIconIndex" : 10,
|
||||||
|
"victoryString" : "core.vcdesc.11"
|
||||||
|
},
|
||||||
"data/secret1:0" : { // The Grail
|
"data/secret1:0" : { // The Grail
|
||||||
"defeatIconIndex" : 2,
|
"defeatIconIndex" : 2,
|
||||||
"defeatString" : "core.lcdesc.3",
|
"defeatString" : "core.lcdesc.3",
|
||||||
|
|||||||
@@ -388,12 +388,11 @@ void MetaString::jsonDeserialize(const JsonNode & source)
|
|||||||
|
|
||||||
void MetaString::serializeJson(JsonSerializeFormat & handler)
|
void MetaString::serializeJson(JsonSerializeFormat & handler)
|
||||||
{
|
{
|
||||||
JsonNode attr;
|
|
||||||
if(handler.saving)
|
if(handler.saving)
|
||||||
jsonSerialize(attr);
|
jsonSerialize(const_cast<JsonNode&>(handler.getCurrent()));
|
||||||
handler.serializeRaw("attributes", attr, std::nullopt);
|
|
||||||
if(!handler.saving)
|
if(!handler.saving)
|
||||||
jsonDeserialize(attr);
|
jsonDeserialize(handler.getCurrent());
|
||||||
}
|
}
|
||||||
|
|
||||||
VCMI_LIB_NAMESPACE_END
|
VCMI_LIB_NAMESPACE_END
|
||||||
|
|||||||
@@ -870,6 +870,11 @@ void CMapPatcher::readPatchData()
|
|||||||
{
|
{
|
||||||
JsonDeserializer handler(mapObjectResolver.get(), input);
|
JsonDeserializer handler(mapObjectResolver.get(), input);
|
||||||
readTriggeredEvents(handler);
|
readTriggeredEvents(handler);
|
||||||
|
|
||||||
|
handler.serializeInt("defeatIconIndex", mapHeader->defeatIconIndex);
|
||||||
|
handler.serializeInt("victoryIconIndex", mapHeader->victoryIconIndex);
|
||||||
|
handler.serializeStruct("victoryString", mapHeader->victoryMessage);
|
||||||
|
handler.serializeStruct("defeatString", mapHeader->defeatMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
///CMapLoaderJson
|
///CMapLoaderJson
|
||||||
|
|||||||
Reference in New Issue
Block a user