Commit Graph

6 Commits

Author SHA1 Message Date
Oliver Brakmann
97ce246a27 Prevent already failed objectives from being marked as completed
The same change was not and must not be done in the reverse case. It
should be and is possible to mark an already completed objective as
failed.

Consider a case where a player is supposed to capture, but not destroy,
a building.  He captures it, the objective is complete.  However, later
in the game that building gets destroyed. In this case, the objective
should be changed to failed.
2014-09-18 18:32:52 +02:00
Oliver Brakmann
1e7f04105d Fix OnObjective(Completed|Failed) not being called for secondary objectives 2014-08-23 16:21:39 +02:00
Oliver Brakmann
56466e312f Ensure that all combatants have a defined WinState at the end of the game 2014-08-23 16:21:39 +02:00
Oliver Brakmann
d673520d82 Remove inconsistencies w.r.t the Surrender order
* Surrendering is now possible even in maps that do not use
  ConquestVictoryConditions.
* The Surrender button is greyed out instead of hidden when it cannot be
  used.
2014-08-08 13:35:50 +02:00
Oliver Brakmann
8cec848a0f Add a mission objectives GUI panel 2014-08-08 13:35:49 +02:00
Oliver Brakmann
a3bf3e7403 Add support for mission objectives
Objectives can be either primary or secondary objectives. Primary ones
influence the outcome of the game.  If all primary objectives are
completed the game is won, and lost when any of them fails.

Objectives can be added at any stage during the game, allowing to react
dynamically to game events.

The objectives backend only contains the information about the
objectives themselves. It does not check if objectives are completed or
failed.  Instead, the state of objectives must be manually marked. The
backend, however, does check whether the game is won or lost.
2014-08-07 16:56:17 +02:00