1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-27 21:49:10 +02:00

Added loss condition "lose part of Angelic Alliance" to Yog campaign

This commit is contained in:
Ivan Savenko 2024-01-31 12:52:16 +02:00
parent 709d05205d
commit 049c352511
3 changed files with 218 additions and 0 deletions

View File

@ -335,6 +335,7 @@
"vcmi.map.victoryCondition.collectArtifacts.message" : "Acquire Three Artifacts",
"vcmi.map.victoryCondition.angelicAlliance.toSelf" : "Congratulations! All your enemies have been defeated and you have Angelic Alliance! Victory is yours!",
"vcmi.map.victoryCondition.angelicAlliance.message" : "Defeat All Enemies and create Angelic Alliance",
"vcmi.map.victoryCondition.angelicAlliancePartLost.toSelf" : "Alas, you have lost part of the Angelic Alliance. All is lost.",
// few strings from WoG used by vcmi
"vcmi.stackExperience.description" : "» S t a c k E x p e r i e n c e D e t a i l s «\n\nCreature Type ................... : %s\nExperience Rank ................. : %s (%i)\nExperience Points ............... : %i\nExperience Points to Next Rank .. : %i\nMaximum Experience per Battle ... : %i%% (%i)\nNumber of Creatures in stack .... : %i\nMaximum New Recruits\n without losing current Rank .... : %i\nExperience Multiplier ........... : %.2f\nUpgrade Multiplier .............. : %.2f\nExperience after Rank 10 ........ : %i\nMaximum New Recruits to remain at\n Rank 10 if at Maximum Experience : %i",

View File

