2
0
Эх сурвалжийг харах

- found yet another missing victory condition, fixes 1684

Ivan Savenko 11 жил өмнө
parent
commit
94a6e02107

+ 40 - 1
config/mapOverrides.json

@@ -68,7 +68,46 @@
 		"victoryIconIndex" : 11,
 		"victoryString" : "Defeat All Enemies"
 	},
-
+	"data/secret1:0" : { // The Grail
+		"defeatIconIndex" : 2,
+		"defeatString" : "Time Expires",
+		"triggeredEvents" : {
+			"specialDefeat" : {
+				"condition" : [
+					"allOf",
+					[ "isHuman", { "value" : 1 } ],
+					[ "daysPassed", { "value" : 56 } ]
+				],
+				"effect" : {
+					"messageToSend" : "%s has been vanquished!",
+					"type" : "defeat"
+				},
+				"message" : "Alas, time has run out on your quest. All is lost."
+			},
+			"specialVictory" : {
+				"condition" : [
+					"allOf",
+					[ "isHuman", { "value" : 1 } ],
+					[ "haveArtifact", { "type" : 2 } ]
+				],
+				"effect" : {
+					"messageToSend" : "The enemy has found the %s, and can claim victory!",
+					"type" : "victory"
+				},
+				"message" : "Congratulations! You have found the %s, and can claim victory!"
+			},
+			"standardDefeat" : {
+				"condition" : [ "daysWithoutTown", { "value" : 7 } ],
+				"effect" : {
+					"messageToSend" : "%s's heroes have abandoned him, and he is banished from this land.",
+					"type" : "defeat"
+				},
+				"message" : "%s, your heroes abandon you, and you are banished from this land."
+			}
+		},
+		"victoryIconIndex" : 0,
+		"victoryString" : "Acquire Artifact"
+	},
 	"data/ab:1" : { // Seeking Armageddon
 		"defeatIconIndex" : 1,
 		"defeatString" : "Lose Hero",

+ 1 - 1
lib/CModHandler.cpp

@@ -141,7 +141,7 @@ boost::optional<si32> CIdentifierStorage::getIdentifier(const JsonNode & name, b
 	if (idList.size() == 1)
 		return idList.front().id;
 	if (!silent)
-		logGlobal->errorStream() << "Failed to resolve identifier " << name.String() << " from mod " << pair2.first;
+		logGlobal->errorStream() << "Failed to resolve identifier " << name.String() << " from mod " << name.meta;
 
 	return boost::optional<si32>();
 }