ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.72k stars 377 forks source link

Adventure map, last opponent loses the game, window display sequence adjustment #7093

Open LeHerosInconnu opened 1 year ago

LeHerosInconnu commented 1 year ago

Preliminary checks

Platform

Windows

Describe the bug

When a player wins the scenario because the last opponent loses the game, the window display sequence should be like this:

Player's turn window: Win lose game 003

New week (or new month) window if applicable: Win lose game 004

Window of last opponent losing the game: Win lose game 005 In this case the window yellow title should be: "Victory!"

Instead of: "Major Event!"

Here, the blue player was indeed defeated, so it is indeed a major event, but at the same time it is also the victory of the green player.

Score screen: Win lose game 008

Eventually, in this case, the new week (or month) window might not be displayed because the green player wins the game anyway. What do you think about this?

In fheroes2:

https://user-images.githubusercontent.com/43583994/235457617-586bb7d2-f9af-449d-ab25-803185dc7571.mp4

Save file

Here are the save files: Last day 01.zip

Additional info

Related issue: https://github.com/ihhub/fheroes2/issues/7091.

oleg-derevenetz commented 1 year ago

These "[color] has been vanquished" messages are in fact shown "between" days before any player gets a turn during the new day, because they are in fact addressed to all players, not just the first one. They doesn't mean any "victory" per se because all they show is that some particular player has been vanquished at the onset of the corresponding day, but there still may be another active players, so no "Victory!" title is applicable here.

oleg-derevenetz commented 1 year ago

Eventually, in this case, the new week (or month) window might not be displayed because the green player wins the game anyway. What do you think about this?

The reason behind the "new week" duties (including display of regular resource income) are performed first and check for victory conditions is performed next is the "Accumulate Gold" victory condition.