diff --git a/src/battle/script.c b/src/battle/script.c index b84c8e2..96af2f8 100644 --- a/src/battle/script.c +++ b/src/battle/script.c @@ -165,6 +165,10 @@ static void executeNextLine(ScriptRunner *runner) addHudMessage(colors.red, _("Mission Failed!")); failMission(); } + else if (strcmp(command, "END_CHALLENGE") == 0) + { + game.currentMission->challengeData.scriptedEnd = 1; + } else if (strcmp(command, "RETREAT_ALLIES") == 0) { battle.isEpic = 0; diff --git a/src/battle/script.h b/src/battle/script.h index 2be5bd7..aadcba0 100644 --- a/src/battle/script.h +++ b/src/battle/script.h @@ -37,3 +37,4 @@ extern char *getTranslatedString(char *string); extern Battle battle; extern Colors colors; +extern Game game; diff --git a/src/structs.h b/src/structs.h index b33f85d..d6a637d 100644 --- a/src/structs.h +++ b/src/structs.h @@ -254,6 +254,7 @@ typedef struct { int noBoost; int noECM; int noGuns; + int scriptedEnd; Challenge *challenges[MAX_CHALLENGES]; } ChallengeData;