@ -1515,6 +1515,217 @@
"victoryIconIndex" : 6,
"victoryString" : "core.vcdesc.7"
},
"data/yog:1" : { // The Meeting
"defeatIconIndex" : 1,
"defeatString" : "core.lcdesc.3",
"triggeredEvents" : {
"heroMustSurvive" : {
"condition" : [
"allOf",
[ "isHuman", { "value" : 1 } ],
[ "noneOf", [ "control", { "position" : [ 31, 32, 0 ], "type" : "hero" } ] ] // yog
],
"effect" : {
"messageToSend" : "core.genrltxt.5",
"type" : "defeat"
},
"message" : "core.genrltxt.253"
},
"specialVictory" : {
"condition" : [
"allOf",
[ "isHuman", { "value" : 1 } ],
[ "control", { "position" : [ 14, 16, 0 ], "type" : "town" } ]
],
"effect" : {
"messageToSend" : "core.genrltxt.250",
"type" : "victory"
},
"message" : "core.genrltxt.249"
},
"standardDefeat" : {
"condition" : [ "daysWithoutTown", { "value" : 7 } ],
"effect" : {
"messageToSend" : "core.genrltxt.8",
"type" : "defeat"
},
"message" : "core.genrltxt.7"
}
},
"victoryIconIndex" : 6,
"victoryString" : "core.vcdesc.7"
},
"data/yog:2" : { // A Tough Start
"defeatIconIndex" : 1,
"defeatString" : "core.lcdesc.3",
"triggeredEvents" : {
"heroMustSurvive" : {
"condition" : [
"allOf",
[ "isHuman", { "value" : 1 } ],
[ "noneOf", [ "control", { "position" : [ 33, 36, 0 ], "type" : "hero" } ] ] // yog
],
"effect" : {
"messageToSend" : "core.genrltxt.5",
"type" : "defeat"
},
"message" : "core.genrltxt.253"
},
"specialVictory" : {
"condition" : [
"allOf",
[ "isHuman", { "value" : 1 } ],
[ "haveArtifact", { "type" : "artifact.pendantOfCourage" } ]
],
"effect" : {
"messageToSend" : "core.genrltxt.281",
"type" : "victory"
},
"message" : "core.genrltxt.280"
},
"specialDefeat" : {
"condition" : [
"allOf",
[ "isHuman", { "value" : 1 } ],
[ "anyOf",
[ "noneOf", [ "haveArtifact", { "type" : "artifact.angelicAlliance" } ], [ "haveArtifact", { "type" : "artifact.pendantOfCourage" } ], [ "haveArtifact", { "type" : "artifact.armorOfWonder" } ] ],
[ "noneOf", [ "haveArtifact", { "type" : "artifact.angelicAlliance" } ], [ "haveArtifact", { "type" : "artifact.pendantOfCourage" } ], [ "haveArtifact", { "type" : "artifact.sandalsOfTheSaint" } ] ],
[ "noneOf", [ "haveArtifact", { "type" : "artifact.angelicAlliance" } ], [ "haveArtifact", { "type" : "artifact.celestialNecklaceOfBliss" } ] ],
[ "noneOf", [ "haveArtifact", { "type" : "artifact.angelicAlliance" } ], [ "haveArtifact", { "type" : "artifact.lionsShieldOfCourage" } ] ],
[ "noneOf", [ "haveArtifact", { "type" : "artifact.angelicAlliance" } ], [ "haveArtifact", { "type" : "artifact.swordOfJudgement" } ] ],
[ "noneOf", [ "haveArtifact", { "type" : "artifact.angelicAlliance" } ], [ "haveArtifact", { "type" : "artifact.helmOfHeavenlyEnlightenment" } ] ]
],
],
"effect" : {
"messageToSend" : "core.genrltxt.5",
"type" : "defeat"
},
"message" : "vcmi.map.victoryCondition.angelicAlliancePartLost.toSelf"
},
"standardDefeat" : {
"condition" : [ "daysWithoutTown", { "value" : 7 } ],
"effect" : {
"messageToSend" : "core.genrltxt.8",
"type" : "defeat"
},
"message" : "core.genrltxt.7"
}
},
"victoryIconIndex" : 0,
"victoryString" : "core.vcdesc.1"
},
"data/yog:3" : { // Falor and Terwen
"defeatIconIndex" : 1,
"defeatString" : "core.lcdesc.3",
"triggeredEvents" : {
"heroMustSurvive" : {
"condition" : [
"allOf",
[ "isHuman", { "value" : 1 } ],
[ "noneOf", [ "control", { "position" : [ 3, 5, 0 ], "type" : "hero" } ] ] // yog
],
"effect" : {
"messageToSend" : "core.genrltxt.5",
"type" : "defeat"
},
"message" : "core.genrltxt.253"
},
"specialVictory" : {
"condition" : [
"allOf",
[ "isHuman", { "value" : 1 } ],
[ "haveArtifact", { "type" : "artifact.pendantOfCourage" } ]
],
"effect" : {
"messageToSend" : "core.genrltxt.281",
"type" : "victory"
},
"message" : "core.genrltxt.280"
},
"specialDefeat" : {
"condition" : [
"allOf",
[ "isHuman", { "value" : 1 } ],
[ "anyOf",
[ "noneOf", [ "haveArtifact", { "type" : "artifact.pendantOfCourage" } ], [ "haveArtifact", { "type" : "artifact.celestialNecklaceOfBliss" } ] ],
[ "noneOf", [ "haveArtifact", { "type" : "artifact.pendantOfCourage" } ], [ "haveArtifact", { "type" : "artifact.lionsShieldOfCourage" } ] ],
[ "noneOf", [ "haveArtifact", { "type" : "artifact.swordOfJudgement" } ] ],
[ "noneOf", [ "haveArtifact", { "type" : "artifact.helmOfHeavenlyEnlightenment" } ] ]
],
],
"effect" : {
"messageToSend" : "core.genrltxt.5",
"type" : "defeat"
},
"message" : "vcmi.map.victoryCondition.angelicAlliancePartLost.toSelf"
},
"standardDefeat" : {
"condition" : [ "daysWithoutTown", { "value" : 7 } ],
"effect" : {
"messageToSend" : "core.genrltxt.8",
"type" : "defeat"
},
"message" : "core.genrltxt.7"
}
},
"victoryIconIndex" : 0,
"victoryString" : "core.vcdesc.1"
},
"data/yog:4" : { // Returning to Bracada
"defeatIconIndex" : 1,
"defeatString" : "core.lcdesc.3",
"triggeredEvents" : {
"heroMustSurvive" : {
"condition" : [
"allOf",
[ "isHuman", { "value" : 1 } ],
[ "noneOf", [ "control", { "position" : [ 32, 5, 0 ], "type" : "hero" } ] ] // yog
],
"effect" : {
"messageToSend" : "core.genrltxt.5",
"type" : "defeat"
},
"message" : "core.genrltxt.253"
},
"specialVictory" : {
"condition" : [
"allOf",
[ "isHuman", { "value" : 1 } ],
[ "haveArtifact", { "type" : "artifact.pendantOfCourage" } ]
],
"effect" : {
"messageToSend" : "core.genrltxt.281",
"type" : "victory"
},
"message" : "core.genrltxt.280"
},
"specialDefeat" : {
"condition" : [
"allOf",
[ "isHuman", { "value" : 1 } ],
[ "anyOf",
[ "noneOf", [ "haveArtifact", { "type" : "artifact.pendantOfCourage" } ], [ "haveArtifact", { "type" : "artifact.swordOfJudgement" } ] ],
//[ "noneOf", [ "haveArtifact", { "type" : "artifact.pendantOfCourage" } ], [ "haveArtifact", { "type" : "artifact.helmOfHeavenlyEnlightenment" } ] ]
],
],
"effect" : {
"messageToSend" : "core.genrltxt.5",
"type" : "defeat"
},
"message" : "vcmi.map.victoryCondition.angelicAlliancePartLost.toSelf"
},
"standardDefeat" : {
"condition" : [ "daysWithoutTown", { "value" : 7 } ],
"effect" : {
"messageToSend" : "core.genrltxt.8",
"type" : "defeat"
},
"message" : "core.genrltxt.7"
}
},
"victoryIconIndex" : 0,
"victoryString" : "core.vcdesc.1"
},
"data/final:3" : { // Final Peace
"defeatIconIndex" : 1,
"defeatString" : "core.lcdesc.2",

View File

@ -1777,6 +1777,12 @@ bool CGHeroInstance::isMissionCritical() const
if ((condition.condition == EventCondition::CONTROL) && condition.objectID != ObjectInstanceID::NONE)
return (id != condition.objectID);
if (condition.condition == EventCondition::HAVE_ARTIFACT)
{
if(hasArt(condition.objectType.as<ArtifactID>()))
return true;
}
if(condition.condition == EventCondition::IS_HUMAN)
return true;